[Freeswitch-svn] [commit] r3912 - in freeswitch/trunk/src: . mod/applications/mod_dptools mod/say/mod_say_en

Freeswitch SVN mikej at freeswitch.org
Fri Jan 5 11:49:36 EST 2007


Author: mikej
Date: Fri Jan  5 11:49:36 2007
New Revision: 3912

Modified:
   freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
   freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
   freeswitch/trunk/src/switch_ivr.c

Log:
make build on windows.

Modified: freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	(original)
+++ freeswitch/trunk/src/mod/applications/mod_dptools/mod_dptools.c	Fri Jan  5 11:49:36 2007
@@ -291,6 +291,8 @@
     }
 
     stream->write_function(stream, "%d", (uint32_t)apr_time_sec(out));
+
+	return SWITCH_STATUS_SUCCESS;
 }
 
 static switch_status_t strftime_api_function(char *fmt, switch_core_session_t *session, switch_stream_handle_t *stream)

Modified: freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c
==============================================================================
--- freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c	(original)
+++ freeswitch/trunk/src/mod/say/mod_say_en/mod_say_en.c	Fri Jan  5 11:49:36 2007
@@ -402,13 +402,10 @@
 {
 	switch_channel_t *channel;
 		
-	int x = 0;
 	char sbuf[16] = ""; // enuf for 999,999,999,999.99 (w/o the commas)
 	
 	double amt, dollars, cents;
 		
-	switch_status_t status;
-	
 	assert(session != NULL);
 	channel = switch_core_session_get_channel(session);
 	assert(channel != NULL);
@@ -419,9 +416,7 @@
 	}
 
 	amt = atof(tosay);  //convert to double
-	dollars = trunc(amt); // get whole dollars
-	cents = trunc(fabs((amt - dollars))*100.0); // get cents as whole integer (dropping sign)
-	dollars = fabs(dollars); // lose the sign
+	cents = modf(fabs(amt), &dollars); // split dollars and cents
 	
 	// If negative say "negative" (or "minus")
 	if (amt < 0.0) {

Modified: freeswitch/trunk/src/switch_ivr.c
==============================================================================
--- freeswitch/trunk/src/switch_ivr.c	(original)
+++ freeswitch/trunk/src/switch_ivr.c	Fri Jan  5 11:49:36 2007
@@ -2389,7 +2389,7 @@
         for (hi = switch_channel_variable_first(caller_channel, switch_core_session_get_pool(session)); hi; hi = switch_hash_next(hi)) {
             switch_hash_this(hi, &vvar, NULL, &vval);
             if (vvar && vval) {
-                switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, vvar, vval);
+                switch_event_add_header(var_event, SWITCH_STACK_BOTTOM, (void *)vvar, vval);
             }
         }
 



More information about the Freeswitch-svn mailing list