[Asterisk-code-review] stasis: Avoid 'dispatched' as unused variable in normal mode. (asterisk[16])
George Joseph
asteriskteam at digium.com
Mon Nov 1 12:59:12 CDT 2021
George Joseph has submitted this change. ( https://gerrit.asterisk.org/c/asterisk/+/16654 )
Change subject: stasis: Avoid 'dispatched' as unused variable in normal mode.
......................................................................
stasis: Avoid 'dispatched' as unused variable in normal mode.
ASTERISK-29710
Change-Id: Ia849f1172e4e694c5d5d7f0cad449f936ee12216
---
M main/stasis.c
1 file changed, 5 insertions(+), 3 deletions(-)
Approvals:
Sean Bright: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved; Approved for Submit
diff --git a/main/stasis.c b/main/stasis.c
index 30567ab..498c3f6 100644
--- a/main/stasis.c
+++ b/main/stasis.c
@@ -1433,8 +1433,8 @@
struct stasis_message *message, struct stasis_subscription *sync_sub)
{
size_t i;
- unsigned int dispatched = 0;
#ifdef AST_DEVMODE
+ unsigned int dispatched = 0;
int message_type_id = stasis_message_type_id(stasis_message_type(message));
struct stasis_message_type_statistics *statistics;
struct timeval start;
@@ -1484,8 +1484,10 @@
struct stasis_subscription *sub = AST_VECTOR_GET(&topic->subscribers, i);
ast_assert(sub != NULL);
-
- dispatched += dispatch_message(sub, message, (sub == sync_sub));
+#ifdef AST_DEVMODE
+ dispatched +=
+#endif
+ dispatch_message(sub, message, (sub == sync_sub));
}
ao2_unlock(topic);
--
To view, visit https://gerrit.asterisk.org/c/asterisk/+/16654
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: asterisk
Gerrit-Branch: 16
Gerrit-Change-Id: Ia849f1172e4e694c5d5d7f0cad449f936ee12216
Gerrit-Change-Number: 16654
Gerrit-PatchSet: 2
Gerrit-Owner: Alexander Traud <pabstraud at compuserve.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Sean Bright <sean at seanbright.com>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20211101/bf010792/attachment-0001.html>
More information about the asterisk-code-review
mailing list