return -1;
}
}
- DEBUG2("imap_command() received: %s", response);
+ DBGP2("imap_command() received: %s", response);
response[numbytes] = '\0';
if (strstr(response, verify) == NULL) {
return -1;
break;
}
recvbuf[numbytes] = '\0';
- DEBUG2("imap_thread() received: %s", recvbuf);
+ DBGP2("imap_thread() received: %s", recvbuf);
if (strstr(recvbuf, "* OK") != recvbuf) {
ERR("IMAP connection failed, probably not an IMAP server");
fail++;
break;
}
recvbuf[numbytes] = '\0';
- DEBUG2("imap_thread() received: %s", recvbuf);
+ DBGP2("imap_thread() received: %s", recvbuf);
if (strlen(recvbuf) > 2) {
unsigned long messages, recent;
char *buf = recvbuf;
}
}
recvbuf[numbytes] = '\0';
- DEBUG2("imap_thread() received: %s", recvbuf);
+ DBGP2("imap_thread() received: %s", recvbuf);
if (strstr(recvbuf, "a3 OK") == NULL) {
ERR("IMAP logout failed: %s", recvbuf);
fail++;
return -1;
}
}
- DEBUG2("pop3_command() received: %s", response);
+ DBGP2("pop3_command() received: %s", response);
response[numbytes] = '\0';
if (strstr(response, verify) == NULL) {
return -1;
fail++;
break;
}
- DEBUG2("pop3_thread received: %s", recvbuf);
+ DBGP2("pop3_thread received: %s", recvbuf);
recvbuf[numbytes] = '\0';
if (strstr(recvbuf, "+OK ") != recvbuf) {
ERR("POP3 connection failed, probably not a POP3 server");
for (i = 0; i < argcnt; i++) {
char *tmp;
tmp = backslash_escape(argsp[i], NULL, 0);
- DEBUG2("%s: substituted arg '%s' to '%s'", tmpl, argsp[i], tmp);
+ DBGP2("%s: substituted arg '%s' to '%s'", tmpl, argsp[i], tmp);
sprintf(argsp[i], "%s", tmp);
free(tmp);
}
p = template_dup = strdup(template[template_idx]);
eval_text = backslash_escape(template[template_idx], argsp, argcnt);
- DEBUG("substituted %s, output is '%s'", tmpl, eval_text);
+ DBGP("substituted %s, output is '%s'", tmpl, eval_text);
eval_list = extract_variable_text_internal(eval_text, allow_threaded);
if (eval_list) {
/* debugging output */
extern int global_debug_level;
-#define __DBG(level, ...) \
+#define __DBGP(level, ...) \
if (global_debug_level > level) { \
fprintf(stderr, "DEBUG(%d) [" __FILE__ ":%d]: ", level, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
fprintf(stderr, "\n"); \
}
-#define DEBUG(...) __DBG(0, __VA_ARGS__)
-#define DEBUG2(...) __DBG(1, __VA_ARGS__)
+#define DBGP(...) __DBGP(0, __VA_ARGS__)
+#define DBGP2(...) __DBGP(1, __VA_ARGS__)
struct net_stat {
const char *dev;