Skip to content

Commit

Permalink
rebasing with updated client command
Browse files Browse the repository at this point in the history
Signed-off-by: Sarthak Aggarwal <[email protected]>
  • Loading branch information
sarthakaggarwal97 committed Jan 15, 2025
1 parent 38ff884 commit 91df97a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/networking.c
Original file line number Diff line number Diff line change
Expand Up @@ -3747,24 +3747,24 @@ static int clientMatchesFlagFilter(client *c, const char *flag_filter) {
}

static int clientSubscribedToChannel(client *client, robj *channel) {
if (client == NULL || client->pubsub_channels == NULL) {
if (client == NULL || client->pubsub_data == NULL || client->pubsub_data->pubsub_channels == NULL) {
return 0;
}
return dictFind(client->pubsub_channels, channel) != NULL;
return dictFind(client->pubsub_data->pubsub_channels, channel) != NULL;
}

static int clientSubscribedToShardChannel(client *client, robj *channel) {
if (client == NULL || client->pubsubshard_channels == NULL) {
if (client == NULL || client->pubsub_data == NULL || client->pubsub_data->pubsubshard_channels == NULL) {
return 0;
}
return dictFind(client->pubsubshard_channels, channel) != NULL;
return dictFind(client->pubsub_data->pubsubshard_channels, channel) != NULL;
}

static int clientSubscribedToPattern(client *client, robj *pattern) {
if (client == NULL || client->pubsub_patterns == NULL) {
if (client == NULL || client->pubsub_data == NULL || client->pubsub_data->pubsub_patterns == NULL) {
return 0;
}
return dictFind(client->pubsub_patterns, pattern) != NULL;
return dictFind(client->pubsub_data->pubsub_patterns, pattern) != NULL;
}


Expand Down

0 comments on commit 91df97a

Please sign in to comment.