Skip to content

Commit

Permalink
wait on vars upfront init/connection error check
Browse files Browse the repository at this point in the history
  • Loading branch information
attipaci committed Oct 27, 2024
1 parent 0deca79 commit a6a56b2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/smax.c
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,8 @@ int smaxWaitOnAnySubscribed(char **changedTable, char **changedKey, int timeout)

if(changedTable == NULL) return x_error(X_GROUP_INVALID, EINVAL, fn, "'changedTable' parameter is NULL");
if(changedKey == NULL) return x_error(X_NAME_INVALID, EINVAL, fn, "'changedKey' parameter is NULL");
if(!smaxGetRedis()) return smaxError(fn, X_NO_INIT);
if(!smaxIsConnected()) return x_error(X_NO_SERVICE, ENOTCONN, fn, "not connected to SMA-X server.");

xvprintf("SMA-X> waiting for notification...\n");

Expand Down

0 comments on commit a6a56b2

Please sign in to comment.