[Freeswitch-svn] [commit] r2485 - in freeswitch/trunk/src/mod: endpoints/mod_exosip languages/mod_spidermonkey
Freeswitch SVN
anthm at freeswitch.org
Sun Sep 3 00:29:42 EDT 2006
Author: anthm
Date: Sun Sep 3 00:29:42 2006
New Revision: 2485
Modified:
freeswitch/trunk/src/mod/endpoints/mod_exosip/mod_exosip.c
freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
Log:
avoiding segfault i should never be called
Modified: freeswitch/trunk/src/mod/endpoints/mod_exosip/mod_exosip.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_exosip/mod_exosip.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_exosip/mod_exosip.c Sun Sep 3 00:29:42 2006
@@ -1078,9 +1078,17 @@
static switch_status_t exosip_outgoing_channel(switch_core_session_t *session, switch_caller_profile_t *outbound_profile,
switch_core_session_t **new_session, switch_memory_pool_t *pool)
{
+
+ if (!outbound_profile->destination_number) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_CRIT, "Invalid Destination!\n");
+ return SWITCH_STATUS_GENERR;
+ }
+
+
if ((*new_session = switch_core_session_request(&exosip_endpoint_interface, pool)) != 0) {
struct private_object *tech_pvt;
switch_channel_t *channel;
+
switch_core_session_add_stream(*new_session, NULL);
if ((tech_pvt =
Modified: freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c
==============================================================================
--- freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c (original)
+++ freeswitch/trunk/src/mod/languages/mod_spidermonkey/mod_spidermonkey.c Sun Sep 3 00:29:42 2006
@@ -1415,6 +1415,11 @@
dest = JS_GetStringBytes(JS_ValueToString(cx, argv[1]));
+ if (!strchr(dest, '/')) {
+ switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "Invalid Channel String\n");
+ return JS_TRUE;
+ }
+
if (argc > 2) {
dialplan = JS_GetStringBytes(JS_ValueToString(cx, argv[2]));
}
More information about the Freeswitch-svn
mailing list