aboutsummaryrefslogtreecommitdiffstats
path: root/channels/chan_phone.c
diff options
context:
space:
mode:
authormarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-01 23:58:57 +0000
committermarkster <markster@f38db490-d61c-443f-a65b-d21fe96a405b>2005-01-01 23:58:57 +0000
commite88926fa1b1babbf24b02db255cf9ff585871f80 (patch)
treedee3fd22aae093cc706fdb3794e3f21720b1653e /channels/chan_phone.c
parent7e69743ca3c2b43fb91fedfe21b60811c25d1ffe (diff)
Fix chan_phone for pre-gcc 3.0 (bug #3214)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@4630 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'channels/chan_phone.c')
-rwxr-xr-xchannels/chan_phone.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/channels/chan_phone.c b/channels/chan_phone.c
index dfc9a845e..de312a542 100755
--- a/channels/chan_phone.c
+++ b/channels/chan_phone.c
@@ -181,6 +181,7 @@ static int phone_call(struct ast_channel *ast, char *dest, int timeout)
PHONE_CID cid;
time_t UtcTime;
struct tm tm;
+ int start;
time(&UtcTime);
localtime_r(&UtcTime,&tm);
@@ -210,7 +211,7 @@ static int phone_call(struct ast_channel *ast, char *dest, int timeout)
if (option_debug)
ast_log(LOG_DEBUG, "Ringing %s on %s (%d)\n", dest, ast->name, ast->fds[0]);
- int start = IXJ_PHONE_RING_START(cid);
+ start = IXJ_PHONE_RING_START(cid);
if (start == -1)
return -1;
@@ -708,13 +709,13 @@ static int phone_write(struct ast_channel *ast, struct ast_frame *frame)
static struct ast_channel *phone_new(struct phone_pvt *i, int state, char *context)
{
struct ast_channel *tmp;
+ struct phone_codec_data codec;
tmp = ast_channel_alloc(1);
if (tmp) {
snprintf(tmp->name, sizeof(tmp->name), "Phone/%s", i->dev + 5);
tmp->type = type;
tmp->fds[0] = i->fd;
/* XXX Switching formats silently causes kernel panics XXX */
- struct phone_codec_data codec;
if (i->mode == MODE_FXS &&
ioctl(i->fd, PHONE_QUERY_CODEC, &codec) == 0) {
if (codec.type == LINEAR16)