[Asterisk-cvs]
asterisk app.c, 1.52, 1.53 astmm.c, 1.11, 1.12 cli.c,
1.75, 1.76 manager.c, 1.87, 1.88
markster at lists.digium.com
markster at lists.digium.com
Wed Mar 23 00:02:01 CST 2005
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/tmp/cvs-serv20228
Modified Files:
app.c astmm.c cli.c manager.c
Log Message:
Merge Russell's formatting patch (bug #3838)
Index: app.c
===================================================================
RCS file: /usr/cvsroot/asterisk/app.c,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- app.c 12 Mar 2005 05:37:32 -0000 1.52
+++ app.c 23 Mar 2005 05:56:31 -0000 1.53
@@ -58,9 +58,9 @@
timeout = 5;
ts = ast_get_indication_tone(chan->zone,"dial");
- if (ts && ts->data[0]) {
- res = ast_playtones_start(chan, 0, ts->data, 0);
- } else
+ if (ts && ts->data[0])
+ res = ast_playtones_start(chan, 0, ts->data, 0);
+ else
ast_log(LOG_NOTICE,"Huh....? no dial for indications?\n");
for (x = strlen(collect); strlen(collect) < maxlen; ) {
@@ -105,8 +105,10 @@
fto = c->pbx ? c->pbx->rtimeout * 1000 : 6000;
to = c->pbx ? c->pbx->dtimeout * 1000 : 2000;
- if (timeout > 0) fto = to = timeout;
- if (timeout < 0) fto = to = 1000000000;
+ if (timeout > 0)
+ fto = to = timeout;
+ if (timeout < 0)
+ fto = to = 1000000000;
res = ast_readstring(c, s, maxlen, to, fto, "#");
return res;
}
@@ -122,8 +124,10 @@
}
fto = 6000;
to = 2000;
- if (timeout > 0) fto = to = timeout;
- if (timeout < 0) fto = to = 1000000000;
+ if (timeout > 0)
+ fto = to = timeout;
+ if (timeout < 0)
+ fto = to = 1000000000;
res = ast_readstring_full(c, s, maxlen, to, fto, "#", audiofd, ctrlfd);
return res;
}
Index: astmm.c
===================================================================
RCS file: /usr/cvsroot/asterisk/astmm.c,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -d -r1.11 -r1.12
--- astmm.c 22 Jun 2004 18:48:59 -0000 1.11
+++ astmm.c 23 Mar 2005 05:56:31 -0000 1.12
@@ -3,9 +3,9 @@
*
* Channel Variables
*
- * Copyright (C) 2002, Mark Spencer
+ * Copyright (C) 2002-2005, Mark Spencer
*
- * Mark Spencer <markster at linux-support.net>
+ * Mark Spencer <markster at digium.com>
*
* This program is free software, distributed under the terms of
* the GNU General Public License
Index: cli.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cli.c,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -d -r1.75 -r1.76
--- cli.c 5 Mar 2005 04:04:55 -0000 1.75
+++ cli.c 23 Mar 2005 05:56:31 -0000 1.76
@@ -377,7 +377,7 @@
if (argc == 3)
return RESULT_SHOWUSAGE;
else if (argc >= 4) {
- if ( strcmp(argv[2],"like") )
+ if (strcmp(argv[2],"like"))
return RESULT_SHOWUSAGE;
like = argv[3];
}
@@ -694,51 +694,52 @@
} else
strncpy(cdrtime, "N/A", sizeof(cdrtime) -1);
ast_cli(fd,
- " -- General --\n"
- " Name: %s\n"
- " Type: %s\n"
- " UniqueID: %s\n"
- " Caller ID: %s\n"
- " Caller ID Name: %s\n"
- " DNID Digits: %s\n"
- " State: %s (%d)\n"
- " Rings: %d\n"
- " NativeFormat: %d\n"
- " WriteFormat: %d\n"
- " ReadFormat: %d\n"
- "1st File Descriptor: %d\n"
- " Frames in: %d%s\n"
- " Frames out: %d%s\n"
- " Time to Hangup: %ld\n"
- " Elapsed Time: %s\n"
- " Direct Bridge: %s\n"
- "Indirect Bridge: %s\n"
- " -- PBX --\n"
- " Context: %s\n"
- " Extension: %s\n"
- " Priority: %d\n"
- " Call Group: %d\n"
- " Pickup Group: %d\n"
- " Application: %s\n"
- " Data: %s\n"
- " Blocking in: %s\n",
- c->name, c->type, c->uniqueid,
- (c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
- (c->cid.cid_name ? c->cid.cid_name : "(N/A)"),
- (c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat,
- c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "",
- c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup,
- cdrtime, c->_bridge ? c->_bridge->name : "<none>", ast_bridged_channel(c) ? ast_bridged_channel(c)->name : "<none>",
- c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ),
- ( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
- (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
- if(pbx_builtin_serialize_variables(c,buf,sizeof(buf)))
- ast_cli(fd," Variables:\n%s\n",buf);
- if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1))
- ast_cli(fd," CDR Variables:\n%s\n",buf);
+ " -- General --\n"
+ " Name: %s\n"
+ " Type: %s\n"
+ " UniqueID: %s\n"
+ " Caller ID: %s\n"
+ " Caller ID Name: %s\n"
+ " DNID Digits: %s\n"
+ " State: %s (%d)\n"
+ " Rings: %d\n"
+ " NativeFormat: %d\n"
+ " WriteFormat: %d\n"
+ " ReadFormat: %d\n"
+ "1st File Descriptor: %d\n"
+ " Frames in: %d%s\n"
+ " Frames out: %d%s\n"
+ " Time to Hangup: %ld\n"
+ " Elapsed Time: %s\n"
+ " Direct Bridge: %s\n"
+ "Indirect Bridge: %s\n"
+ " -- PBX --\n"
+ " Context: %s\n"
+ " Extension: %s\n"
+ " Priority: %d\n"
+ " Call Group: %d\n"
+ " Pickup Group: %d\n"
+ " Application: %s\n"
+ " Data: %s\n"
+ " Blocking in: %s\n",
+ c->name, c->type, c->uniqueid,
+ (c->cid.cid_num ? c->cid.cid_num : "(N/A)"),
+ (c->cid.cid_name ? c->cid.cid_name : "(N/A)"),
+ (c->cid.cid_dnid ? c->cid.cid_dnid : "(N/A)" ), ast_state2str(c->_state), c->_state, c->rings, c->nativeformats, c->writeformat, c->readformat,
+ c->fds[0], c->fin & 0x7fffffff, (c->fin & 0x80000000) ? " (DEBUGGED)" : "",
+ c->fout & 0x7fffffff, (c->fout & 0x80000000) ? " (DEBUGGED)" : "", (long)c->whentohangup,
+ cdrtime, c->_bridge ? c->_bridge->name : "<none>", ast_bridged_channel(c) ? ast_bridged_channel(c)->name : "<none>",
+ c->context, c->exten, c->priority, c->callgroup, c->pickupgroup, ( c->appl ? c->appl : "(N/A)" ),
+ ( c-> data ? (!ast_strlen_zero(c->data) ? c->data : "(Empty)") : "(None)"),
+ (ast_test_flag(c, AST_FLAG_BLOCKING) ? c->blockproc : "(Not Blocking)"));
+
+ if(pbx_builtin_serialize_variables(c,buf,sizeof(buf)))
+ ast_cli(fd," Variables:\n%s\n",buf);
+ if(c->cdr && ast_cdr_serialize_variables(c->cdr,buf, sizeof(buf), '=', '\n', 1))
+ ast_cli(fd," CDR Variables:\n%s\n",buf);
ast_mutex_unlock(&c->lock);
- break;
+ break;
}
ast_mutex_unlock(&c->lock);
c = ast_channel_walk_locked(c);
Index: manager.c
===================================================================
RCS file: /usr/cvsroot/asterisk/manager.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -d -r1.87 -r1.88
--- manager.c 22 Mar 2005 19:09:12 -0000 1.87
+++ manager.c 23 Mar 2005 05:56:31 -0000 1.88
@@ -1343,7 +1343,7 @@
continue;
}
p = getprotobyname("tcp");
- if( p ) {
+ if (p) {
if( setsockopt(as, p->p_proto, TCP_NODELAY, (char *)&arg, sizeof(arg) ) < 0 ) {
ast_log(LOG_WARNING, "Failed to set manager tcp connection to TCP_NODELAY mode: %s\n", strerror(errno));
}
More information about the svn-commits
mailing list