diff options
-rw-r--r-- | src/afb-hreq.c | 2 | ||||
-rw-r--r-- | src/afb-hsrv.c | 2 | ||||
-rw-r--r-- | src/main.c | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/src/afb-hreq.c b/src/afb-hreq.c index 9984cbcb..045a0d60 100644 --- a/src/afb-hreq.c +++ b/src/afb-hreq.c @@ -219,7 +219,7 @@ static magic_t lazy_libmagic() /* MAGIC_MIME tells magic to return a mime of the file, but you can specify different things */ if (verbosity) - printf("Loading mimetype default magic database\n"); + fprintf(stderr, "Loading mimetype default magic database\n"); result = magic_open(MAGIC_MIME_TYPE); if (result == NULL) { diff --git a/src/afb-hsrv.c b/src/afb-hsrv.c index 2c303d3c..73ad6a60 100644 --- a/src/afb-hsrv.c +++ b/src/afb-hsrv.c @@ -336,7 +336,7 @@ int afb_hsrv_start(struct afb_hsrv *hsrv, uint16_t port, unsigned int connection MHD_OPTION_END); /* options-end */ if (httpd == NULL) { - printf("Error: httpStart invalid httpd port: %d", (int)port); + fprintf(stderr, "Error: httpStart invalid httpd port: %d", (int)port); return 0; } @@ -470,7 +470,7 @@ static void daemonize(AFB_session *session) if (pid != 0) _exit (0); // son process get all data in standalone mode - printf ("\nAFB: background mode [pid:%d console:%s]\n", getpid(),session->config->console); + fprintf (stderr, "\nAFB: background mode [pid:%d console:%s]\n", getpid(),session->config->console); // redirect default I/O on console close (2); dup(consoleFD); // redirect stderr @@ -542,7 +542,7 @@ int main(int argc, char *argv[]) { // --------- run ----------- if (session->background) { // --------- in background mode ----------- - if (verbosity) printf ("AFB: Entering background mode\n"); + if (verbosity) fprintf (stderr, "AFB: Entering background mode\n"); daemonize(session); } else { // ---- in foreground mode -------------------- @@ -606,19 +606,19 @@ static struct afb_hsrv *start(AFB_config * config) if (!afb_hsrv_set_cache_timeout(hsrv, config->cacheTimeout) || !init(hsrv, config)) { - printf("Error: initialisation of httpd failed"); + fprintf (stderr, "Error: initialisation of httpd failed"); afb_hsrv_put(hsrv); return NULL; } if (verbosity) { - printf("AFB:notice Waiting port=%d rootdir=%s\n", config->httpdPort, config->rootdir); - printf("AFB:notice Browser URL= http:/*localhost:%d\n", config->httpdPort); + fprintf (stderr, "AFB:notice Waiting port=%d rootdir=%s\n", config->httpdPort, config->rootdir); + fprintf (stderr, "AFB:notice Browser URL= http:/*localhost:%d\n", config->httpdPort); } rc = afb_hsrv_start(hsrv, (uint16_t) config->httpdPort, 15); if (!rc) { - printf("Error: starting of httpd failed"); + fprintf (stderr, "Error: starting of httpd failed"); afb_hsrv_put(hsrv); return NULL; } |