[commit] r12628 - in freeswitch/trunk/src: . mod/applications/mod_conference mod/codecs/mod_g729 mod/endpoints/mod_reference mod/endpoints/mod_sofia
Author: mrene Date: Mon Mar 16 15:28:22 2009 New Revision: 12628 Log: Fix off-by-1 read err in switch_xml Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c freeswitch/trunk/src/mod/codecs/mod_g729/Makefile freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c freeswitch/trunk/src/switch_xml.c Modified: freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c ============================================================================== --- freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c (original) +++ freeswitch/trunk/src/mod/applications/mod_conference/mod_conference.c Mon Mar 16 15:28:22 2009 @@ -2922,7 +2922,7 @@ { switch_event_t *event; - if (member == NULL) + if (member == NULL || switch_test_flag(member, MFLAG_NOCHANNEL)) return SWITCH_STATUS_GENERR; switch_mutex_lock(member->control_mutex); Modified: freeswitch/trunk/src/mod/codecs/mod_g729/Makefile ============================================================================== --- freeswitch/trunk/src/mod/codecs/mod_g729/Makefile (original) +++ freeswitch/trunk/src/mod/codecs/mod_g729/Makefile Mon Mar 16 15:28:22 2009 @@ -1,7 +1,7 @@ BASE=../../../.. -DIR=$(BASE)/libs/libg729 -A=$(DIR)/.libs/libg729.a +DIR=./g729abc +A=$(DIR)/libg729ab.a -LOCAL_INSERT_CFLAGS=if test -f $(A); then echo "-I$(DIR)/src/include" ; else echo "-DG729_PASSTHROUGH" ; fi ; +LOCAL_INSERT_CFLAGS=if test -f $(A); then echo "-I$(DIR)" ; else echo "-DG729_PASSTHROUGH" ; fi ; LOCAL_INSERT_LDFLAGS=test ! -f $(A) || echo $(A) include $(BASE)/build/modmake.rules Modified: freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c ============================================================================== --- freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c (original) +++ freeswitch/trunk/src/mod/codecs/mod_g729/mod_g729.c Mon Mar 16 15:28:22 2009 @@ -38,7 +38,7 @@ SWITCH_MODULE_DEFINITION(mod_g729, mod_g729_load, NULL, NULL); #ifndef G729_PASSTHROUGH -#include "g729.h" +#include "g729ab.h" struct g729_context { struct dec_state decoder_object; @@ -112,7 +112,7 @@ if (decoded_data_len % 160 == 0) { uint32_t new_len = 0; INT16 *ddp = decoded_data; - char *edp = encoded_data; + unsigned char *edp = encoded_data; int x; int loops = (int) decoded_data_len / 160; @@ -170,7 +170,7 @@ if (encoded_data_len % divisor == 0) { uint8_t *test; int loops = (int) encoded_data_len / divisor; - char *edp = encoded_data; + unsigned char *edp = encoded_data; short *ddp = decoded_data; int x; uint32_t new_len = 0; Modified: freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_reference/mod_reference.c Mon Mar 16 15:28:22 2009 @@ -272,8 +272,6 @@ { switch_channel_t *channel = NULL; private_t *tech_pvt = NULL; - switch_time_t started = switch_time_now(); - unsigned int elapsed; switch_byte_t *data; channel = switch_core_session_get_channel(session); Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c ============================================================================== --- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c (original) +++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c Mon Mar 16 15:28:22 2009 @@ -2691,7 +2691,7 @@ } } - if (channel && sip && (status >= 300 || status < 399) && switch_channel_test_flag(channel, CF_OUTBOUND)) { + if (channel && sip && (status >= 300 && status < 399) && switch_channel_test_flag(channel, CF_OUTBOUND)) { sip_contact_t * p_contact = sip->sip_contact; int i = 0; char var_name[80]; Modified: freeswitch/trunk/src/switch_xml.c ============================================================================== --- freeswitch/trunk/src/switch_xml.c (original) +++ freeswitch/trunk/src/switch_xml.c Mon Mar 16 15:28:22 2009 @@ -2035,7 +2035,7 @@ *s = tmp; } - if (*(*s + (*len) - 1) == '>') { + if (*len && *(*s + (*len) - 1) == '>') { *len += sprintf(*s + *len, "\n"); /* indent */ } for (lcount = 0; lcount < *count; lcount++) {
participants (1)
-
FreeSWITCH SVN