[svn-commits] russell: branch 1.6.0 r253630 - in /branches/1.6.0: apps/ main/

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sat Mar 20 13:29:51 CDT 2010


Author: russell
Date: Sat Mar 20 13:29:46 2010
New Revision: 253630

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=253630
Log:
Resolve 1.6.0 compilation issues on FreeBSD.

Modified:
    branches/1.6.0/apps/app_waituntil.c
    branches/1.6.0/main/features.c
    branches/1.6.0/main/logger.c
    branches/1.6.0/main/manager.c
    branches/1.6.0/main/sched.c

Modified: branches/1.6.0/apps/app_waituntil.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/apps/app_waituntil.c?view=diff&rev=253630&r1=253629&r2=253630
==============================================================================
--- branches/1.6.0/apps/app_waituntil.c (original)
+++ branches/1.6.0/apps/app_waituntil.c Sat Mar 20 13:29:46 2010
@@ -48,6 +48,7 @@
 {
 	int res;
 	double fraction;
+	long seconds;
 	struct timeval future = { 0, };
 	struct timeval tv = ast_tvnow();
 	int msec;
@@ -58,12 +59,13 @@
 		return 0;
 	}
 
-	if (sscanf(data, "%30ld%30lf", (long *)&future.tv_sec, &fraction) == 0) {
+	if (sscanf(data, "%30ld%30lf", &seconds, &fraction) == 0) {
 		ast_log(LOG_WARNING, "WaitUntil called with non-numeric argument\n");
 		pbx_builtin_setvar_helper(chan, "WAITUNTILSTATUS", "FAILURE");
 		return 0;
 	}
 
+	future.tv_sec = seconds;
 	future.tv_usec = fraction * 1000000;
 
 	if ((msec = ast_tvdiff_ms(future, tv)) < 0) {

Modified: branches/1.6.0/main/features.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/features.c?view=diff&rev=253630&r1=253629&r2=253630
==============================================================================
--- branches/1.6.0/main/features.c (original)
+++ branches/1.6.0/main/features.c Sat Mar 20 13:29:46 2010
@@ -3730,7 +3730,7 @@
 	AST_LIST_TRAVERSE(&parkinglot, cur, list) {
 		ast_cli(a->fd, "%-10.10s %25s (%-15s %-12s %-4d) %6lds\n"
 			,cur->parkingexten, cur->chan->name, cur->context, cur->exten
-			,cur->priority, cur->start.tv_sec + (cur->parkingtime/1000) - time(NULL));
+			,cur->priority, (long) cur->start.tv_sec + (cur->parkingtime/1000) - time(NULL));
 
 		numparked++;
 	}

Modified: branches/1.6.0/main/logger.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/logger.c?view=diff&rev=253630&r1=253629&r2=253630
==============================================================================
--- branches/1.6.0/main/logger.c (original)
+++ branches/1.6.0/main/logger.c Sat Mar 20 13:29:46 2010
@@ -1094,11 +1094,7 @@
 		if ((strings = backtrace_symbols(addresses, count))) {
 			ast_debug(1, "Got %d backtrace record%c\n", count, count != 1 ? 's' : ' ');
 			for (i = 0; i < count; i++) {
-#if __WORDSIZE == 32
-				ast_log(LOG_DEBUG, "#%d: [%08X] %s\n", i, (unsigned int)addresses[i], strings[i]);
-#elif __WORDSIZE == 64
-				ast_log(LOG_DEBUG, "#%d: [%016lX] %s\n", i, (unsigned long)addresses[i], strings[i]);
-#endif
+				ast_log(LOG_DEBUG, "#%d: [%p] %s\n", i, addresses[i], strings[i]);
 			}
 			free(strings);
 		} else {

Modified: branches/1.6.0/main/manager.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/manager.c?view=diff&rev=253630&r1=253629&r2=253630
==============================================================================
--- branches/1.6.0/main/manager.c (original)
+++ branches/1.6.0/main/manager.c Sat Mar 20 13:29:46 2010
@@ -3099,7 +3099,7 @@
 		now = ast_tvnow();
 		ast_str_append(&buf, 0,
 				"Timestamp: %ld.%06lu\r\n",
-				 now.tv_sec, (unsigned long) now.tv_usec);
+				 (long) now.tv_sec, (unsigned long) now.tv_usec);
 	}
 	if (manager_debug) {
 		static int seq;

Modified: branches/1.6.0/main/sched.c
URL: http://svnview.digium.com/svn/asterisk/branches/1.6.0/main/sched.c?view=diff&rev=253630&r1=253629&r2=253630
==============================================================================
--- branches/1.6.0/main/sched.c (original)
+++ branches/1.6.0/main/sched.c Sat Mar 20 13:29:46 2010
@@ -323,7 +323,7 @@
 			q->id,
 			q->callback,
 			q->data,
-			delta.tv_sec,
+			(long) delta.tv_sec,
 			(long int)delta.tv_usec);
 	}
 	ast_debug(1, "=============================================================\n");




More information about the svn-commits mailing list