From db0581c7f077552f44bd370325d9c886d2d83c55 Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Sat, 1 Aug 2009 01:13:03 +0000 Subject: [PATCH] Merged revisions 209760-209761 via svnmerge from https://origsvn.digium.com/svn/asterisk/trunk ................ r209760 | kpfleming | 2009-07-31 20:03:07 -0500 (Fri, 31 Jul 2009) | 13 lines Merged revisions 209759 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r209759 | kpfleming | 2009-07-31 19:52:00 -0500 (Fri, 31 Jul 2009) | 7 lines 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. ........ ................ r209761 | kpfleming | 2009-07-31 20:04:06 -0500 (Fri, 31 Jul 2009) | 1 line Revert accidental Makefile change. ................ git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@209762 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- channels/misdn/ie.c | 2 +- channels/misdn/isdn_lib.c | 15 ++++++++++----- main/Makefile | 2 +- main/event.c | 2 +- utils/frame.c | 2 +- 5 files changed, 14 insertions(+), 9 deletions(-) diff --git a/channels/misdn/ie.c b/channels/misdn/ie.c index dc9802845b..cd88db92c1 100644 --- a/channels/misdn/ie.c +++ b/channels/misdn/ie.c @@ -248,7 +248,7 @@ static void dec_ie_bearer(unsigned char *p, Q931_info_t *qi, int *coding, int *c if (p[0] <= octet) goto done; - if (!p[octet++] & 0x80) + if (~p[octet++] & 0x80) goto l2; /* Wheee. V.110 speed information */ diff --git a/channels/misdn/isdn_lib.c b/channels/misdn/isdn_lib.c index 63aaa211ab..65ef9f9182 100644 --- a/channels/misdn/isdn_lib.c +++ b/channels/misdn/isdn_lib.c @@ -1924,9 +1924,7 @@ handle_event_nt(void *dat, void *arg) 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); @@ -2123,8 +2121,15 @@ handle_event_nt(void *dat, void *arg) 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: diff --git a/main/Makefile b/main/Makefile index 5643fb3570..f147abd669 100644 --- a/main/Makefile +++ b/main/Makefile @@ -102,7 +102,7 @@ editline/libedit.a: CHECK_SUBDIR $(MAKE) -C editline libedit.a db1-ast/libdb1.a: CHECK_SUBDIR - CFLAGS="$(subst $(ASTTOPDIR),../../,$(_ASTCFLAGS) $(ASTCFLAGS))" LDFLAGS="$(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 diff --git a/main/event.c b/main/event.c index 4479b53f73..b391591c67 100644 --- a/main/event.c +++ b/main/event.c @@ -647,7 +647,7 @@ static int ast_event_dup_and_cache(const struct ast_event *event) int ast_event_queue_and_cache(struct ast_event *event, ...) { va_list ap; - enum ast_event_type ie_type; + enum ast_event_ie_type ie_type; uint16_t host_event_type; struct ast_event_ref *event_ref; int res; diff --git a/utils/frame.c b/utils/frame.c index 67fa8483e4..d53f0f8dd2 100644 --- a/utils/frame.c +++ b/utils/frame.c @@ -744,7 +744,7 @@ void checknoargs( int argcount, char *args[]) void parseargs( int argcount, char *args[], int fileswitch) { char *filename; - int tempint; + int tempint = 0; if ((fileswitch & 1) != 0) /* If getting infile */ in = NULL; -- 2.47.2