]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
use switch_assert macro instead of just assert.
authorMichael Jerris <mike@jerris.com>
Wed, 12 Dec 2007 23:21:45 +0000 (23:21 +0000)
committerMichael Jerris <mike@jerris.com>
Wed, 12 Dec 2007 23:21:45 +0000 (23:21 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@6714 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_dingaling/mod_dingaling.c
src/mod/endpoints/mod_iax/mod_iax.c
src/mod/endpoints/mod_portaudio/mod_portaudio.c
src/mod/endpoints/mod_sofia/mod_sofia.c
src/mod/endpoints/mod_sofia/sofia.c
src/mod/endpoints/mod_sofia/sofia_glue.c
src/mod/endpoints/mod_sofia/sofia_presence.c
src/mod/endpoints/mod_sofia/sofia_reg.c
src/mod/endpoints/mod_woomera/mod_woomera.c

index 939ee16229066cc9fd44fd209baea940ee18c0c8..37672244f6309b2cf2d0d6d3465b0f12e011e6c7 100644 (file)
@@ -505,7 +505,7 @@ static switch_status_t chat_send(char *proto, char *from, char *to, char *subjec
        char *user, *host, *f_user = NULL, *ffrom = NULL, *f_host = NULL, *f_resource = NULL;
        mdl_profile_t *profile = NULL;
 
-       assert(proto != NULL);
+       switch_assert(proto != NULL);
 
        if (from && (f_user = strdup(from))) {
                if ((f_host = strchr(f_user, '@'))) {
@@ -749,8 +749,8 @@ static void dl_logger(char *file, const char *func, int line, int level, char *f
 
 static int get_codecs(struct private_object *tech_pvt)
 {
-       assert(tech_pvt != NULL);
-       assert(tech_pvt->session != NULL);
+       switch_assert(tech_pvt != NULL);
+       switch_assert(tech_pvt->session != NULL);
 
        if (!tech_pvt->num_codecs) {
                if (globals.codec_string) {
@@ -901,7 +901,7 @@ static int activate_rtp(struct private_object *tech_pvt)
 static int do_candidates(struct private_object *tech_pvt, int force)
 {
        switch_channel_t *channel = switch_core_session_get_channel(tech_pvt->session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        if (switch_test_flag(tech_pvt, TFLAG_DO_CAND)) {
                return 1;
@@ -1054,10 +1054,10 @@ static switch_status_t negotiate_media(switch_core_session_t *session)
        unsigned int elapsed;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        switch_set_flag_locked(tech_pvt, TFLAG_IO);
 
@@ -1147,10 +1147,10 @@ static switch_status_t channel_on_init(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt->read_frame.buflen = SWITCH_RTP_MAX_BUF_LEN;
 
@@ -1170,10 +1170,10 @@ static switch_status_t channel_on_ring(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
 
@@ -1187,10 +1187,10 @@ static switch_status_t channel_on_execute(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL EXECUTE\n", switch_channel_get_name(channel));
 
@@ -1204,10 +1204,10 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_clear_flag_locked(tech_pvt, TFLAG_IO);
        switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
@@ -1310,7 +1310,7 @@ static switch_status_t channel_waitfor_read(switch_core_session_t *session, int
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -1320,7 +1320,7 @@ static switch_status_t channel_waitfor_write(switch_core_session_t *session, int
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 
@@ -1331,7 +1331,7 @@ static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *d
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "DTMF [%s]\n", dtmf);
 
@@ -1346,10 +1346,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
        int payload = 0;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (struct private_object *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
                if (switch_channel_ready(channel)) {
@@ -1376,7 +1376,7 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
        if (switch_test_flag(tech_pvt, TFLAG_IO)) {
                switch_status_t status;
 
-               assert(tech_pvt->rtp_session != NULL);
+               switch_assert(tech_pvt->rtp_session != NULL);
                tech_pvt->read_frame.datalen = 0;
 
 
@@ -1448,10 +1448,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
        int bytes = 0, samples = 0, frames = 0;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (struct private_object *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
                if (switch_channel_ready(channel)) {
@@ -1496,10 +1496,10 @@ static switch_status_t channel_answer_channel(switch_core_session_t *session)
        switch_channel_t *channel = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
                switch_set_flag_locked(tech_pvt, TFLAG_ANSWER);
@@ -1515,10 +1515,10 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
        struct private_object *tech_pvt;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch (msg->message_id) {
        case SWITCH_MESSAGE_INDICATE_ANSWER:
@@ -1556,10 +1556,10 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
        char *subject, *body;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
 
        if (!(body = switch_event_get_body(event))) {
@@ -2340,7 +2340,7 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
        ldl_status status = LDL_STATUS_SUCCESS;
        char *sql;
 
-       assert(handle != NULL);
+       switch_assert(handle != NULL);
 
        if (!(profile = ldl_handle_get_private(handle))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "ERROR NO PROFILE!\n");
@@ -2549,10 +2549,10 @@ static ldl_status handle_signalling(ldl_handle_t * handle, ldl_session_t * dlses
 
        if ((session = ldl_session_get_private(dlsession))) {
                tech_pvt = switch_core_session_get_private(session);
-               assert(tech_pvt != NULL);
+               switch_assert(tech_pvt != NULL);
 
                channel = switch_core_session_get_channel(session);
-               assert(channel != NULL);
+               switch_assert(channel != NULL);
 
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "using Existing session for %s\n", ldl_session_get_id(dlsession));
 
index d4cfe5676a7d645359ab01f83df65d6b7049ba12..40d5cecaaa8f6bb8de44cef8338768e1432ecf2c 100644 (file)
@@ -338,7 +338,7 @@ static switch_status_t iax_set_codec(private_t * tech_pvt, struct iax_session *i
        }
 
        channel = switch_core_session_get_channel(tech_pvt->session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
 
        if (tech_pvt->samprate || *samprate) {
@@ -459,10 +459,10 @@ static switch_status_t channel_on_init(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
 
        iax_set_private(tech_pvt->iax_session, tech_pvt);
@@ -488,10 +488,10 @@ static switch_status_t channel_on_ring(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
 
@@ -505,10 +505,10 @@ static switch_status_t channel_on_execute(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL EXECUTE\n", switch_channel_get_name(channel));
 
@@ -522,10 +522,10 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_clear_flag_locked(tech_pvt, TFLAG_IO);
        switch_clear_flag_locked(tech_pvt, TFLAG_VOICE);
@@ -564,10 +564,10 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch (sig) {
        case SWITCH_SIG_KILL:
@@ -603,7 +603,7 @@ static switch_status_t channel_waitfor_read(switch_core_session_t *session, int
        private_t *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -613,7 +613,7 @@ static switch_status_t channel_waitfor_write(switch_core_session_t *session, int
        private_t *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 
@@ -625,7 +625,7 @@ static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *d
        char *digit;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
        if (tech_pvt->iax_session) {
                for (digit = dtmf; *digit; digit++) {
                        iax_send_dtmf(tech_pvt->iax_session, *digit);
@@ -644,10 +644,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
        switch_byte_t *data;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
        tech_pvt->read_frame.flags = SFF_NONE;
        *frame = NULL;
 
@@ -713,10 +713,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
        //switch_frame_t *pframe;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!switch_test_flag(tech_pvt, TFLAG_IO)) {
                return SWITCH_STATUS_FALSE;
@@ -739,10 +739,10 @@ static switch_status_t channel_answer_channel(switch_core_session_t *session)
        switch_channel_t *channel = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!switch_test_flag(tech_pvt, TFLAG_OUTBOUND)) {
                iax_answer(tech_pvt->iax_session);
@@ -757,10 +757,10 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
        private_t *tech_pvt;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
                        
        tech_pvt = (private_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch (msg->message_id) {
        case SWITCH_MESSAGE_INDICATE_REJECT:
@@ -857,10 +857,10 @@ static switch_status_t channel_receive_event(switch_core_session_t *session, swi
        char *body;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
 
        if (!(body = switch_event_get_body(event))) {
index 6fd18e17e228ac7d92e4828977828cdddfffddc6..64bb70029fd665cf19f1dd420f342c5fc107aa33 100644 (file)
@@ -174,10 +174,10 @@ static switch_status_t channel_on_init(switch_core_session_t *session)
        int16_t abuf[2048];
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
 
        last = switch_timestamp_now() - waitsec;
@@ -306,10 +306,10 @@ static switch_status_t channel_on_ring(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL RING\n", switch_channel_get_name(channel));
 
@@ -323,10 +323,10 @@ static switch_status_t channel_on_execute(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s CHANNEL EXECUTE\n", switch_channel_get_name(channel));
 
@@ -433,10 +433,10 @@ static switch_status_t channel_on_hangup(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        remove_pvt(tech_pvt);
 
@@ -461,10 +461,10 @@ static switch_status_t channel_kill_channel(switch_core_session_t *session, int
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch (sig) {
        case SWITCH_SIG_KILL:
@@ -492,10 +492,10 @@ static switch_status_t channel_on_loopback(switch_core_session_t *session)
        private_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "CHANNEL LOOPBACK\n");
 
@@ -508,7 +508,7 @@ static switch_status_t channel_waitfor_read(switch_core_session_t *session, int
        private_t *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -518,7 +518,7 @@ static switch_status_t channel_waitfor_write(switch_core_session_t *session, int
        private_t *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 
@@ -529,7 +529,7 @@ static switch_status_t channel_send_dtmf(switch_core_session_t *session, char *d
        private_t *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "DTMF ON CALL %s [%s]\n", tech_pvt->call_id, dtmf);
 
@@ -544,10 +544,10 @@ static switch_status_t channel_read_frame(switch_core_session_t *session, switch
        switch_status_t status = SWITCH_STATUS_FALSE;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!globals.audio_stream) {
                return SWITCH_STATUS_FALSE;
@@ -646,10 +646,10 @@ static switch_status_t channel_write_frame(switch_core_session_t *session, switc
        private_t *tech_pvt = NULL;
        switch_status_t status = SWITCH_STATUS_FALSE;
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!globals.audio_stream) {
                return SWITCH_STATUS_FALSE;
@@ -681,10 +681,10 @@ static switch_status_t channel_answer_channel(switch_core_session_t *session)
        switch_channel_t *channel = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -695,10 +695,10 @@ static switch_status_t channel_receive_message(switch_core_session_t *session, s
        private_t *tech_pvt;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
 
        switch (msg->message_id) {
index 630ca77e29843b5fb1e3e16a77ffb61407189df4..848e1dcd6af4e13985d2dc17c969bc07af3ebc21 100644 (file)
@@ -77,10 +77,10 @@ static switch_status_t sofia_on_init(switch_core_session_t *session)
        private_object_t *tech_pvt;
        
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        tech_pvt->read_frame.buflen = SWITCH_RTP_MAX_BUF_LEN;
 
@@ -107,10 +107,10 @@ static switch_status_t sofia_on_ring(switch_core_session_t *session)
        private_object_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SOFIA RING\n");
 
@@ -123,10 +123,10 @@ static switch_status_t sofia_on_execute(switch_core_session_t *session)
        private_object_t *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "SOFIA EXECUTE\n");
 
@@ -197,10 +197,10 @@ switch_status_t sofia_on_hangup(switch_core_session_t *session)
        int sip_cause;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        cause = switch_channel_get_cause(channel);
        sip_cause = hangup_cause_to_sip(cause);
@@ -269,10 +269,10 @@ static switch_status_t sofia_answer_channel(switch_core_session_t *session)
        uint32_t session_timeout = 0;
        const char *val;
 
-       assert(session != NULL);
+       switch_assert(session != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
 
@@ -348,10 +348,10 @@ static switch_status_t sofia_read_video_frame(switch_core_session_t *session, sw
        int payload = 0;
        
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (switch_test_flag(tech_pvt, TFLAG_HUP)) {
                return SWITCH_STATUS_FALSE;
@@ -376,7 +376,7 @@ static switch_status_t sofia_read_video_frame(switch_core_session_t *session, sw
                        return SWITCH_STATUS_GENERR;
                }
 
-               assert(tech_pvt->rtp_session != NULL);
+               switch_assert(tech_pvt->rtp_session != NULL);
                tech_pvt->video_read_frame.datalen = 0;
 
                while (switch_test_flag(tech_pvt, TFLAG_IO) && tech_pvt->video_read_frame.datalen == 0) {
@@ -415,10 +415,10 @@ static switch_status_t sofia_write_video_frame(switch_core_session_t *session, s
        switch_status_t status = SWITCH_STATUS_SUCCESS;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        while (!(tech_pvt->video_read_codec.implementation && switch_rtp_ready(tech_pvt->video_rtp_session))) {
                if (switch_channel_ready(channel)) {
@@ -455,10 +455,10 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
        int payload = 0;
        
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (switch_test_flag(tech_pvt, TFLAG_HUP)) {
                return SWITCH_STATUS_FALSE;
@@ -482,7 +482,7 @@ static switch_status_t sofia_read_frame(switch_core_session_t *session, switch_f
                        return SWITCH_STATUS_GENERR;
                }
 
-               assert(tech_pvt->rtp_session != NULL);
+               switch_assert(tech_pvt->rtp_session != NULL);
                tech_pvt->read_frame.datalen = 0;
 
 
@@ -541,10 +541,10 @@ static switch_status_t sofia_write_frame(switch_core_session_t *session, switch_
        int bytes = 0, samples = 0, frames = 0;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        while (!(tech_pvt->read_codec.implementation && switch_rtp_ready(tech_pvt->rtp_session))) {
                if (switch_channel_ready(channel)) {
@@ -593,10 +593,10 @@ static switch_status_t sofia_kill_channel(switch_core_session_t *session, int si
        switch_channel_t *channel = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
 
        switch (sig) {
@@ -630,10 +630,10 @@ static switch_status_t sofia_waitfor_read(switch_core_session_t *session, int ms
        switch_channel_t *channel = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -644,10 +644,10 @@ static switch_status_t sofia_waitfor_write(switch_core_session_t *session, int m
        switch_channel_t *channel = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 }
@@ -657,7 +657,7 @@ static switch_status_t sofia_send_dtmf(switch_core_session_t *session, char *dig
        private_object_t *tech_pvt;
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return switch_rtp_queue_rfc2833(tech_pvt->rtp_session,
                                                                        digits, tech_pvt->profile->dtmf_duration * (tech_pvt->read_codec.implementation->samples_per_second / 1000));
@@ -670,10 +670,10 @@ static switch_status_t sofia_receive_message(switch_core_session_t *session, swi
        switch_status_t status;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch (msg->message_id) {
        case SWITCH_MESSAGE_INDICATE_BROADCAST: {
@@ -937,10 +937,10 @@ static switch_status_t sofia_receive_event(switch_core_session_t *session, switc
        nua_handle_t *msg_nh;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!(body = switch_event_get_body(event))) {
                body = "";
@@ -1018,7 +1018,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
                }
                if (!strcasecmp(argv[0], "gateway")) {
                        if ((gp = sofia_reg_find_gateway(argv[1]))) {
-                               assert(gp->state < REG_STATE_LAST);
+                               switch_assert(gp->state < REG_STATE_LAST);
                                
                                stream->write_function(stream, "%s\n", line);
                                stream->write_function(stream, "Name    \t%s\n", switch_str_nil(gp->name));
@@ -1106,7 +1106,7 @@ static switch_status_t cmd_status(char **argv, int argc, switch_stream_handle_t
                                c++;
 
                                for (gp = profile->gateways; gp; gp = gp->next) {
-                                       assert(gp->state < REG_STATE_LAST);
+                                       switch_assert(gp->state < REG_STATE_LAST);
                                        stream->write_function(stream, "%25s\t%s\t  %32s\t%s", gp->name, "gateway", gp->register_to, sofia_state_names[gp->state]);
                                        if (gp->state == REG_STATE_FAILED || gp->state == REG_STATE_TRYING) {
                                                stream->write_function(stream, " (retry: %ds)", gp->retry - time(NULL));
@@ -1278,7 +1278,7 @@ SWITCH_STANDARD_API(sofia_contact_function)
        }
 
        data = strdup(cmd);
-       assert(data);
+       switch_assert(data);
 
        if ((p = strchr(data, '/'))) {
                profile_name = data;
@@ -1321,7 +1321,7 @@ SWITCH_STANDARD_API(sofia_contact_function)
                        cb.stream = &mystream;
                        
                        sql = switch_mprintf("select contact from sip_registrations where sip_user='%q' and sip_host='%q'", user, domain);
-                       assert(sql);
+                       switch_assert(sql);
                        sofia_glue_execute_sql_callback(profile, SWITCH_FALSE, profile->ireg_mutex, sql, contact_callback, &cb);
                        switch_safe_free(sql);
                        if (mystream.data) {
@@ -1591,7 +1591,7 @@ static switch_call_cause_t sofia_outgoing_channel(switch_core_session_t *session
                         */
                        private_object_t *ctech_pvt;
                        ctech_pvt = switch_core_session_get_private(session);
-                       assert(ctech_pvt != NULL);
+                       switch_assert(ctech_pvt != NULL);
                        tech_pvt->bte = ctech_pvt->te;
                        tech_pvt->bcng_pt = ctech_pvt->cng_pt;
                }
index ec25753006352299d9c9359c7eea49a6878536c4..2cbc6c60a73c5676336d319a4c5dc4c95502c003 100644 (file)
@@ -66,7 +66,7 @@ void sofia_handle_sip_i_notify(switch_core_session_t *session, int status,
        }
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
        if (!switch_channel_test_flag(channel, CF_OUTBOUND)) {
                switch_channel_answer(channel);
                switch_channel_set_variable(channel, "auto_answer_destination", switch_channel_get_variable(channel, "destination_number"));
@@ -709,7 +709,7 @@ static void parse_gateways(sofia_profile_t *profile, switch_xml_t gateways_tag)
                }
 
        skip:
-               assert(gateway_tag);
+               switch_assert(gateway_tag);
        }
 
 }
@@ -1135,11 +1135,11 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
        if (session) {
                channel = switch_core_session_get_channel(session);
-               assert(channel != NULL);
+               switch_assert(channel != NULL);
 
                tech_pvt = switch_core_session_get_private(session);
-               assert(tech_pvt != NULL);
-               assert(tech_pvt->nh != NULL);
+               switch_assert(tech_pvt != NULL);
+               switch_assert(tech_pvt->nh != NULL);
 
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Channel %s entering state [%s]\n",
                                                  switch_channel_get_name(channel), nua_callstate_name(ss_state));
@@ -1256,7 +1256,7 @@ static void sofia_handle_sip_i_state(switch_core_session_t *session, int status,
 
                                                if (replaces_str) {
                                                        home = su_home_new(sizeof(*home));
-                                                       assert(home != NULL);
+                                                       switch_assert(home != NULL);
                                                        if ((replaces = sip_replaces_make(home, replaces_str))
                                                                && (bnh = nua_handle_by_replaces(nua, replaces))) {
                                                                sofia_private_t *b_private;
@@ -1547,7 +1547,7 @@ void sofia_handle_sip_i_refer(nua_t *nua, sofia_profile_t *profile, nua_handle_t
                                }
                                
                                home = su_home_new(sizeof(*home));
-                               assert(home != NULL);
+                               switch_assert(home != NULL);
 
                                if ((replaces = sip_replaces_make(home, rep))
                                        && (bnh = nua_handle_by_replaces(nua, replaces))) {
@@ -1764,13 +1764,13 @@ void sofia_handle_sip_i_info(nua_t *nua, sofia_profile_t *profile, nua_handle_t
        channel = switch_core_session_get_channel(session);
 
        /* Barf if we didn't get it */
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        /* make sure we have our privates */
        tech_pvt = switch_core_session_get_private(session);
 
        /* Barf if we didn't get it */
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        /* move signal_ptr where we need it (right past Signal=) */
        signal_ptr = signal_ptr + 7;
index 142a7c6a6378b95cc288b702d5c0d16bfb39bf38..f66c53448df02a77d2509bcb563edcf8ac0e6a89 100644 (file)
@@ -269,7 +269,7 @@ void sofia_glue_tech_prepare_codecs(private_object_t *tech_pvt)
                goto end;
        }
 
-       assert(tech_pvt->session != NULL);
+       switch_assert(tech_pvt->session != NULL);
 
        if ((abs = switch_channel_get_variable(tech_pvt->channel, "absolute_codec_string"))) {
                codec_string = abs;
@@ -327,9 +327,9 @@ void sofia_glue_attach_private(switch_core_session_t *session, sofia_profile_t *
 {
        char name[256];
 
-       assert(session != NULL);
-       assert(profile != NULL);
-       assert(tech_pvt != NULL);
+       switch_assert(session != NULL);
+       switch_assert(profile != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_core_session_add_stream(session, NULL);
 
@@ -502,12 +502,12 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
        const char *rep;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        rep = switch_channel_get_variable(channel, SOFIA_REPLACES_HEADER);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_clear_flag_locked(tech_pvt, TFLAG_SDP);
 
@@ -654,7 +654,7 @@ switch_status_t sofia_glue_do_invite(switch_core_session_t *session)
                char hash_key[256] = "";
 
                e_dest = strdup(tech_pvt->e_dest);
-               assert(e_dest != NULL);
+               switch_assert(e_dest != NULL);
                user = e_dest;
                
                if ((host = strchr(user, '@'))) {
@@ -722,10 +722,10 @@ void sofia_glue_do_xfer_invite(switch_core_session_t *session)
        switch_caller_profile_t *caller_profile;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = (private_object_t *) switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        caller_profile = switch_channel_get_caller_profile(channel);
 
@@ -940,7 +940,7 @@ switch_status_t sofia_glue_activate_rtp(private_object_t *tech_pvt, switch_rtp_f
        char tmp[50];
        uint32_t rtp_timeout_sec = tech_pvt->profile->rtp_timeout_sec;
        
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
 
        if (switch_channel_test_flag(tech_pvt->channel, CF_BYPASS_MEDIA)) {
@@ -1134,8 +1134,8 @@ switch_status_t sofia_glue_tech_media(private_object_t *tech_pvt, const char *r_
        sdp_session_t *sdp;
        uint8_t match = 0;
 
-       assert(tech_pvt != NULL);
-       assert(r_sdp != NULL);
+       switch_assert(tech_pvt != NULL);
+       switch_assert(r_sdp != NULL);
 
        parser = sdp_parse(NULL, r_sdp, (int) strlen(r_sdp), 0);
 
@@ -1184,10 +1184,10 @@ uint8_t sofia_glue_negotiate_sdp(switch_core_session_t *session, sdp_session_t *
        const char *val;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
        
        greedy = !!(tech_pvt->profile->pflags & PFLAG_GREEDY);
        
@@ -1556,7 +1556,7 @@ void sofia_glue_pass_sdp(private_object_t *tech_pvt, char *sdp)
        if ((val = switch_channel_get_variable(tech_pvt->channel, SWITCH_SIGNAL_BOND_VARIABLE))
                && (other_session = switch_core_session_locate(val))) {
                other_channel = switch_core_session_get_channel(other_session);
-               assert(other_channel != NULL);
+               switch_assert(other_channel != NULL);
                switch_channel_set_variable(other_channel, SWITCH_B_SDP_VARIABLE, sdp);
 
                if (!switch_test_flag(tech_pvt, TFLAG_CHANGE_MEDIA) && (switch_channel_test_flag(other_channel, CF_OUTBOUND) &&
index dd943552e5c4dfe7978e9c99f8c62f13226e0467..5f7d9f967c4fcedd36293deed42a0d08004cd9da 100644 (file)
@@ -53,7 +53,7 @@ switch_status_t sofia_presence_chat_send(char *proto, char *from, char *to, char
        }
 
        user = strdup(to);
-       assert(user);
+       switch_assert(user);
 
        if ((host = strchr(user, '@'))) {
                *host++ = '\0';
@@ -183,7 +183,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
        switch_stream_handle_t stream = { 0 };
        switch_event_header_t *hp;
 
-       assert(event != NULL);
+       switch_assert(event != NULL);
 
        if (!(account = switch_event_get_header(event, "mwi-message-account"))) {
                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Missing required Header 'MWI-Message-Account'\n");
@@ -196,7 +196,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
        }
 
        dup_account = strdup(account);
-       assert(dup_account != NULL);
+       switch_assert(dup_account != NULL);
        sofia_glue_get_user_host(dup_account, &user, &host);
 
        if (!host || !(profile = sofia_glue_find_profile(host))) {
@@ -226,7 +226,7 @@ void sofia_presence_mwi_event_handler(switch_event_t *event)
        
        switch_safe_free(stream.data);
 
-       assert (sql != NULL);
+       switch_assert (sql != NULL);
        sofia_glue_execute_sql_callback(profile,
                                                                        SWITCH_FALSE,
                                                                        profile->ireg_mutex,
@@ -292,7 +292,7 @@ void sofia_presence_event_handler(switch_event_t *event)
                        sql = switch_mprintf("select *,1,'%q','%q' from sip_subscriptions where event='presence'", status, rpid);
                }
 
-               assert(sql != NULL);
+               switch_assert(sql != NULL);
                switch_mutex_lock(mod_sofia_globals.hash_mutex);
                for (hi = switch_hash_first(NULL, mod_sofia_globals.profile_hash); hi; hi = switch_hash_next(hi)) {
                        switch_hash_this(hi, NULL, NULL, &val);
@@ -792,7 +792,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
                                                         to_host, event
                                                         );
 
-               assert(sql != NULL);
+               switch_assert(sql != NULL);
                sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, NULL);
                free(sql);
 
@@ -803,7 +803,7 @@ void sofia_presence_handle_sip_i_subscribe(int status,
                        sql = switch_mprintf("insert into sip_subscriptions values ('%q','%q','%q','%q','%q','%q','%q','%q','%q','%q',%ld)",
                                                                 proto, from_user, from_host, to_user, to_host, event, contact_str, call_id, full_from, full_via, exp);
                        
-                       assert(sql != NULL);
+                       switch_assert(sql != NULL);
                        sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, NULL);
                        free(sql);
 
@@ -1081,7 +1081,7 @@ void sofia_presence_set_chat_hash(private_object_t *tech_pvt, sip_t const *sip)
 
        if (sofia_reg_find_reg_url(tech_pvt->profile, sip->sip_from->a_url->url_user, sip->sip_from->a_url->url_host, buf, sizeof(buf))) {
                home = su_home_new(sizeof(*home));
-               assert(home != NULL);           
+               switch_assert(home != NULL);            
                tech_pvt->chat_from = sip_header_as_string(home, (const sip_header_t *) sip->sip_to);
                tech_pvt->chat_to = switch_core_session_strdup(tech_pvt->session, buf);
                sofia_presence_set_hash_key(hash_key, sizeof(hash_key), sip);
index 9bd7c94fd2457f9bf3d11f95da5510b9aaf80e3e..daa113fb7bb4e5ce68699e07e6110e30fca77028 100644 (file)
@@ -303,7 +303,7 @@ void sofia_reg_auth_challange(nua_t *nua, sofia_profile_t *profile, nua_handle_t
        switch_mutex_lock(profile->ireg_mutex);
        sql = switch_mprintf("insert into sip_authentication (nonce, expires) values('%q', %ld)",
                                                 uuid_str, time(NULL) + profile->nonce_ttl);
-       assert(sql != NULL);
+       switch_assert(sql != NULL);
        sofia_glue_execute_sql(profile, SWITCH_FALSE, sql, NULL);
        switch_safe_free(sql);
        switch_mutex_unlock(profile->ireg_mutex);
@@ -346,7 +346,7 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han
        const char *call_id = NULL;
 
        /* all callers must confirm that sip, sip->sip_request and sip->sip_contact are not NULL */
-       assert(sip != NULL && sip->sip_contact != NULL && sip->sip_request != NULL);
+       switch_assert(sip != NULL && sip->sip_contact != NULL && sip->sip_request != NULL);
 
        get_addr(network_ip, sizeof(network_ip), &((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_addr);
        network_port = ntohs(((struct sockaddr_in *) msg_addrinfo(nua_current_request(nua))->ai_addr)->sin_port);
@@ -475,7 +475,7 @@ uint8_t sofia_reg_handle_register(nua_t * nua, sofia_profile_t *profile, nua_han
        }
 
        call_id = sip->sip_call_id->i_id; //sip_header_as_string(profile->home, (void *) sip->sip_call_id);
-       assert(call_id);
+       switch_assert(call_id);
 
        
        if (exptime) {
@@ -810,7 +810,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
        if (switch_strlen_zero(np)) {
                first = 1;
                sql = switch_mprintf("select nonce from sip_authentication where nonce='%q'", nonce);
-               assert(sql != NULL);
+               switch_assert(sql != NULL);
                if (!sofia_glue_execute_sql2str(profile, profile->ireg_mutex, sql, np, nplen)) {
                        free(sql);
                        ret = AUTH_STALE;
@@ -992,7 +992,7 @@ auth_res_t sofia_reg_parse_auth(sofia_profile_t *profile, sip_authorization_t co
                                                                        char *mydata, *argv[50];
 
                                                                        mydata = strdup(val);
-                                                                       assert(mydata != NULL);
+                                                                       switch_assert(mydata != NULL);
                                                                
                                                                        argc = switch_separate_string(mydata, ',', argv, (sizeof(argv) / sizeof(argv[0])));
 
index 8547397e1786189fe7b9f5d2febe50323beaed76..345ec8c192142512c262c5f189b5a3de3716be95 100644 (file)
@@ -205,10 +205,10 @@ static switch_status_t woomera_on_init(switch_core_session_t *session)
        int rate = 8000;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt->frame.data = tech_pvt->databuf;
 
@@ -248,10 +248,10 @@ static switch_status_t woomera_on_ring(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s WOOMERA RING\n", switch_channel_get_name(channel));
 
@@ -265,10 +265,10 @@ static switch_status_t woomera_on_execute(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "%s WOOMERA EXECUTE\n", switch_channel_get_name(channel));
 
@@ -282,10 +282,10 @@ static switch_status_t woomera_on_hangup(switch_core_session_t *session)
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        switch_core_codec_destroy(&tech_pvt->read_codec);
        switch_core_codec_destroy(&tech_pvt->write_codec);
@@ -320,10 +320,10 @@ static switch_status_t woomera_kill_channel(switch_core_session_t *session, int
        struct private_object *tech_pvt = NULL;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!tech_pvt->udp_socket) {
                return SWITCH_STATUS_FALSE;
@@ -366,7 +366,7 @@ static switch_status_t woomera_waitfor_read(switch_core_session_t *session, int
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return switch_socket_waitfor(tech_pvt->read_poll, ms) ? SWITCH_STATUS_FALSE : SWITCH_STATUS_SUCCESS;
 }
@@ -376,7 +376,7 @@ static switch_status_t woomera_waitfor_write(switch_core_session_t *session, int
        struct private_object *tech_pvt = NULL;
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        return SWITCH_STATUS_SUCCESS;
 //  return switch_socket_waitfor(tech_pvt->write_poll, ms);
@@ -390,10 +390,10 @@ static switch_status_t woomera_read_frame(switch_core_session_t *session, switch
        switch_size_t len;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        for(;;) {
                if (switch_test_flag(tech_pvt, TFLAG_ABORT) || !tech_pvt->udp_socket) {
@@ -436,10 +436,10 @@ static switch_status_t woomera_write_frame(switch_core_session_t *session, switc
        //switch_frame_t *pframe;
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
        
        if (switch_test_flag(tech_pvt, TFLAG_ABORT) || !tech_pvt->udp_socket) {
                return SWITCH_STATUS_GENERR;
@@ -953,13 +953,13 @@ static void *woomera_channel_thread_run(switch_thread_t * thread, void *obj)
        woomera_message wmsg;
        int res = 0;
 
-       assert(session != NULL);
+       switch_assert(session != NULL);
 
        channel = switch_core_session_get_channel(session);
-       assert(channel != NULL);
+       switch_assert(channel != NULL);
 
        tech_pvt = switch_core_session_get_private(session);
-       assert(tech_pvt != NULL);
+       switch_assert(tech_pvt != NULL);
 
        if (!tech_pvt->udp_socket) {
                tech_create_read_socket(tech_pvt);