mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-19 15:00:43 +01:00
zeromq: code cleanup
This commit is contained in:
parent
0fc63924ef
commit
e6c6ed1169
@ -312,6 +312,9 @@ static rsRetVal rcvData(){
|
||||
zframe_t *frame;
|
||||
zsock_t *which = (zsock_t *)zpoller_wait(poller, -1);
|
||||
while(which) {
|
||||
if (zpoller_terminated(poller)) {
|
||||
break;
|
||||
}
|
||||
pData = zlist_first(listenerList);
|
||||
while(pData->sock != which) {
|
||||
pData = zlist_next(listenerList);
|
||||
@ -372,8 +375,8 @@ BEGINwillRun
|
||||
CODESTARTwillRun
|
||||
CHKiRet(prop.Construct(&s_namep));
|
||||
CHKiRet(prop.SetString(s_namep,
|
||||
UCHAR_CONSTANT("imczmq"),
|
||||
sizeof("imczmq") - 1));
|
||||
UCHAR_CONSTANT("imczmq"),
|
||||
sizeof("imczmq") - 1));
|
||||
|
||||
CHKiRet(prop.ConstructFinalize(s_namep));
|
||||
|
||||
|
||||
@ -115,7 +115,7 @@ static rsRetVal initCZMQ(instanceData* pData) {
|
||||
zsock_set_sndtimeo(pData->sock, pData->sendTimeout);
|
||||
|
||||
if(runModConf->authType) {
|
||||
if (!strcmp((const char *)runModConf->authType, "CURVESERVER")) {
|
||||
if (!strcmp(runModConf->authType, "CURVESERVER")) {
|
||||
zcert_t *serverCert = zcert_load(runModConf->serverCertPath);
|
||||
if(!serverCert) {
|
||||
errmsg.LogError(0, NO_ERRCODE, "could not load cert %s",
|
||||
@ -127,7 +127,7 @@ static rsRetVal initCZMQ(instanceData* pData) {
|
||||
zcert_apply(serverCert, pData->sock);
|
||||
zcert_destroy(&serverCert);
|
||||
}
|
||||
else if(!strcmp((const char *)runModConf->authType, "CURVECLIENT")) {
|
||||
else if(!strcmp(runModConf->authType, "CURVECLIENT")) {
|
||||
zcert_t *serverCert = zcert_load(runModConf->serverCertPath);
|
||||
if(!serverCert) {
|
||||
errmsg.LogError(0, NO_ERRCODE, "could not load cert %s",
|
||||
@ -321,7 +321,7 @@ CODESTARTactivateCnf
|
||||
if(!authActor) {
|
||||
DBGPRINTF("imczmq: starting authActor\n");
|
||||
authActor = zactor_new(zauth, NULL);
|
||||
if(!strcmp((const char *)runModConf->clientCertPath, "*")) {
|
||||
if(!strcmp(runModConf->clientCertPath, "*")) {
|
||||
zstr_sendx(authActor, "CURVE", CURVE_ALLOW_ANY, NULL);
|
||||
}
|
||||
else {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user