]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix build
authorMichael Jerris <mike@jerris.com>
Wed, 21 Jan 2009 02:18:03 +0000 (02:18 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 21 Jan 2009 02:18:03 +0000 (02:18 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11328 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_core_media_bug.c
src/switch_ivr_originate.c

index cf7dfc8b5573827e02a2b4554062cd2076f0b946..759b6af3bc0d1c9019477b87a8a088701bb14b9f 100644 (file)
@@ -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;
                }
index 860e468a3ce686ea2e741c1b358ed9ddd712bd02..83b32f7bfac845165393fec17633b6fd1eb53cba 100644 (file)
@@ -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;
                                                        }