diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-10 17:02:30 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-10 23:14:35 +0100 |
commit | 6a926212484bcd423aa265341eb198ef2bc9b410 (patch) | |
tree | 9473e1787c096a8f173ad4cd1594fdd44b8d493f /nslcd/service.c | |
parent | f7c6771538371e4797a29ec6e5a8ea91d955beeb (diff) |
only log protocol name if it is present
Diffstat (limited to 'nslcd/service.c')
-rw-r--r-- | nslcd/service.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/nslcd/service.c b/nslcd/service.c index c3ca061..de0e019 100644 --- a/nslcd/service.c +++ b/nslcd/service.c @@ -209,7 +209,8 @@ NSLCD_HANDLE( char filter[4096]; READ_STRING(fp, name); READ_STRING(fp, protocol); - log_setrequest("service=\"%s\"/%s", name, protocol);, + log_setrequest("service=\"%s\"%s%s", name, + *protocol != '\0' ? "/" : "", protocol);, mkfilter_service_byname(name, protocol, filter, sizeof(filter)), write_service(fp, entry, name, protocol) ) @@ -221,7 +222,8 @@ NSLCD_HANDLE( char filter[4096]; READ_INT32(fp, number); READ_STRING(fp, protocol); - log_setrequest("service=%lu/%s", (unsigned long int)number, protocol);, + log_setrequest("service=%lu/%s", (unsigned long int)number, + *protocol != '\0' ? "/" : "", protocol);, mkfilter_service_bynumber(number, protocol, filter, sizeof(filter)), write_service(fp, entry, NULL, protocol) ) |