37 lines
1.3 KiB
Diff
37 lines
1.3 KiB
Diff
diff -up openslp-1.2.1/slpd/slpd_log.c.orig openslp-1.2.1/slpd/slpd_log.c
|
|
--- openslp-1.2.1/slpd/slpd_log.c.orig 2005-02-08 05:34:31.000000000 +0000
|
|
+++ openslp-1.2.1/slpd/slpd_log.c 2009-09-15 19:39:23.000000000 +0100
|
|
@@ -179,7 +179,8 @@ void SLPDLogBuffer(const char* prefix, i
|
|
if (G_SlpdLogFile)
|
|
{
|
|
fprintf(G_SlpdLogFile,"%s",prefix);
|
|
- fwrite(buf,bufsize,1,G_SlpdLogFile);
|
|
+ if (buf && (bufsize > 0))
|
|
+ fwrite(buf,bufsize,1,G_SlpdLogFile);
|
|
fprintf(G_SlpdLogFile,"\n");
|
|
fflush(G_SlpdLogFile);
|
|
}
|
|
@@ -275,7 +276,21 @@ void SLPDLogSrvTypeRqstMessage(SLPSrvTyp
|
|
/*-------------------------------------------------------------------------*/
|
|
{
|
|
SLPDLog("Message SRVTYPERQST:\n");
|
|
- SLPDLogBuffer(" namingauth = ", srvtyperqst->namingauthlen, srvtyperqst->namingauth);
|
|
+
|
|
+ if (srvtyperqst->namingauthlen == 0xffff)
|
|
+ {
|
|
+ /* Naming authority matches all */
|
|
+ SLPDLog(" namingauth = (all)\n");
|
|
+ }
|
|
+ else if (srvtyperqst->namingauthlen == 0)
|
|
+ {
|
|
+ SLPDLog(" namingauth = (empty)\n");
|
|
+ }
|
|
+ else
|
|
+ {
|
|
+ /* Naming authority has been provided */
|
|
+ SLPDLogBuffer(" namingauth = ", srvtyperqst->namingauthlen, srvtyperqst->namingauth);
|
|
+ }
|
|
SLPDLogBuffer(" scope = ", srvtyperqst->scopelistlen, srvtyperqst->scopelist);
|
|
}
|
|
|