mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-14 00:00:44 +00:00
avoiding segfault i should never be called
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@2485 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
94571e3c75
commit
e1d499827d
@ -1078,10 +1078,18 @@ static char *find_reg_url(switch_core_db_t *db, char *key, char *val, switch_siz
|
||||
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 =
|
||||
(struct private_object *) switch_core_session_alloc(*new_session, sizeof(struct private_object))) != 0) {
|
||||
|
@ -1415,6 +1415,11 @@ static JSBool session_construct(JSContext *cx, JSObject *obj, uintN argc, jsval
|
||||
|
||||
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]));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user