diff --git a/include/smax-private.h b/include/smax-private.h index 9397842..a747bb9 100644 --- a/include/smax-private.h +++ b/include/smax-private.h @@ -47,7 +47,7 @@ void smaxProcessPipedWritesAsync(RESP *reply); unsigned char smaxGetHashLookupIndex(const char *group, int lGroup, const char *key, int lKey); char *smaxGetUpdateChannelPattern(const char *table, const char *key); int smaxStorePush(const char *table, const XField *field); -void smaxTransmitErrorHandler(Redis *r, enum redisx_channel channel, const char *op); +void smaxSocketErrorHandler(Redis *r, enum redisx_channel channel, const char *op); int smaxScriptError(const char *name, int status); int smaxScriptErrorAsync(const char *name, int status); boolean smaxIsDisabled(); diff --git a/src/smax-util.c b/src/smax-util.c index c834943..fdb7a5a 100644 --- a/src/smax-util.c +++ b/src/smax-util.c @@ -147,7 +147,7 @@ void smaxSetOrigin(XMeta *m, const char *origin) { */ // cppcheck-suppress constParameterPointer // cppcheck-suppress constParameter -void smaxTransmitErrorHandler(Redis *redis, enum redisx_channel channel, const char *op) { +void smaxSocketErrorHandler(Redis *redis, enum redisx_channel channel, const char *op) { pthread_t tid; if(redis != smaxGetRedis()) { diff --git a/src/smax.c b/src/smax.c index aa4af0b..8acc0fb 100644 --- a/src/smax.c +++ b/src/smax.c @@ -464,7 +464,7 @@ int smaxConnect() { smaxGetProgramID(); xvprintf("SMA-X> program ID: %s\n", programID); - redisxSetTcpBuf(tcpBufSize); + redisxSetTcpBuf(redis, tcpBufSize); if(sentinel) redis = redisxInitSentinel(SMAX_SENTINEL_SERVICENAME, sentinel, nSentinel); else redis = redisxInit(server ? server : SMAX_DEFAULT_HOSTNAME); @@ -480,7 +480,7 @@ int smaxConnect() { redisxSetPassword(redis, auth); redisxSelectDB(redis, dbIndex); - redisxSetTransmitErrorHandler(redis, smaxTransmitErrorHandler); + redisxSetSocketErrorHandler(redis, smaxSocketErrorHandler); smaxSetPipelineConsumer(smaxProcessPipedWritesAsync); smaxAddSubscriber(NULL, ProcessUpdateNotificationAsync); @@ -1765,10 +1765,8 @@ int smaxWrite(const char *table, const XField *f) { // Writes not to request reply. status = redisxSkipReplyAsync(cl); if(!status) { - int L[9] = {0}; - // Call script - status = redisxSendArrayRequestAsync(cl, (const char **) args, L, 9); + status = redisxSendArrayRequestAsync(cl, (const char **) args, NULL, 9); } redisxUnlockClient(cl);