Skip to content

Commit

Permalink
Update for upstream API changes of the RedisX library
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Dec 14, 2024
1 parent e9b7d09 commit 96a8e9f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
2 changes: 1 addition & 1 deletion include/smax-private.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/smax-util.c
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down
8 changes: 3 additions & 5 deletions src/smax.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -480,7 +480,7 @@ int smaxConnect() {
redisxSetPassword(redis, auth);
redisxSelectDB(redis, dbIndex);

redisxSetTransmitErrorHandler(redis, smaxTransmitErrorHandler);
redisxSetSocketErrorHandler(redis, smaxSocketErrorHandler);

smaxSetPipelineConsumer(smaxProcessPipedWritesAsync);
smaxAddSubscriber(NULL, ProcessUpdateNotificationAsync);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 96a8e9f

Please sign in to comment.