Merge pull request #3110 from alorbach/imrelp-oldstylefix

imrelp: Fixed issue with oldstyle configuration caused by commit:
This commit is contained in:
Rainer Gerhards 2018-10-11 12:31:07 +02:00 committed by GitHub
commit 5c7ad3ba85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View File

@ -346,6 +346,8 @@ static rsRetVal addInstance(void __attribute__((unused)) *pVal, uchar *pNewVal)
CHKmalloc(inst->pszBindRuleset = ustrdup(cs.pszBindRuleset));
}
inst->pBindRuleset = NULL;
inst->bEnableLstn = -1; /* all ok, ready to start up */
finalize_it:
free(pNewVal);
RETiRet;

View File

@ -866,6 +866,7 @@ if ENABLE_RELP
TESTS += sndrcv_relp.sh \
sndrcv_relp_rebind.sh \
imrelp-basic.sh \
imrelp-basic-oldstyle.sh \
imrelp-manyconn.sh \
imrelp-maxDataSize-error.sh \
imrelp-long-msg.sh \
@ -1457,6 +1458,7 @@ EXTRA_DIST= \
sndrcv_failover.sh \
sndrcv.sh \
imrelp-basic.sh \
imrelp-basic-oldstyle.sh \
imrelp-manyconn.sh \
imrelp-maxDataSize-error.sh \
imrelp-long-msg.sh \

19
tests/imrelp-basic-oldstyle.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash
# addd 2018-10-09 by Alorbach, released under ASL 2.0
. $srcdir/diag.sh init
generate_conf
add_conf '
$ModLoad ../plugins/imrelp/.libs/imrelp # Old Style module loading
$inputrelpserverrun '$TCPFLOOD_PORT'
template(name="outfmt" type="string" string="%msg:F,58:2%\n")
:msg, contains, "msgnum:" action(type="omfile" template="outfmt"
file=`echo $RSYSLOG_OUT_LOG`)
'
startup
tcpflood -Trelp-plain -p'$TCPFLOOD_PORT' -m10000
shutdown_when_empty # shut down rsyslogd when done processing messages
wait_shutdown
seq_check 0 9999
exit_test