[Freeswitch-svn] [commit] r4949 - freeswitch/trunk/src/mod/endpoints/mod_wanpipe

Freeswitch SVN anthm at freeswitch.org
Mon Apr 16 16:26:21 EDT 2007


Author: anthm
Date: Mon Apr 16 16:26:21 2007
New Revision: 4949

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c

Log:
...

Modified: freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_wanpipe/mod_wanpipe.c	Mon Apr 16 16:26:21 2007
@@ -306,7 +306,7 @@
 }
 
 
-static wpsock_t *wp_open(private_object_t *tech_pvt, int span, int chan)
+static wpsock_t *wp_open(int span, int chan)
 {
 	sng_fd_t fd;
 	wpsock_t *sock;
@@ -1110,7 +1110,7 @@
 		int chan, span;
 
 		if (sangoma_span_chan_fromif(bchan, &span, &chan)) {
-			if (!wp_open(tech_pvt, span, chan)) {
+			if (!(tech_pvt->wpsock = wp_open(span, chan))) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd for s%dc%d! [%s]\n", span, chan, strerror(errno));
 				switch_core_session_destroy(new_session);
 				cause = SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER;
@@ -1206,7 +1206,7 @@
 				goto error;
 			}
 
-			if (!wp_open(tech_pvt, spri->span, callno)) {
+			if (!(tech_pvt->wpsock = wp_open(spri->span, callno))) {
 				switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
 				switch_core_session_destroy(new_session);
 				pri_sr_free(sr);
@@ -1511,7 +1511,7 @@
 		tech_pvt->callno = pevent->ring.channel;
 		tech_pvt->span = spri->span;
 
-		if (!wp_open(tech_pvt, spri->span, pevent->ring.channel)) {
+		if (!(tech_pvt->wpsock = wp_open(spri->span, pevent->ring.channel))) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd!\n");
 		}
 
@@ -1801,7 +1801,7 @@
 		tech_pvt->boost_chan_number = event->chan;
 		tech_pvt->boost_pres = event->calling_number_presentation;
 		
-		if (!wp_open(tech_pvt, event->span+1, event->chan+1)) {
+		if (!(tech_pvt->wpsock = wp_open(event->span+1, event->chan+1))) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open channel %d:%d\n", event->span+1, event->chan+1);
 			goto fail;
 		}
@@ -1879,7 +1879,7 @@
 
 
 			if (!tech_pvt->wpsock) {
-				if (!wp_open(tech_pvt, tech_pvt->boost_span_number+1, tech_pvt->boost_chan_number+1)) {
+				if (!(tech_pvt->wpsock = wp_open(tech_pvt->boost_span_number+1, tech_pvt->boost_chan_number+1))) {
 					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd for s%dc%d! [%s]\n", 
 									  tech_pvt->boost_span_number+1, tech_pvt->boost_chan_number+1, strerror(errno));
 					switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
@@ -1922,7 +1922,7 @@
 			assert(tech_pvt != NULL);
 
 			if (!tech_pvt->wpsock) {
-				if (!wp_open(tech_pvt, tech_pvt->boost_span_number+1, tech_pvt->boost_chan_number+1)) {
+				if (!(tech_pvt->wpsock=wp_open(tech_pvt->boost_span_number+1, tech_pvt->boost_chan_number+1))) {
 					switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Can't open fd for s%dc%d! [%s]\n", 
 									  tech_pvt->boost_span_number+1, tech_pvt->boost_chan_number+1, strerror(errno));
 					switch_channel_hangup(channel, SWITCH_CAUSE_DESTINATION_OUT_OF_ORDER);
@@ -2247,7 +2247,7 @@
 			continue;
 		}
 		
-		if (!(sock = wp_open(NULL, span, chan))) {
+		if (!(sock = wp_open(span, chan))) {
 			switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot open device '%s' (%s)\n", c_dev, strerror(errno));
 			continue;
 		}



More information about the Freeswitch-svn mailing list