Merged revisions 253536-253538,253540 via svnmerge from

https://origsvn.digium.com/svn/asterisk/trunk

........
  r253536 | russell | 2010-03-20 06:33:30 -0500 (Sat, 20 Mar 2010) | 4 lines
  
  Use SHRT_MAX instead of MAXSHORT.
  
  These changes fix build issues I had with this module on FreeBSD.
........
  r253537 | russell | 2010-03-20 06:39:39 -0500 (Sat, 20 Mar 2010) | 2 lines
  
  Resolve a compiler warning on FreeBSD.
........
  r253538 | russell | 2010-03-20 06:43:08 -0500 (Sat, 20 Mar 2010) | 2 lines
  
  Resolve compiler warnings on FreeBSD.
........
  r253540 | russell | 2010-03-20 07:03:07 -0500 (Sat, 20 Mar 2010) | 2 lines
  
  Resolve more compiler warnings on FreeBSD.
........


git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.6.0@253626 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Russell Bryant 15 years ago
parent 7ad504971b
commit d18064d8bd

@ -1274,12 +1274,12 @@ static void end_bridge_callback(void *data)
ast_channel_lock(chan);
if (chan->cdr->answer.tv_sec) {
snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
}
if (chan->cdr->start.tv_sec) {
snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
}
ast_channel_unlock(chan);

@ -889,12 +889,12 @@ static void end_bridge_callback(void *data)
ast_channel_lock(chan);
if (chan->cdr->answer.tv_sec) {
snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->answer.tv_sec);
snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->answer.tv_sec);
pbx_builtin_setvar_helper(chan, "ANSWEREDTIME", buf);
}
if (chan->cdr->start.tv_sec) {
snprintf(buf, sizeof(buf), "%ld", end - chan->cdr->start.tv_sec);
snprintf(buf, sizeof(buf), "%ld", (long) end - chan->cdr->start.tv_sec);
pbx_builtin_setvar_helper(chan, "DIALEDTIME", buf);
}
ast_channel_unlock(chan);

@ -171,7 +171,7 @@ static int pgsql_log(struct ast_cdr *cdr)
if (strcmp(cur->name, "start") == 0 || strcmp(cur->name, "calldate") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(12);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->start.tv_sec);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->start.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(30);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->start.tv_sec + (double)cdr->start.tv_usec / 1000000.0);
@ -184,7 +184,7 @@ static int pgsql_log(struct ast_cdr *cdr)
} else if (strcmp(cur->name, "answer") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(12);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->answer.tv_sec);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->answer.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(30);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->answer.tv_sec + (double)cdr->answer.tv_usec / 1000000.0);
@ -197,7 +197,7 @@ static int pgsql_log(struct ast_cdr *cdr)
} else if (strcmp(cur->name, "end") == 0) {
if (strncmp(cur->type, "int", 3) == 0) {
LENGTHEN_BUF2(12);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", cdr->end.tv_sec);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%ld", (long) cdr->end.tv_sec);
} else if (strncmp(cur->type, "float", 5) == 0) {
LENGTHEN_BUF2(30);
lensql2 += snprintf(sql2 + lensql2, sizesql2 - lensql2, "%f", (double)cdr->end.tv_sec + (double)cdr->end.tv_usec / 1000000.0);

@ -49,7 +49,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#ifdef __NetBSD__
#if defined(__NetBSD__) || defined(__FreeBSD__)
#include <pthread.h>
#include <signal.h>
#else

@ -30,6 +30,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include "asterisk/_private.h"
#include <pthread.h>
#include <signal.h>
#include <sys/time.h>
#include <sys/signal.h>
#include <netinet/in.h>

@ -48,6 +48,7 @@
ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <signal.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <float.h>

@ -33,6 +33,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#include <fcntl.h>
#endif
#include <signal.h>
#include <sys/signal.h>
#include "asterisk/compat.h"

@ -40,6 +40,7 @@ ASTERISK_FILE_VERSION(__FILE__, "$Revision$")
#if defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__Darwin__)
#include <net/if_dl.h>
#include <ifaddrs.h>
#include <signal.h>
#endif
#include "asterisk/file.h"

Loading…
Cancel
Save