{
int res;
double fraction;
+ long seconds;
struct timeval future = { 0, };
struct timeval tv = ast_tvnow();
int msec;
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) {
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++;
}
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 {
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;
q->id,
q->callback,
q->data,
- delta.tv_sec,
+ (long) delta.tv_sec,
(long int)delta.tv_usec);
}
ast_debug(1, "=============================================================\n");