[Asterisk-code-review] core: Ensure presencestate subtype and message are NULL. (asterisk[13])

Anonymous Coward asteriskteam at digium.com
Thu Sep 22 08:43:39 CDT 2016


Anonymous Coward #1000019 has submitted this change and it was merged.

Change subject: core: Ensure presencestate subtype and message are NULL.
......................................................................


core: Ensure presencestate subtype and message are NULL.

When retrieving presence state information there is no
guarantee that the subtype and message passed in are
set to NULL. This change ensures they are.

ASTERISK-26397 #close

Change-Id: I61f8187972d5d8bbd7d6b7f4daa4f4f7e8237b23
---
M main/presencestate.c
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Richard Mudgett: Looks good to me, but someone else must approve
  Anonymous Coward #1000019: Verified
  Joshua Colp: Looks good to me, approved
  Corey Farrell: Looks good to me, but someone else must approve



diff --git a/main/presencestate.c b/main/presencestate.c
index 207e2aa..56c903c 100644
--- a/main/presencestate.c
+++ b/main/presencestate.c
@@ -151,6 +151,9 @@
 	char *label = ast_strdupa(presence_provider);
 	int res = AST_PRESENCE_INVALID;
 
+	*subtype = NULL;
+	*message = NULL;
+
 	if (check_cache) {
 		res = presence_state_cached(presence_provider, subtype, message);
 		if (res != AST_PRESENCE_INVALID) {

-- 
To view, visit https://gerrit.asterisk.org/3961
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I61f8187972d5d8bbd7d6b7f4daa4f4f7e8237b23
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Richard Mudgett <rmudgett at digium.com>



More information about the asterisk-code-review mailing list