[asterisk-commits] mattf: trunk r89067 - /trunk/channels/chan_zap.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Nov 6 16:01:10 CST 2007


Author: mattf
Date: Tue Nov  6 16:01:10 2007
New Revision: 89067

URL: http://svn.digium.com/view/asterisk?view=rev&rev=89067
Log:
Add some more locking as well as API update for libss7 for new transport types

Modified:
    trunk/channels/chan_zap.c

Modified: trunk/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/trunk/channels/chan_zap.c?view=diff&rev=89067&r1=89066&r2=89067
==============================================================================
--- trunk/channels/chan_zap.c (original)
+++ trunk/channels/chan_zap.c Tue Nov  6 16:01:10 2007
@@ -8683,10 +8683,15 @@
 				}
 			}
 
-			if (pollers[i].revents & POLLIN)
+			if (pollers[i].revents & POLLIN) {
+				ast_mutex_lock(&linkset->lock);
 				res = ss7_read(ss7, pollers[i].fd);
+				ast_mutex_unlock(&linkset->lock);
+			}
 			if (pollers[i].revents & POLLOUT) {
+				ast_mutex_lock(&linkset->lock);
 				res = ss7_write(ss7, pollers[i].fd);
+				ast_mutex_unlock(&linkset->lock);
 				if (res < 0) {
 					ast_log(LOG_ERROR, "Error in write %s", strerror(errno));
 				}
@@ -11771,7 +11776,7 @@
 			return -1;
 		}
 
-		ss7_add_link(link->ss7, link->fds[curfd]);
+		ss7_add_link(link->ss7, SS7_TRANSPORT_ZAP, link->fds[curfd]);
 		link->numsigchans++;
 
 		memset(&si, 0, sizeof(si));




More information about the asterisk-commits mailing list