[Asterisk-cvs] asterisk acl.c,1.23,1.24 cdr.c,1.17,1.18 channel.c,1.120,1.121 config.c,1.23,1.24 dns.c,1.9,1.10 frame.c,1.34,1.35 indications.c,1.17,1.18 srv.c,1.8,1.9 translate.c,1.26,1.27 utils.c,1.10,1.11
citats at lists.digium.com
citats at lists.digium.com
Tue Jun 22 16:25:21 CDT 2004
Update of /usr/cvsroot/asterisk
In directory mongoose.digium.com:/home/citats/cvs/asterisk
Modified Files:
acl.c cdr.c channel.c config.c dns.c frame.c indications.c
srv.c translate.c utils.c
Log Message:
Misc formatting cleanups
Index: acl.c
===================================================================
RCS file: /usr/cvsroot/asterisk/acl.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- acl.c 22 Jun 2004 18:48:59 -0000 1.23
+++ acl.c 22 Jun 2004 20:11:15 -0000 1.24
@@ -67,13 +67,11 @@
/* Copy HA structure */
static void ast_copy_ha(struct ast_ha *from, struct ast_ha *to)
- {
-
- memcpy(&to->netaddr, &from->netaddr, sizeof(from->netaddr));
- memcpy(&to->netmask, &from->netmask, sizeof(from->netmask));
- to->sense = from->sense;
-
- }
+{
+ memcpy(&to->netaddr, &from->netaddr, sizeof(from->netaddr));
+ memcpy(&to->netmask, &from->netmask, sizeof(from->netmask));
+ to->sense = from->sense;
+}
/* Create duplicate of ha structure */
static struct ast_ha *ast_duplicate_ha(struct ast_ha *original)
@@ -103,13 +101,12 @@
if (!ret)
ret = link; /* Save starting point */
- start = start->next; /* Go to next object */
- prev = link; /* Save pointer to this object */
- }
- return (ret); /* Return start of list */
+ start = start->next; /* Go to next object */
+ prev = link; /* Save pointer to this object */
+ }
+ return (ret); /* Return start of list */
}
-
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
{
struct ast_ha *ha = malloc(sizeof(struct ast_ha));
Index: cdr.c
===================================================================
RCS file: /usr/cvsroot/asterisk/cdr.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cdr.c 22 Jun 2004 18:48:59 -0000 1.17
+++ cdr.c 22 Jun 2004 20:11:15 -0000 1.18
@@ -503,11 +503,10 @@
}
void ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr) {
- if(cdr) {
+ if (cdr) {
while(cdr->next)
cdr = cdr->next;
cdr->next = newcdr;
- } else
- ast_log(LOG_ERROR, "Can't append a CDR to NULL!\n");
-
+ } else
+ ast_log(LOG_ERROR, "Can't append a CDR to NULL!\n");
}
Index: channel.c
===================================================================
RCS file: /usr/cvsroot/asterisk/channel.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -d -r1.120 -r1.121
--- channel.c 22 Jun 2004 18:48:59 -0000 1.120
+++ channel.c 22 Jun 2004 20:11:15 -0000 1.121
@@ -143,20 +143,20 @@
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset)
{
-time_t myt;
+ time_t myt;
time(&myt);
- if (offset)
- chan->whentohangup = myt + offset;
- else
- chan->whentohangup = 0;
+ if (offset)
+ chan->whentohangup = myt + offset;
+ else
+ chan->whentohangup = 0;
return;
}
int ast_channel_register(char *type, char *description, int capabilities,
struct ast_channel *(*requester)(char *type, int format, void *data))
{
- return ast_channel_register_ex(type, description, capabilities, requester, NULL);
+ return ast_channel_register_ex(type, description, capabilities, requester, NULL);
}
int ast_channel_register_ex(char *type, char *description, int capabilities,
@@ -169,7 +169,7 @@
return -1;
}
chan = backends;
- while(chan) {
+ while (chan) {
if (!strcasecmp(type, chan->type)) {
ast_log(LOG_WARNING, "Already have a handler for type '%s'\n", type);
ast_mutex_unlock(&chlock);
@@ -711,9 +711,9 @@
ast_mutex_unlock(&chan->lock);
manager_event(EVENT_FLAG_CALL, "Hangup",
"Channel: %s\r\n"
- "Uniqueid: %s\r\n"
- "Cause: %i\r\n",
- chan->name, chan->uniqueid, chan->hangupcause);
+ "Uniqueid: %s\r\n"
+ "Cause: %i\r\n",
+ chan->name, chan->uniqueid, chan->hangupcause);
ast_channel_free(chan);
return res;
}
Index: config.c
===================================================================
RCS file: /usr/cvsroot/asterisk/config.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- config.c 17 Jun 2004 04:53:55 -0000 1.23
+++ config.c 22 Jun 2004 20:11:15 -0000 1.24
@@ -441,12 +441,11 @@
char *cur;
char *arg=NULL;
struct ast_config_reg *reg=NULL;
- struct ast_config *(*load_func)(char *, struct ast_config *,struct ast_category **,struct ast_variable **,int
+ struct ast_config *(*load_func)(char *, struct ast_config *,struct ast_category **,struct ast_variable **,int
#ifdef PRESERVE_COMMENTS
,struct ast_comment_struct *
#endif
-);
-
+ );
struct ast_variable *v;
#ifdef PRESERVE_COMMENTS
struct ast_comment *com = NULL;
Index: dns.c
===================================================================
RCS file: /usr/cvsroot/asterisk/dns.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- dns.c 9 Jun 2004 01:45:07 -0000 1.9
+++ dns.c 22 Jun 2004 20:11:15 -0000 1.10
@@ -99,7 +99,7 @@
int res;
int x;
- h = (dns_HEADER *)answer;
+ h = (dns_HEADER *)answer;
answer += sizeof(dns_HEADER);
len -= sizeof(dns_HEADER);
Index: frame.c
===================================================================
RCS file: /usr/cvsroot/asterisk/frame.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -d -r1.34 -r1.35
--- frame.c 22 Jun 2004 18:48:59 -0000 1.34
+++ frame.c 22 Jun 2004 20:11:15 -0000 1.35
@@ -502,7 +502,7 @@
"undefined", /* 13 */
"undefined", /* 14 */
"Maximum audio format", /* 15 */
- /* Image formats */
+ /* Image formats */
"JPEG image", /* 16 */
"PNG image", /* 17 */
"H.261 Video", /* 18 */
@@ -511,7 +511,7 @@
"undefined", /* 21 */
"undefined", /* 22 */
"undefined", /* 23 */
- "Maximum video format", /* 24 */
+ "Maximum video format", /* 24 */
};
if ((codec >= 0) && (codec <= 24))
return codecs[codec];
Index: indications.c
===================================================================
RCS file: /usr/cvsroot/asterisk/indications.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- indications.c 22 Jun 2004 18:48:59 -0000 1.17
+++ indications.c 22 Jun 2004 20:11:15 -0000 1.18
@@ -167,7 +167,7 @@
else
separator = ",";
s = strsep(&stringp,separator);
- while(s && *s) {
+ while (s && *s) {
int freq1, freq2, time, modulate=0;
if (s[0]=='!')
Index: srv.c
===================================================================
RCS file: /usr/cvsroot/asterisk/srv.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- srv.c 4 May 2004 14:54:42 -0000 1.8
+++ srv.c 22 Jun 2004 20:11:15 -0000 1.9
@@ -88,7 +88,7 @@
if (!ast_strlen_zero(c->host))
return 1;
- return 0;
+ return 0;
}
int ast_get_srv(struct ast_channel *chan, char *host, int hostlen, int *port, const char *service)
@@ -110,7 +110,7 @@
if (ret <= 0) {
strcpy(host, "");
- *port = -1;
+ *port = -1;
return ret;
}
return ret;
Index: translate.c
===================================================================
RCS file: /usr/cvsroot/asterisk/translate.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -d -r1.26 -r1.27
--- translate.c 22 Jun 2004 18:48:59 -0000 1.26
+++ translate.c 22 Jun 2004 20:11:15 -0000 1.27
@@ -326,26 +326,25 @@
static int show_translation(int fd, int argc, char *argv[])
{
#define SHOW_TRANS 11
- int x,y,z;
+ int x, y, z;
char line[80];
if (argc > 4)
return RESULT_SHOWUSAGE;
- if(argv[2] && !strcasecmp(argv[2],"recalc")) {
- z = argv[3] ? atoi(argv[3]) : 1;
+ if (argv[2] && !strcasecmp(argv[2],"recalc")) {
+ z = argv[3] ? atoi(argv[3]) : 1;
- if(z <= 0) {
- ast_cli(fd," C'mon let's be serious here... defaulting to 1.\n");
- z = 1;
- }
-
- if(z > MAX_RECALC) {
- ast_cli(fd," Maximum limit of recalc exceeded by %d, truncating value to %d\n",z-MAX_RECALC,MAX_RECALC);
- z = MAX_RECALC;
- }
- ast_cli(fd," Recalculating Codec Translation (number of sample seconds: %d)\n\n",z);
- rebuild_matrix(z);
+ if (z <= 0) {
+ ast_cli(fd," C'mon let's be serious here... defaulting to 1.\n");
+ z = 1;
+ }
+ if (z > MAX_RECALC) {
+ ast_cli(fd," Maximum limit of recalc exceeded by %d, truncating value to %d\n",z-MAX_RECALC,MAX_RECALC);
+ z = MAX_RECALC;
+ }
+ ast_cli(fd," Recalculating Codec Translation (number of sample seconds: %d)\n\n",z);
+ rebuild_matrix(z);
}
ast_cli(fd, " Translation times between formats (in milliseconds)\n");
Index: utils.c
===================================================================
RCS file: /usr/cvsroot/asterisk/utils.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- utils.c 22 Jun 2004 19:53:36 -0000 1.10
+++ utils.c 22 Jun 2004 20:11:15 -0000 1.11
@@ -24,8 +24,8 @@
AST_MUTEX_DEFINE_STATIC(__mutex);
static int gethostbyname_r (const char *name, struct hostent *ret, char *buf,
- size_t buflen, struct hostent **result,
- int *h_errnop)
+ size_t buflen, struct hostent **result,
+ int *h_errnop)
{
int hsave;
struct hostent *ph;
More information about the svn-commits
mailing list