diff --git a/acl.c b/acl.c index 2f422a52d3707ca8ee963c1a400a8033d4f57c1b..1c06ff8dbfa80fba80062c2b9c47da2bfc6819c1 100755 --- a/acl.c +++ b/acl.c @@ -154,12 +154,12 @@ struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path) ha->netmask.s_addr = htonl(y); } } else if (!inet_aton(nm, &ha->netmask)) { - ast_log(LOG_WARNING, "%s not a valid netmask\n", nm); + ast_log(LOG_WARNING, "%s is not a valid netmask\n", nm); free(ha); return path; } if (!inet_aton(tmp, &ha->netaddr)) { - ast_log(LOG_WARNING, "%s not a valid IP\n", tmp); + ast_log(LOG_WARNING, "%s is not a valid IP\n", tmp); free(ha); return path; } diff --git a/cdr.c b/cdr.c index d6c869f2ab963286c0dc7d9ce1be5e18b91e03fc..3c5a1d957ac7ea02c8a5e3644a226c93ff011b29 100755 --- a/cdr.c +++ b/cdr.c @@ -209,7 +209,7 @@ int ast_cdr_disposition(struct ast_cdr *cdr, int cause) break; default: res = -1; - ast_log(LOG_WARNING, "We don't handle that cause yet\n"); + ast_log(LOG_WARNING, "Cause not handled\n"); } cdr = cdr->next; } diff --git a/channel.c b/channel.c index 68734d0313320b808afdfd4a0a1268a13b00a2a5..f601d4bea46240971cdf169d312927a63bff4249 100755 --- a/channel.c +++ b/channel.c @@ -916,7 +916,7 @@ int ast_waitfor_n_fd(int *fds, int n, int *ms, int *exception) pfds = alloca(sizeof(struct pollfd) * n); if (!pfds) { - ast_log(LOG_WARNING, "alloca failed! bad things will happen.\n"); + ast_log(LOG_ERROR, "Out of memory\n"); return -1; } if (*ms > 0) @@ -981,7 +981,7 @@ struct ast_channel *ast_waitfor_nandfds(struct ast_channel **c, int n, int *fds, pfds = alloca(sizeof(struct pollfd) * (n * AST_MAX_FDS + nfds)); if (!pfds) { - ast_log(LOG_WARNING, "alloca failed! bad things will happen.\n"); + ast_log(LOG_ERROR, "Out of memory\n"); *outfd = -1; return NULL; } diff --git a/channels/chan_sip.c b/channels/chan_sip.c index 9246a01ba846fd2bd8aa55c401603c48611cfc0b..66f64c9f7e4b7195b848f8779f1905c3ed2ad47d 100755 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -5779,8 +5779,8 @@ static void receive_message(struct sip_pvt *p, struct sip_request *req) /*--- sip_show_inuse: CLI Command to show calls within limits set by outgoinglimit and incominglimit ---*/ static int sip_show_inuse(int fd, int argc, char *argv[]) { -#define FORMAT "%-15.15s %-15.15s %-15.15s %-15.15s %-15.15s\n" -#define FORMAT2 "%-15.15s %-15.15s %-15.15s %-15.15s %-15.15s\n" +#define FORMAT "%-25.25s %-15.15s %-15.15s %-15.15s %-15.15s\n" +#define FORMAT2 "%-25.25s %-15.15s %-15.15s %-15.15s %-15.15s\n" char ilimits[40] = ""; char olimits[40] = ""; char iused[40]; @@ -5831,7 +5831,7 @@ static int sip_show_users(int fd, int argc, char *argv[]) regex_t regexbuf; int havepattern = 0; -#define FORMAT "%-15.15s %-15.15s %-15.15s %-15.15s %-5.5s%-5.5s\n" +#define FORMAT "%-25.25s %-15.15s %-15.15s %-15.15s %-5.5s%-5.5s\n" if (argc > 4) return RESULT_SHOWUSAGE; @@ -5875,8 +5875,8 @@ static int sip_show_peers(int fd, int argc, char *argv[]) regex_t regexbuf; int havepattern = 0; -#define FORMAT2 "%-15.15s %-15.15s %s %s %s %-15.15s %-8s %-10s\n" -#define FORMAT "%-15.15s %-15.15s %s %s %s %-15.15s %-8d %-10s\n" +#define FORMAT2 "%-25.25s %-15.15s %-3.3s %-3.3s %-3.3s %-15.15s %-8s %-10s\n" +#define FORMAT "%-25.25s %-15.15s %-3.3s %-3.3s %-3.3s %-15.15s %-8d %-10s\n" char name[256] = ""; char iabuf[INET_ADDRSTRLEN]; @@ -6409,24 +6409,24 @@ static void receive_info(struct sip_pvt *p, struct sip_request *req) event = 11; else event = atoi(buf); - if (event < 10) { - resp = '0' + event; - } else if (event < 11) { - resp = '*'; - } else if (event < 12) { - resp = '#'; - } else if (event < 16) { - resp = 'A' + (event - 12); - } + if (event < 10) { + resp = '0' + event; + } else if (event < 11) { + resp = '*'; + } else if (event < 12) { + resp = '#'; + } else if (event < 16) { + resp = 'A' + (event - 12); + } /* Build DTMF frame and deliver to PBX for transmission to other call leg*/ - memset(&f, 0, sizeof(f)); - f.frametype = AST_FRAME_DTMF; - f.subclass = resp; - f.offset = 0; - f.data = NULL; - f.datalen = 0; - ast_queue_frame(p->owner, &f); - } + memset(&f, 0, sizeof(f)); + f.frametype = AST_FRAME_DTMF; + f.subclass = resp; + f.offset = 0; + f.data = NULL; + f.datalen = 0; + ast_queue_frame(p->owner, &f); + } transmit_response(p, "200 OK", req); return; } else { @@ -9271,8 +9271,8 @@ static int reload_config(void) if (sipsock < 0) { ast_log(LOG_WARNING, "Unable to create SIP socket: %s\n", strerror(errno)); } else { - /* Allow SIP clients on the same host to access us: */ - const int reuseFlag = 1; + /* Allow SIP clients on the same host to access us: */ + const int reuseFlag = 1; setsockopt(sipsock, SOL_SOCKET, SO_REUSEADDR, (const char*)&reuseFlag, sizeof reuseFlag); diff --git a/include/asterisk/cdr.h b/include/asterisk/cdr.h index 6617573065be012cc5172bae177b4adface764b0..7f6f6a9a4e889d4a3f85f6ae235284ed5273bc13 100755 --- a/include/asterisk/cdr.h +++ b/include/asterisk/cdr.h @@ -41,7 +41,7 @@ struct ast_channel; /*! Responsible for call detail data */ struct ast_cdr { /*! Caller*ID with text */ - char clid[AST_MAX_EXTENSION]; + char clid[AST_MAX_EXTENSION]; /*! Caller*ID number */ char src[AST_MAX_EXTENSION]; /*! Destination extension */