[asterisk-commits] mmichelson: branch 1.8-digiumphones r360071 - /branches/1.8-digiumphones/main/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Mar 20 16:29:04 CDT 2012


Author: mmichelson
Date: Tue Mar 20 16:29:00 2012
New Revision: 360071

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=360071
Log:
Fix one more "(null)" string.

If a hint with no presence portion were added, it would
result in another "(null)" string warning.


Modified:
    branches/1.8-digiumphones/main/pbx.c

Modified: branches/1.8-digiumphones/main/pbx.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.8-digiumphones/main/pbx.c?view=diff&rev=360071&r1=360070&r2=360071
==============================================================================
--- branches/1.8-digiumphones/main/pbx.c (original)
+++ branches/1.8-digiumphones/main/pbx.c Tue Mar 20 16:29:00 2012
@@ -4361,6 +4361,8 @@
 	if ((tmp = strrchr(copy, ','))) {
 		*tmp = '\0';
 		tmp++;
+	} else {
+		return NULL;
 	}
 	ast_str_set(&hint_args, 0, "%s", tmp);
 	return ast_str_buffer(hint_args);
@@ -4464,6 +4466,11 @@
 	}
 	ast_str_set(&hint_app, 0, "%s", app);
 	presence_provider = parse_hint_presence(hint_app);
+
+	if (ast_strlen_zero(presence_provider)) {
+		/* No presence string in the hint */
+		return 0;
+	}
 
 	return ast_presence_state(presence_provider, subtype, message);
 }




More information about the asterisk-commits mailing list