[Freeswitch-svn] [commit] r6714 - in freeswitch/trunk/src/mod/endpoints: mod_dingaling mod_iax mod_portaudio mod_sofia mod_woomera

Freeswitch SVN mikej at freeswitch.org
Wed Dec 12 18:21:45 EST 2007


Author: mikej
Date: Wed Dec 12 18:21:45 2007
New Revision: 6714

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
   freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
   freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
   freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c

Log:
use switch_assert macro instead of just assert.

Modified: freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_dingaling/mod_dingaling.c	Wed Dec 12 18:21:45 2007
@@ -505,7 +505,7 @@
 	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 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 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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 
 	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));
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_iax/mod_iax.c	Wed Dec 12 18:21:45 2007
@@ -338,7 +338,7 @@
 	}
 
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	//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 @@
 	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 @@
 	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 @@
 	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))) {

Modified: freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_portaudio/mod_portaudio.c	Wed Dec 12 18:21:45 2007
@@ -174,10 +174,10 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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) {

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/mod_sofia.c	Wed Dec 12 18:21:45 2007
@@ -77,10 +77,10 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 			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 @@
 	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 @@
 	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 @@
 			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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 		}
 		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 @@
 				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 @@
 	}
 
 	data = strdup(cmd);
-	assert(data);
+	switch_assert(data);
 
 	if ((p = strchr(data, '/'))) {
 		profile_name = data;
@@ -1321,7 +1321,7 @@
 			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 @@
 			 */
 			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;
 		}

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Wed Dec 12 18:21:45 2007
@@ -66,7 +66,7 @@
 	}
 
 	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 @@
 		}
 
 	skip:
-		assert(gateway_tag);
+		switch_assert(gateway_tag);
 	}
 
 }
@@ -1135,11 +1135,11 @@
 
 	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 @@
 
 						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 @@
 				}
 				
 				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 @@
 	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;

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c	Wed Dec 12 18:21:45 2007
@@ -269,7 +269,7 @@
 		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 @@
 {
 	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 @@
 	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 @@
 		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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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) &&

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_presence.c	Wed Dec 12 18:21:45 2007
@@ -53,7 +53,7 @@
 	}
 
 	user = strdup(to);
-	assert(user);
+	switch_assert(user);
 
 	if ((host = strchr(user, '@'))) {
 		*host++ = '\0';
@@ -183,7 +183,7 @@
 	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 @@
 	}
 
 	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 @@
 	
 	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 @@
 			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 @@
 							 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 @@
 			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 @@
 
 	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);

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_reg.c	Wed Dec 12 18:21:45 2007
@@ -303,7 +303,7 @@
 	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 @@
 	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 @@
 	}
 
 	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 @@
 	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 @@
 									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])));
 

Modified: freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_woomera/mod_woomera.c	Wed Dec 12 18:21:45 2007
@@ -205,10 +205,10 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	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 @@
 	//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 @@
 	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);



More information about the Freeswitch-svn mailing list