diff options
author | John Kohl <jtkohl@mit.edu> | 1989-12-14 03:36:27 +0000 |
---|---|---|
committer | John Kohl <jtkohl@mit.edu> | 1989-12-14 03:36:27 +0000 |
commit | 479fc9d2e2f66e3320631ac235f8d71d106e7b35 (patch) | |
tree | 8e7fbc17d299e02d93e41fda2027b81c245915a7 /server/server.c | |
parent | 2e5f8418a3c206f84f778dded4c77012e3c4002b (diff) |
fix syslogs of recover_clt
Diffstat (limited to 'server/server.c')
-rw-r--r-- | server/server.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/server/server.c b/server/server.c index 6dd3ae3..ef9958c 100644 --- a/server/server.c +++ b/server/server.c @@ -710,17 +710,19 @@ ZServerDesc_t *server; if ((status = extract_addr(notice, &who)) != ZERR_NONE) return(status); if (!(host = hostm_find_host(&who.sin_addr))) { - syslog(LOG_WARNING, "recover_clt h not found, from %s", - inet_ntoa(server->zs_addr.sin_addr)); - syslog(LOG_WARNING, "%s", inet_ntoa(who.sin_addr)); + char buf[16]; /* long enough for 255.255.255.255\0 */ + (void) strncpy(buf, inet_ntoa(who.sin_addr), sizeof(buf)); + syslog(LOG_WARNING, "recover_clt h not found, from %s for %s", + inet_ntoa(server->zs_addr.sin_addr), buf); return(ZERR_NONE); /* XXX */ } if (host->zh_locked) return(ZSRV_REQUEUE); if (!(client = client_which_client(&who, notice))) { - syslog(LOG_WARNING, "recover_clt not found, from %s", - inet_ntoa(server->zs_addr.sin_addr)); - syslog(LOG_WARNING, "%s/%d",inet_ntoa(who.sin_addr), + char buf[16]; /* long enough for 255.255.255.255\0 */ + (void) strncpy(buf, inet_ntoa(who.sin_addr), sizeof(buf)); + syslog(LOG_WARNING, "recover_clt not found, from %s for %s/%d", + inet_ntoa(server->zs_addr.sin_addr), buf, ntohs(who.sin_port)); return(ZERR_NONE); /* XXX */ } |