[asterisk-commits] russell: branch 1.4 r54888 -
/branches/1.4/res/res_features.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Fri Feb 16 10:40:39 MST 2007
Author: russell
Date: Fri Feb 16 11:40:38 2007
New Revision: 54888
URL: http://svn.digium.com/view/asterisk?view=rev&rev=54888
Log:
Clean up a few coding guidelines issues - spaces to tabs, use sizeof() to pass
the size of a static buffer, add spaces ...
Modified:
branches/1.4/res/res_features.c
Modified: branches/1.4/res/res_features.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_features.c?view=diff&rev=54888&r1=54887&r2=54888
==============================================================================
--- branches/1.4/res/res_features.c (original)
+++ branches/1.4/res/res_features.c Fri Feb 16 11:40:38 2007
@@ -1935,17 +1935,17 @@
static int manager_parking_status( struct mansession *s, const struct message *m)
{
struct parkeduser *cur;
- const char *id = astman_get_header(m,"ActionID");
+ const char *id = astman_get_header(m, "ActionID");
char idText[256] = "";
if (!ast_strlen_zero(id))
- snprintf(idText, 256, "ActionID: %s\r\n", id);
+ snprintf(idText, sizeof(idText), "ActionID: %s\r\n", id);
astman_send_ack(s, m, "Parked calls will follow");
- ast_mutex_lock(&parking_lock);
-
- for (cur=parkinglot; cur; cur = cur->next) {
+ ast_mutex_lock(&parking_lock);
+
+ for (cur = parkinglot; cur; cur = cur->next) {
astman_append(s, "Event: ParkedCall\r\n"
"Exten: %d\r\n"
"Channel: %s\r\n"
@@ -1955,21 +1955,21 @@
"CallerIDName: %s\r\n"
"%s"
"\r\n",
- cur->parkingnum, cur->chan->name, cur->peername,
- (long)cur->start.tv_sec + (long)(cur->parkingtime/1000) - (long)time(NULL),
+ cur->parkingnum, cur->chan->name, cur->peername,
+ (long) cur->start.tv_sec + (long) (cur->parkingtime / 1000) - (long) time(NULL),
S_OR(cur->chan->cid.cid_num, ""), /* XXX in other places it is <unknown> */
S_OR(cur->chan->cid.cid_name, ""),
idText);
- }
+ }
astman_append(s,
"Event: ParkedCallsComplete\r\n"
"%s"
"\r\n",idText);
- ast_mutex_unlock(&parking_lock);
-
- return RESULT_SUCCESS;
+ ast_mutex_unlock(&parking_lock);
+
+ return RESULT_SUCCESS;
}
static char mandescr_park[] =
More information about the asterisk-commits
mailing list