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