From dbeb3aa47da85d02bd397773e77bfdcfb4d4cbaf Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Wed, 21 Jan 2009 02:18:03 +0000 Subject: [PATCH] fix build git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11328 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_core_media_bug.c | 3 ++- src/switch_ivr_originate.c | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/switch_core_media_bug.c b/src/switch_core_media_bug.c index cf7dfc8b55..759b6af3bc 100644 --- a/src/switch_core_media_bug.c +++ b/src/switch_core_media_bug.c @@ -260,7 +260,8 @@ SWITCH_DECLARE(switch_status_t) switch_core_media_bug_add(switch_core_session_t if (bug->callback) { switch_bool_t result = bug->callback(bug, bug->user_data, SWITCH_ABC_TYPE_INIT); if (result == SWITCH_FALSE) { - switch_core_media_bug_remove(session, new_bug); + switch_core_media_bug_remove(session, &bug); + *new_bug = NULL; switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error attaching BUG to %s\n", switch_channel_get_name(session->channel)); return SWITCH_STATUS_GENERR; } diff --git a/src/switch_ivr_originate.c b/src/switch_ivr_originate.c index 860e468a3c..83b32f7bfa 100644 --- a/src/switch_ivr_originate.c +++ b/src/switch_ivr_originate.c @@ -388,6 +388,11 @@ static uint8_t check_channel_status(originate_global_t *oglobals, originate_stat int hits = 2; char *p = ring_array[fx], *q; + if (!p) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Parse Error\n"); + continue; + } + if (!(hits = atoi(p))) { hits = 2; }