[Freeswitch-svn] [commit] r13231 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN mrene at freeswitch.org
Mon May 4 15:53:41 PDT 2009


Author: mrene
Date: Mon May  4 17:53:41 2009
New Revision: 13231

Log:
MODENDP-206 Ignore ptime when missing instead of using @0i - thanks stangor

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia_glue.c

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	Mon May  4 17:53:41 2009
@@ -2487,7 +2487,11 @@
 					}
 
 					if (match) {
-						switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (int) map->rm_rate, ptime);
+						if(ptime > 0) {
+							switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (unsigned int) map->rm_rate, ptime);
+						} else {
+							switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh", imp->iananame, (unsigned int) map->rm_rate);
+						}
 						already_did[imp->ianacode] = 1;
 						break;
 					}
@@ -2524,7 +2528,11 @@
 					}
 
 					if (match) {
-						switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (int) map->rm_rate, ptime);
+						if(ptime > 0) {
+							switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh@%di", imp->iananame, (unsigned int) map->rm_rate, ptime);
+						} else {
+							switch_snprintf(buf + strlen(buf), sizeof(buf) - strlen(buf), ",%s@%uh", imp->iananame, (unsigned int) map->rm_rate);
+						}
 						already_did[imp->ianacode] = 1;
 						break;
 					}



More information about the Freeswitch-svn mailing list