[Freeswitch-svn] [commit] r7111 - freeswitch/trunk/src/mod/applications/mod_conference

Freeswitch SVN mikej at freeswitch.org
Sun Jan 6 17:18:47 EST 2008


Author: mikej
Date: Sun Jan  6 17:18:47 2008
New Revision: 7111

Modified:
   freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c

Log:
arg checking.

Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c	Sun Jan  6 17:18:47 2008
@@ -3952,8 +3952,8 @@
 	uint32_t flags = 0;
 	conference_member_t member = { 0 };
 	conference_obj_t *conference = NULL;
-	switch_channel_t *channel = NULL;
-	char *mydata = switch_core_session_strdup(session, data);
+	switch_channel_t *channel = switch_core_session_get_channel(session);
+	char *mydata = NULL;
 	char *conf_name = NULL;
 	char *bridge_prefix = "bridge:";
 	char *flags_prefix = "+flags{";
@@ -3968,9 +3968,15 @@
 	conf_xml_cfg_t xml_cfg = { 0 };
 	char *params = NULL;
 
-	channel = switch_core_session_get_channel(session);
 	switch_assert(channel != NULL);
 
+	if (switch_strlen_zero(data)) {
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid arguments\n");
+		return;
+	}
+
+	mydata = switch_core_session_strdup(session, data);
+
 	if (!mydata) {
 		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Pool Failure\n");
 		return;



More information about the Freeswitch-svn mailing list