Skip to content
Snippets Groups Projects
Commit ff1ebae7 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Add debug-level log messages when import_netmail() returns a non-zero value

To help debug any situations where import_netmail() might silently fail
(though I don't anticipate there are any, Accession suggested there was).
parent b5b06c7c
No related branches found
No related tags found
No related merge requests found
Pipeline #8152 passed
...@@ -6097,7 +6097,9 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure) ...@@ -6097,7 +6097,9 @@ void import_packets(const char* inbound, nodecfg_t* inbox, bool secure)
if (strncmp(fmsgbuf, "AREA:", 5) != 0) { /* Netmail */ if (strncmp(fmsgbuf, "AREA:", 5) != 0) { /* Netmail */
(void)fseeko(fidomsg, msg_offset, SEEK_SET); (void)fseeko(fidomsg, msg_offset, SEEK_SET);
import_netmail("", &hdr, fidomsg, inbound); result = import_netmail("", &hdr, fidomsg, inbound);
if (result != 0)
lprintf(LOG_DEBUG, "import_netmail() returned %d", result);
(void)fseeko(fidomsg, next_msg, SEEK_SET); (void)fseeko(fidomsg, next_msg, SEEK_SET);
printf("\n"); printf("\n");
continue; continue;
...@@ -7000,8 +7002,11 @@ int main(int argc, char **argv) ...@@ -7000,8 +7002,11 @@ int main(int argc, char **argv)
fclose(fidomsg); fclose(fidomsg);
} }
} }
else if (i != -2) else {
lprintf(LOG_DEBUG, "import_netmail(%s) returned %d", path, i);
if (i != -2)
fclose(fidomsg); fclose(fidomsg);
}
printf("\n"); printf("\n");
} }
globfree(&g); globfree(&g);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment