X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=pfix-srsd%2Fmain-srsd.c;h=9f1bdd3b3656749193e4d4d040a83bc10687571e;hb=fa2d79e03036abdcc73f1be6f32ee2a1afa33d6c;hp=a8e6ce935f244f695f6829faf00efdbe14112f52;hpb=8977d252fc44ae953df4bde4a2f1c5895beea4e0;p=apps%2Fpfixtools.git diff --git a/pfix-srsd/main-srsd.c b/pfix-srsd/main-srsd.c index a8e6ce9..9f1bdd3 100644 --- a/pfix-srsd/main-srsd.c +++ b/pfix-srsd/main-srsd.c @@ -122,7 +122,7 @@ int process_srs(server_t *srsd, void* vconfig) nl = strchr(srsd->ibuf.data + 4, '\n'); if (!nl) { if (srsd->ibuf.len > BUFSIZ) { - syslog(LOG_ERR, "unreasonnable amount of data without a \\n"); + err("unreasonnable amount of data without a \\n"); return -1; } if (srsd->obuf.len) { @@ -132,7 +132,7 @@ int process_srs(server_t *srsd, void* vconfig) } if (strncmp("get ", srsd->ibuf.data, 4)) { - syslog(LOG_ERR, "bad request, not starting with \"get \""); + err("bad request, not starting with \"get \""); return -1; } @@ -141,7 +141,7 @@ int process_srs(server_t *srsd, void* vconfig) if (p == q) { buffer_addstr(&srsd->obuf, "400 empty request ???\n"); - syslog(LOG_WARNING, "empty request"); + warn("empty request"); goto skip; } @@ -234,7 +234,7 @@ static srs_t *srs_read_secrets(const char *sfile) ++lineno; if (n == sizeof(buf) - 1 && buf[n - 1] != '\n') { - syslog(LOG_CRIT, "%s:%d: line too long", sfile, lineno); + crit("%s:%d: line too long", sfile, lineno); goto error; } m_strrtrim(buf); @@ -242,7 +242,7 @@ static srs_t *srs_read_secrets(const char *sfile) } if (!lineno) { - syslog(LOG_CRIT, "%s: empty file, no secrets", sfile); + crit("%s: empty file, no secrets", sfile); goto error; } @@ -321,5 +321,5 @@ int main(int argc, char *argv[]) || start_listener(port_dec, true) < 0) { return EXIT_FAILURE; } - return server_loop(srsd_starter, NULL, process_srs, &config); + return server_loop(srsd_starter, NULL, process_srs, NULL, &config); }