masqmail
diff src/conf.c @ 333:0bd27f603910
Added debug level 9 for msgs to stderr during reading config
See changes to man page, included in this changeset.
author | markus schnalke <meillo@marmaro.de> |
---|---|
date | Sat, 27 Aug 2011 16:54:14 +0200 |
parents | f899ca0835a8 |
children | 08932c629849 |
line diff
1.1 --- a/src/conf.c Sat Aug 27 16:21:17 2011 +0200 1.2 +++ b/src/conf.c Sat Aug 27 16:54:14 2011 +0200 1.3 @@ -62,7 +62,7 @@ 1.4 { 1.5 gchar **str; 1.6 1.7 - DEBUG(6) fprintf(stderr, "parse_boolean: %s\n", rval); 1.8 + DEBUG(9) fprintf(stderr, "parse_boolean: %s\n", rval); 1.9 1.10 str = true_strings; 1.11 while (*str) { 1.12 @@ -100,7 +100,7 @@ 1.13 fgets(buf, 255, fptr); 1.14 if (buf[0] && (buf[0] != '#') && (buf[0] != '\n')) { 1.15 g_strchomp(buf); 1.16 - DEBUG(6) fprintf(stderr,"parse_list_file: item = %s\n", buf); 1.17 + DEBUG(9) fprintf(stderr,"parse_list_file: item = %s\n", buf); 1.18 list = g_list_append(list, g_strdup(buf)); 1.19 } 1.20 } 1.21 @@ -117,7 +117,7 @@ 1.22 gchar buf[256]; 1.23 gchar *p, *q; 1.24 1.25 - DEBUG(6) fprintf(stderr, "parsing list %s, file?:%d\n", line, read_file); 1.26 + DEBUG(9) fprintf(stderr, "parsing list %s, file?:%d\n", line, read_file); 1.27 1.28 p = line; 1.29 while (*p != '\0') { 1.30 @@ -134,7 +134,7 @@ 1.31 /* just a normal item */ 1.32 list = g_list_append(list, g_strdup(buf)); 1.33 1.34 - DEBUG(6) fprintf(stderr, "item = %s\n", buf); 1.35 + DEBUG(9) fprintf(stderr, "item = %s\n", buf); 1.36 1.37 if (*p) 1.38 p++; 1.39 @@ -226,7 +226,7 @@ 1.40 gchar *p, *q; 1.41 interface *iface; 1.42 1.43 - DEBUG(6) fprintf(stderr, "parse_interface: %s\n", line); 1.44 + DEBUG(9) fprintf(stderr, "parse_interface: %s\n", line); 1.45 1.46 p = line; 1.47 q = buf; 1.48 @@ -242,7 +242,7 @@ 1.49 iface->port = atoi(p); 1.50 } else 1.51 iface->port = def_port; 1.52 - DEBUG(6) fprintf(stderr,"rval=%s, address:port=%s:%i\n",line, iface->address, iface->port); 1.53 + DEBUG(9) fprintf(stderr,"rval=%s, address:port=%s:%i\n",line, iface->address, iface->port); 1.54 1.55 return iface; 1.56 } 1.57 @@ -256,7 +256,7 @@ 1.58 struct in_addr addr, mask_addr, net_addr, *p_net_addr; 1.59 guint n; 1.60 1.61 - DEBUG(6) fprintf(stderr, "parse_network: %s\n", line); 1.62 + DEBUG(9) fprintf(stderr, "parse_network: %s\n", line); 1.63 1.64 p = line; 1.65 q = buf; 1.66 @@ -341,13 +341,13 @@ 1.67 gint c; 1.68 gchar *ptr = buf; 1.69 1.70 - DEBUG(6) fprintf(stderr, "read_lval()\n"); 1.71 + DEBUG(9) fprintf(stderr, "read_lval()\n"); 1.72 1.73 if (!eat_spaces(in)) 1.74 return FALSE; 1.75 1.76 c = fgetc(in); 1.77 - DEBUG(6) fprintf(stderr, "read_lval() 2\n"); 1.78 + DEBUG(9) fprintf(stderr, "read_lval() 2\n"); 1.79 while ((isalnum(c) || c == '_' || c == '-' || c == '.') 1.80 && (ptr < buf + size - 1) 1.81 && (c != EOF)) { 1.82 @@ -367,7 +367,7 @@ 1.83 1.84 eat_spaces(in); 1.85 1.86 - DEBUG(6) fprintf(stderr, "lval = %s\n", buf); 1.87 + DEBUG(9) fprintf(stderr, "lval = %s\n", buf); 1.88 1.89 return buf[0] != '\0'; 1.90 } 1.91 @@ -378,7 +378,7 @@ 1.92 gint c; 1.93 gchar *ptr = buf; 1.94 1.95 - DEBUG(6) fprintf(stderr, "read_rval()\n"); 1.96 + DEBUG(9) fprintf(stderr, "read_rval()\n"); 1.97 1.98 if (!eat_spaces(in)) 1.99 return FALSE; 1.100 @@ -415,7 +415,7 @@ 1.101 1.102 eat_line_trailing(in); 1.103 1.104 - DEBUG(6) fprintf(stderr, "rval = %s\n", buf); 1.105 + DEBUG(9) fprintf(stderr, "rval = %s\n", buf); 1.106 1.107 return TRUE; 1.108 } 1.109 @@ -425,7 +425,7 @@ 1.110 { 1.111 gint c; 1.112 1.113 - DEBUG(6) fprintf(stderr, "read_statement()\n"); 1.114 + DEBUG(9) fprintf(stderr, "read_statement()\n"); 1.115 1.116 /* eat comments and empty lines: */ 1.117 if (!eat_comments(in)) 1.118 @@ -435,14 +435,14 @@ 1.119 return FALSE; 1.120 } 1.121 1.122 - DEBUG(6) fprintf(stderr, " lval = %s\n", lval); 1.123 + DEBUG(9) fprintf(stderr, " lval = %s\n", lval); 1.124 if ((c = fgetc(in) == '=')) { 1.125 if (read_rval(in, rval, rsize)) { 1.126 - DEBUG(6) fprintf(stderr, " rval = %s\n", rval); 1.127 + DEBUG(9) fprintf(stderr, " rval = %s\n", rval); 1.128 return TRUE; 1.129 } 1.130 } else { 1.131 - DEBUG(6) fprintf(stderr," '=' expected after %s, char was '%c'\n", lval, c); 1.132 + DEBUG(9) fprintf(stderr," '=' expected after %s, char was '%c'\n", lval, c); 1.133 fprintf(stderr, "'=' expected after %s, char was '%c'\n", lval, c); 1.134 } 1.135 return FALSE; 1.136 @@ -469,7 +469,7 @@ 1.137 1.138 gchar lval[256], rval[2048]; 1.139 while (read_statement(in, lval, 256, rval, 2048)) { 1.140 - DEBUG(6) fprintf(stderr,"read_conf(): lval=%s\n", lval); 1.141 + DEBUG(9) fprintf(stderr,"read_conf(): lval=%s\n", lval); 1.142 if (strcmp(lval, "debug_level") == 0) 1.143 conf.debug_level = atoi(rval); 1.144 else if (strcmp(lval, "run_as_user") == 0) { 1.145 @@ -585,7 +585,7 @@ 1.146 conf.log_user = g_strdup(rval); 1.147 else if(strcmp(lval, "max_msg_size") == 0) { 1.148 conf.max_msg_size = atol(rval); 1.149 - DEBUG(6) fprintf(stderr,"rval=%s, conf.max_msg_size=%ld\n", 1.150 + DEBUG(9) fprintf(stderr,"rval=%s, conf.max_msg_size=%ld\n", 1.151 rval, conf.max_msg_size); 1.152 } 1.153 else