summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2007-07-20 11:04:52 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2007-07-20 11:04:52 +0000
commit55a03c2a353548d420c4b8b4ab23e89d5734db62 (patch)
tree5769510474b601fe64279cf061a5e64efed16475
parentc78b12a405a274ddcbb9bcf78867a2e6dd2f13e5 (diff)
downloadrsyslog-55a03c2a353548d420c4b8b4ab23e89d5734db62.tar.gz
rsyslog-55a03c2a353548d420c4b8b4ab23e89d5734db62.tar.xz
rsyslog-55a03c2a353548d420c4b8b4ab23e89d5734db62.zip
removed incompatibility to sysklogd in syslogd -r option parsing
-rw-r--r--syslogd.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/syslogd.c b/syslogd.c
index 90700a41..7e3d38b0 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -9060,7 +9060,7 @@ int main(int argc, char **argv)
funix[i] = -1;
}
- while ((ch = getopt(argc, argv, "46Aa:dehi:f:l:m:nop:r:s:t:u:vwx")) != EOF)
+ while ((ch = getopt(argc, argv, "46Aa:dehi:f:l:m:nop:r::s:t:u:vwx")) != EOF)
switch((char)ch) {
case '4':
family = PF_INET;
@@ -9121,7 +9121,10 @@ int main(int argc, char **argv)
break;
case 'r': /* accept remote messages */
AcceptRemote = 1;
- LogPort = optarg;
+ if(optarg == NULL)
+ LogPort = "0";
+ else
+ LogPort = optarg;
break;
case 's':
if (StripDomains) {