diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-16 18:57:51 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-04-16 18:57:51 +0200 |
commit | 7a8b99ebe9a0aea956f44fbe6e584597445b6a7a (patch) | |
tree | d14bd05e00a5edd7fc61a66217d28522c07c4585 /plugins/imuxsock/imuxsock.c | |
parent | 1acde66c3274c57d084146621d4124eaaef9ccf9 (diff) | |
download | rsyslog-7a8b99ebe9a0aea956f44fbe6e584597445b6a7a.tar.gz rsyslog-7a8b99ebe9a0aea956f44fbe6e584597445b6a7a.tar.xz rsyslog-7a8b99ebe9a0aea956f44fbe6e584597445b6a7a.zip |
bugfix/imuxsock: solving abort if hostname was not set
Diffstat (limited to 'plugins/imuxsock/imuxsock.c')
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index c97e6b28..1c8a05e5 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -377,13 +377,13 @@ addListner(instanceConf_t *inst) } else { listeners[nfd].bParseHost = 0; } - CHKiRet(prop.Construct(&(listeners[nfd].hostName))); if(inst->pLogHostName == NULL) { listeners[nfd].hostName = NULL; } else { + CHKiRet(prop.Construct(&(listeners[nfd].hostName))); CHKiRet(prop.SetString(listeners[nfd].hostName, inst->pLogHostName, ustrlen(inst->pLogHostName))); + CHKiRet(prop.ConstructFinalize(listeners[nfd].hostName)); } - CHKiRet(prop.ConstructFinalize(listeners[nfd].hostName)); if(inst->ratelimitInterval > 0) { if((listeners[nfd].ht = create_hashtable(100, hash_from_key_fn, key_equals_fn, NULL)) == NULL) { /* in this case, we simply turn off rate-limiting */ |