From 9268a0c709ce57d65be545114a23c71c7c2085bd Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 25 Jan 2023 15:06:54 -0500 Subject: [PATCH] MT#55283 add missing redis_update for pub/sub The data in Redis must be updated after a successful publish/subscribe. closes #1602 Change-Id: If39cbf04cf1c20e04b390b0b865c473a9acdb2ab (cherry picked from commit cf6aa99dae0a63259a138260fe0f0030c0ab0813) --- daemon/call_interfaces.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/daemon/call_interfaces.c b/daemon/call_interfaces.c index afc0e9ebc..fdd077e2d 100644 --- a/daemon/call_interfaces.c +++ b/daemon/call_interfaces.c @@ -2989,9 +2989,12 @@ const char *call_publish_ng(bencode_item_t *input, bencode_item_t *output, const rwlock_unlock_w(&call->master_lock); obj_put(call); - if (!ret) - return NULL; - return "Failed to create SDP"; + if (ret) + return "Failed to create SDP"; + + redis_update_onekey(call, rtpe_redis_write); + + return NULL; } @@ -3115,6 +3118,8 @@ const char *call_subscribe_request_ng(bencode_item_t *input, bencode_item_t *out bencode_dictionary_add_str_dup(output, "to-tag", &dest_ml->tag); + redis_update_onekey(call, rtpe_redis_write); + return NULL; } @@ -3152,6 +3157,8 @@ const char *call_subscribe_answer_ng(bencode_item_t *input, bencode_item_t *outp if (ret) return "Failed to process subscription answer"; + redis_update_onekey(call, rtpe_redis_write); + return NULL; } @@ -3180,6 +3187,8 @@ const char *call_unsubscribe_ng(bencode_item_t *input, bencode_item_t *output) { if (ret) return "Failed to unsubscribe"; + redis_update_onekey(call, rtpe_redis_write); + return NULL; }