mirror of
https://github.com/rsyslog/rsyslog.git
synced 2026-06-15 22:12:39 +02:00
zeromq: support no auth and multi frame
This commit is contained in:
parent
299f5a637f
commit
7f6da6456a
@ -359,6 +359,7 @@ static rsRetVal rcvData(){
|
||||
pData = zlist_next(listenerList);
|
||||
}
|
||||
|
||||
zframe_t *frame;
|
||||
zsock_t *which = (zsock_t *)zpoller_wait(poller, -1);
|
||||
while (which) {
|
||||
pData = zlist_first(listenerList);
|
||||
@ -370,7 +371,9 @@ static rsRetVal rcvData(){
|
||||
DBGPRINTF("imczmq: found matching socket\n");
|
||||
}
|
||||
|
||||
char *buf = zstr_recv(which);
|
||||
frame = zframe_recv(which);
|
||||
char *buf = zframe_strdup(frame);
|
||||
|
||||
if (buf == NULL) {
|
||||
DBGPRINTF("imczmq: null buffer\n");
|
||||
continue;
|
||||
@ -389,10 +392,11 @@ static rsRetVal rcvData(){
|
||||
submitMsg2(pMsg);
|
||||
}
|
||||
|
||||
zstr_free(&buf);
|
||||
free(buf);
|
||||
which = (zsock_t *)zpoller_wait(poller, -1);
|
||||
}
|
||||
finalize_it:
|
||||
zframe_destroy(&frame);
|
||||
zpoller_destroy(&poller);
|
||||
pData = zlist_first(listenerList);
|
||||
while(pData) {
|
||||
|
||||
@ -114,6 +114,7 @@ static rsRetVal initCZMQ(instanceData* pData) {
|
||||
}
|
||||
zsock_set_sndtimeo (pData->sock, pData->sendTimeout);
|
||||
|
||||
if(runModConf->authType) {
|
||||
if (!strcmp((const char *)runModConf->authType, "CURVESERVER")) {
|
||||
zcert_t *serverCert = zcert_load(runModConf->serverCertPath);
|
||||
if (!serverCert) {
|
||||
@ -146,6 +147,7 @@ static rsRetVal initCZMQ(instanceData* pData) {
|
||||
zcert_apply(clientCert, pData->sock);
|
||||
zcert_destroy(&clientCert);
|
||||
}
|
||||
}
|
||||
|
||||
switch (pData->sockType) {
|
||||
case ZMQ_PUB:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user