[Asterisk-code-review] func presencestate: Return "not set" when no data is set in ... (asterisk[11])
Joshua Colp
asteriskteam at digium.com
Wed Oct 7 09:49:01 CDT 2015
Joshua Colp has submitted this change and it was merged.
Change subject: func_presencestate: Return "not_set" when no data is set in AstDB
......................................................................
func_presencestate: Return "not_set" when no data is set in AstDB
Return AST_PRESENCE_NOT_SET when CustomPresence AstDB key does not
exist, i.e. when a new CustomPresence is added in the dialplan.
ASTERISK-25400 #close
Reported by: Andrew Nagy
Change-Id: I6fb17b16591b5a55fbffe96f3994ec26b1b1723a
---
M funcs/func_presencestate.c
1 file changed, 3 insertions(+), 1 deletion(-)
Approvals:
Anonymous Coward #1000019: Verified
Matt Jordan: Looks good to me, but someone else must approve
Joshua Colp: Looks good to me, approved
diff --git a/funcs/func_presencestate.c b/funcs/func_presencestate.c
index d57b8e3..e37e8c6 100644
--- a/funcs/func_presencestate.c
+++ b/funcs/func_presencestate.c
@@ -243,7 +243,9 @@
char *_message;
char *_subtype;
- ast_db_get(astdb_family, data, buf, sizeof(buf));
+ if (ast_db_get(astdb_family, data, buf, sizeof(buf))) {
+ return AST_PRESENCE_NOT_SET;
+ }
if (parse_data(buf, &state, &_subtype, &_message, &_options)) {
return AST_PRESENCE_INVALID;
--
To view, visit https://gerrit.asterisk.org/1410
To unsubscribe, visit https://gerrit.asterisk.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I6fb17b16591b5a55fbffe96f3994ec26b1b1723a
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: 11
Gerrit-Owner: Ivan Poddubny <ivan.poddubny at gmail.com>
Gerrit-Reviewer: Anonymous Coward #1000019
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
More information about the asterisk-code-review
mailing list