zeromq: code cleanup

This commit is contained in:
Brian Knox 2016-05-15 10:06:36 -04:00
parent 0fc63924ef
commit e6c6ed1169
2 changed files with 8 additions and 5 deletions

View File

@ -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));

View File

@ -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 {