[Asterisk-cvs] asterisk/channels chan_phone.c,1.39,1.40
markster at lists.digium.com
markster at lists.digium.com
Sat Jan 1 17:53:34 CST 2005
Update of /usr/cvsroot/asterisk/channels
In directory mongoose.digium.com:/tmp/cvs-serv5183/channels
Modified Files:
chan_phone.c
Log Message:
Fix chan_phone for pre-gcc 3.0 (bug #3214)
Index: chan_phone.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channels/chan_phone.c,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -d -r1.39 -r1.40
--- chan_phone.c 31 Dec 2004 00:16:30 -0000 1.39
+++ chan_phone.c 1 Jan 2005 23:58:57 -0000 1.40
@@ -181,6 +181,7 @@
PHONE_CID cid;
time_t UtcTime;
struct tm tm;
+ int start;
time(&UtcTime);
localtime_r(&UtcTime,&tm);
@@ -210,7 +211,7 @@
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 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)
More information about the svn-commits
mailing list