[Freeswitch-svn] [commit] r7974 - in freeswitch/trunk/src: . include mod/endpoints/mod_sofia
Freeswitch SVN
anthm at freeswitch.org
Thu Mar 27 18:46:47 EDT 2008
Author: anthm
Date: Thu Mar 27 18:46:47 2008
New Revision: 7974
Modified:
freeswitch/trunk/src/include/switch_utils.h
freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
freeswitch/trunk/src/switch_loadable_module.c
Log:
tweak
Modified: freeswitch/trunk/src/include/switch_utils.h
==============================================================================
--- freeswitch/trunk/src/include/switch_utils.h (original)
+++ freeswitch/trunk/src/include/switch_utils.h Thu Mar 27 18:46:47 2008
@@ -45,7 +45,7 @@
#define SWITCH_SMAX 32767
#define SWITCH_SMIN -32768
#define switch_normalize_to_16bit(n) if (n > SWITCH_SMAX) n = SWITCH_SMAX / 2; else if (n < SWITCH_SMIN) n = SWITCH_SMIN / 2;
-#define switch_codec2str(codec,buf,len) snprintf(buf, len, "%s@%uk@%ui", \
+#define switch_codec2str(codec,buf,len) snprintf(buf, len, "%s@%uh@%ui", \
codec->implementation->iananame, \
codec->implementation->samples_per_second, \
codec->implementation->microseconds_per_frame / 1000)
Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c (original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c Thu Mar 27 18:46:47 2008
@@ -162,9 +162,6 @@
rate = imp->samples_per_second;
- if (ptime && ptime != imp->microseconds_per_frame / 1000) {
- switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_WARNING, "ptime %u != advertised ptime %u\n", imp->microseconds_per_frame / 1000, ptime);
- }
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=rtpmap:%d %s/%d\n", imp->ianacode, imp->iananame, rate);
if (imp->fmtp) {
switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), "a=fmtp:%d %s\n", imp->ianacode, imp->fmtp);
@@ -343,7 +340,7 @@
codec_string = tech_pvt->profile->codec_string;
}
}
-
+
if ((ocodec = switch_channel_get_variable(tech_pvt->channel, SWITCH_ORIGINATOR_CODEC_VARIABLE))) {
if (!codec_string || (tech_pvt->profile->pflags & PFLAG_DISABLE_TRANSCODING)) {
codec_string = ocodec;
@@ -354,7 +351,7 @@
}
}
}
-
+
if (codec_string) {
char *tmp_codec_string;
if ((tmp_codec_string = switch_core_session_strdup(tech_pvt->session, codec_string))) {
Modified: freeswitch/trunk/src/switch_loadable_module.c
==============================================================================
--- freeswitch/trunk/src/switch_loadable_module.c (original)
+++ freeswitch/trunk/src/switch_loadable_module.c Thu Mar 27 18:46:47 2008
@@ -1251,11 +1251,10 @@
last = name = next = cur = buf;
for (;;) {
-
-
if (!next) {
break;
}
+
if ((p = strchr(next, '@'))) {
*p++ = '\0';
}
More information about the Freeswitch-svn
mailing list