[Freeswitch-svn] [commit] r10082 - freeswitch/trunk/src/mod/xml_int/mod_xml_rpc

Freeswitch SVN anthm at freeswitch.org
Mon Oct 20 11:48:04 EDT 2008


Author: anthm
Date: Mon Oct 20 11:48:03 2008
New Revision: 10082

Modified:
   freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c

Log:
probable fix for MDXMLINT-35

Modified: freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c
==============================================================================
--- freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	(original)
+++ freeswitch/trunk/src/mod/xml_int/mod_xml_rpc/mod_xml_rpc.c	Mon Oct 20 11:48:03 2008
@@ -697,11 +697,12 @@
 	switch_stream_handle_t stream = { 0 };
 	xmlrpc_value *val = NULL;
 
-
 	/* Parse our argument array. */
 	xmlrpc_decompose_value(envP, paramArrayP, "(ss)", &command, &arg);
+
 	if (envP->fault_occurred) {
-		goto done;
+		switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Invalid Request!\n");
+		return NULL;
 	}
 
 	SWITCH_STANDARD_STREAM(stream);
@@ -730,7 +731,7 @@
 	/* Parse our argument array. */
 	xmlrpc_decompose_value(envP, paramArrayP, "(sss)", &oid, &s_action, &data);
 	if (envP->fault_occurred) {
-		goto done;
+		return NULL;
 	}
 
 	if (!strncasecmp(oid, FREESWITCH_OID_PREFIX, strlen(FREESWITCH_OID_PREFIX))) {
@@ -768,7 +769,6 @@
 	/* Return our result. */
 	val = xmlrpc_build_value(envP, "s", buf);
 
-  done:
 	/* xmlrpc-c requires us to free memory it malloced from xmlrpc_decompose_value */
 	switch_safe_free(oid);
 	switch_safe_free(s_action);



More information about the Freeswitch-svn mailing list