[asterisk-commits] kpfleming: branch 1.4 r209759 - in /branches/1.4: channels/misdn/ main/ utils/

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Fri Jul 31 19:52:04 CDT 2009


Author: kpfleming
Date: Fri Jul 31 19:52:00 2009
New Revision: 209759

URL: http://svn.asterisk.org/svn-view/asterisk?view=rev&rev=209759
Log:
Minor changes inspired by testing with latest GCC.

The latest GCC (what will become 4.5.x) has a few new warnings, that in these
cases found some either downright buggy code, or at least seriously poorly
designed code that could be improved.


Modified:
    branches/1.4/channels/misdn/ie.c
    branches/1.4/channels/misdn/isdn_lib.c
    branches/1.4/main/Makefile
    branches/1.4/utils/frame.c

Modified: branches/1.4/channels/misdn/ie.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/channels/misdn/ie.c?view=diff&rev=209759&r1=209758&r2=209759
==============================================================================
--- branches/1.4/channels/misdn/ie.c (original)
+++ branches/1.4/channels/misdn/ie.c Fri Jul 31 19:52:00 2009
@@ -242,7 +242,7 @@
 		if (p[0] <= octet)
 			goto done;
 		
-		if (!p[octet++] & 0x80)
+		if (~p[octet++] & 0x80)
 			goto l2;
 
 		/* Wheee. V.110 speed information */

Modified: branches/1.4/channels/misdn/isdn_lib.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/channels/misdn/isdn_lib.c?view=diff&rev=209759&r1=209758&r2=209759
==============================================================================
--- branches/1.4/channels/misdn/isdn_lib.c (original)
+++ branches/1.4/channels/misdn/isdn_lib.c Fri Jul 31 19:52:00 2009
@@ -1906,9 +1906,7 @@
 		case CC_SETUP|INDICATION:
 		{
 			struct misdn_bchannel* bc=misdn_lib_get_free_bc(stack->port, 0, 1, 0);
-			if (!bc) 
-			ERR_NO_CHANNEL:
-			{
+			if (!bc) {
 				msg_t *dmsg;
 				cb_log(4, stack->port, "Patch from MEIDANIS:Sending RELEASE_COMPLETE %x (No free Chan for you..)\n", hh->dinfo);
 				dmsg = create_l3msg(CC_RELEASE_COMPLETE | REQUEST,MT_RELEASE_COMPLETE, hh->dinfo,sizeof(RELEASE_COMPLETE_t), 1);
@@ -2106,8 +2104,15 @@
 					if (bc->channel<=0 || bc->channel==0xff) 
 						bc->channel=0;
 				
-					if (find_free_chan_in_stack(stack,bc, bc->channel,0)<0) 
-						goto ERR_NO_CHANNEL;
+					if (find_free_chan_in_stack(stack,bc, bc->channel,0)<0) {
+						msg_t *dmsg;
+						cb_log(4, stack->port, "Patch from MEIDANIS:Sending RELEASE_COMPLETE %x (No free Chan for you..)\n", hh->dinfo);
+						dmsg = create_l3msg(CC_RELEASE_COMPLETE | REQUEST,MT_RELEASE_COMPLETE, hh->dinfo,sizeof(RELEASE_COMPLETE_t), 1);
+						pthread_mutex_lock(&stack->nstlock);
+						stack->nst.manager_l3(&stack->nst, dmsg);
+						free_msg(msg);
+						return 0;
+					}
 					break;
 				case EVENT_RELEASE:
 				case EVENT_RELEASE_COMPLETE:

Modified: branches/1.4/main/Makefile
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/main/Makefile?view=diff&rev=209759&r1=209758&r2=209759
==============================================================================
--- branches/1.4/main/Makefile (original)
+++ branches/1.4/main/Makefile Fri Jul 31 19:52:00 2009
@@ -93,7 +93,7 @@
 	$(MAKE) -C editline libedit.a
 
 db1-ast/libdb1.a:
-	CFLAGS="$(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS)) $(ASTCFLAGS)" LDFLAGS="$(_ASTLDFLAGS) $(ASTLDFLAGS)" $(MAKE) -C db1-ast libdb1.a
+	_ASTCFLAGS="$(_ASTCFLAGS)" ASTCFLAGS="$(ASTCFLAGS) -Wno-strict-aliasing" $(MAKE) -C db1-ast libdb1.a
 
 ast_expr2.c ast_expr2.h:
 	bison -o $@ -d --name-prefix=ast_yy ast_expr2.y

Modified: branches/1.4/utils/frame.c
URL: http://svn.asterisk.org/svn-view/asterisk/branches/1.4/utils/frame.c?view=diff&rev=209759&r1=209758&r2=209759
==============================================================================
--- branches/1.4/utils/frame.c (original)
+++ branches/1.4/utils/frame.c Fri Jul 31 19:52:00 2009
@@ -744,7 +744,7 @@
 void parseargs( int argcount, char *args[], int fileswitch)
 {
    char *filename;
-   int tempint;
+   int tempint = 0;
 
    if ((fileswitch & 1) != 0)     /* If getting infile  */
      in = NULL;




More information about the asterisk-commits mailing list