47 printf(
"REPLY : %s\n", s);
50 printf(
" RCODE : %s\n", r.
rcode);
51 printf(
" XCODE : %s\n", r.
xcode);
52 printf(
" MSG : %s\n", r.
msg);
53 printf(
" RES : %d\n", r.
result);
70 char *in =
"/tmp/Yaha.P";
81 memset(answer, 0,
sizeof (answer));
86 printf(
"Let's begin with serious things...\n");
95 spec =
"/tmp/singlepath.txt";
98 printf(
"log_open : %d\n", res);
100 res =
log_write(&log,
"Test log_write before\n");
103 printf(
"log_reopen : %d\n", res);
105 res =
log_write(&log,
"Test log_write after\n");
106 res =
log_printf(&log,
"Test log_printf %s\n",
"Coucou");
109 printf(
"log_close : %d\n", res);
114 spec =
"file:/tmp/logtest.txt";
117 printf(
"log_open : %d\n", res);
119 res =
log_write(&log,
"Test log_write before\n");
122 printf(
"log_reopen : %d\n", res);
124 res =
log_write(&log,
"Test log_write after\n");
125 res =
log_printf(&log,
"Test log_printf %s\n",
"Coucou");
128 printf(
"log_close : %d\n", res);
133 spec =
"udp:10001@127.0.0.1";
136 printf(
"log_open : %d\n", res);
138 res =
log_write(&log,
"Test log_write before\n");
139 res =
log_printf(&log,
"Test log_printf %s\n", spec);
142 printf(
"log_reopen : %d\n", res);
144 res =
log_write(&log,
"Test log_write after\n");
145 res =
log_printf(&log,
"Test log_printf %s\n", spec);
148 printf(
"log_close : %d\n", res);
153 spec =
"syslog:av-test:warning";
156 printf(
"log_open : %d\n", res);
158 res =
log_write(&log,
"Test log_write before\n");
159 res =
log_printf(&log,
"Test log_printf %s\n", spec);
162 printf(
"log_reopen : %d\n", res);
164 res =
log_write(&log,
"Test log_write after\n");
165 res =
log_printf(&log,
"Test log_printf %s\n", spec);
168 printf(
"log_close : %d\n", res);
176 printf(
"log_open : %d\n", res);
178 res =
log_write(&log,
"Test log_write before\n");
179 res =
log_printf(&log,
"Test log_printf %s\n", spec);
182 printf(
"log_reopen : %d\n", res);
184 res =
log_write(&log,
"Test log_write after\n");
185 res =
log_printf(&log,
"Test log_printf %s\n", spec);
188 printf(
"log_close : %d\n", res);
202 strlcpy(question, argv[1],
sizeof (question));
204 strlcpy(question,
"allnaturalpills.info",
sizeof (question));
209 memset(&bl, 0,
sizeof (bl));
212 printf(
"Found %s\n", question);
213 printf(
" WEIGHT %d\n", bl.
weight);
214 printf(
" DATE %d\n", bl.
date);
215 printf(
" IP %s\n", bl.
ipres);
216 printf(
" MSG %s\n", bl.
msg);
223 strlcpy(question, argv[1],
sizeof (question));
225 strlcpy(question, in,
sizeof (question));
227 memset(out, 0,
sizeof (out));
229 res =
av_client(out,
sizeof (out), msg,
sizeof (msg), question);
230 printf(
"OUT : RES=(%d)\n", res);
231 printf(
"OUT : ANSWER=(%s)\n", out);
232 printf(
"OUT : MSG=(%s)\n", msg);
bool log_write(LOG_T *, char *)
bool log_open(LOG_T *, char *)
void zeLog_SetOutput(bool, bool)
bool db_blackliste_check(char *why, char *key, db_map_T *r)
int main(int argc, char **argv)
bool log_printf(LOG_T *, char *,...)
void debug_reply_msg(char *s)
bool log_debug(LOG_T *, bool)
int configure(char *, char *, bool)
int jc_string2reply(smtp_reply_T *, char *)
int av_client(char *, size_t, char *, size_t, char *)