[asterisk-commits] juggie: branch juggie/NoLossCDR r78414 - in /team/juggie/NoLossCDR: ./ channels/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 7 13:56:35 CDT 2007


Author: juggie
Date: Tue Aug  7 13:56:35 2007
New Revision: 78414

URL: http://svn.digium.com/view/asterisk?view=rev&rev=78414
Log:
Merged revisions 78383 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/team/group/CDRfix5

........
r78383 | automerge | 2007-08-07 14:28:50 -0400 (Tue, 07 Aug 2007) | 1 line

automerge commit
........

Modified:
    team/juggie/NoLossCDR/   (props changed)
    team/juggie/NoLossCDR/channels/chan_skinny.c
    team/juggie/NoLossCDR/channels/chan_zap.c

Propchange: team/juggie/NoLossCDR/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Propchange: team/juggie/NoLossCDR/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Tue Aug  7 13:56:35 2007
@@ -1,1 +1,1 @@
-/team/group/CDRfix5:1-78372
+/team/group/CDRfix5:1-78412

Modified: team/juggie/NoLossCDR/channels/chan_skinny.c
URL: http://svn.digium.com/view/asterisk/team/juggie/NoLossCDR/channels/chan_skinny.c?view=diff&rev=78414&r1=78413&r2=78414
==============================================================================
--- team/juggie/NoLossCDR/channels/chan_skinny.c (original)
+++ team/juggie/NoLossCDR/channels/chan_skinny.c Tue Aug  7 13:56:35 2007
@@ -221,9 +221,11 @@
 	} payloads;
 };
 
+#define SKINNY_MAX_CAPABILITIES 18
+
 struct capabilities_res_message {
 	uint32_t count;
-	struct station_capabilities caps[18];
+	struct station_capabilities caps[SKINNY_MAX_CAPABILITIES];
 };
 
 #define SPEED_DIAL_STAT_REQ_MESSAGE 0x000A
@@ -3746,11 +3748,15 @@
 {
 	struct skinny_device *d = s->device;
 	struct skinny_line *l;
-	int count = 0;
+	uint32_t count = 0;
 	int codecs = 0;
 	int i;
 
 	count = letohl(req->data.caps.count);
+	if (count > SKINNY_MAX_CAPABILITIES) {
+		count = SKINNY_MAX_CAPABILITIES;
+		ast_log(LOG_WARNING, "Received more capabilities than we can handle (%d).  Ignoring the rest.\n", SKINNY_MAX_CAPABILITIES);
+	}
 
 	for (i = 0; i < count; i++) {
 		int acodec = 0;

Modified: team/juggie/NoLossCDR/channels/chan_zap.c
URL: http://svn.digium.com/view/asterisk/team/juggie/NoLossCDR/channels/chan_zap.c?view=diff&rev=78414&r1=78413&r2=78414
==============================================================================
--- team/juggie/NoLossCDR/channels/chan_zap.c (original)
+++ team/juggie/NoLossCDR/channels/chan_zap.c Tue Aug  7 13:56:35 2007
@@ -1757,20 +1757,14 @@
 
 static inline int zt_set_hook(int fd, int hs)
 {
-	int x, res, count = 0;
+	int x, res;
 
 	x = hs;
 	res = ioctl(fd, ZT_HOOK, &x);
 
-	while (res < 0 && count < 20) {
-		usleep(100000); /* 1/10 sec. */
-		x = hs;
-		res = ioctl(fd, ZT_HOOK, &x);
-		count++;
-	}
-
 	if (res < 0) {
-		if (errno == EINPROGRESS) return 0;
+		if (errno == EINPROGRESS)
+			return 0;
 		ast_log(LOG_WARNING, "zt hook failed: %s\n", strerror(errno));
 	}
 




More information about the asterisk-commits mailing list