mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-21 09:10:36 +00:00
Misc formatting cleanups
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
7
acl.c
7
acl.c
@@ -67,13 +67,11 @@ void ast_free_ha(struct ast_ha *ha)
|
|||||||
|
|
||||||
/* Copy HA structure */
|
/* Copy HA structure */
|
||||||
static void ast_copy_ha(struct ast_ha *from, struct ast_ha *to)
|
static void ast_copy_ha(struct ast_ha *from, struct ast_ha *to)
|
||||||
{
|
{
|
||||||
|
|
||||||
memcpy(&to->netaddr, &from->netaddr, sizeof(from->netaddr));
|
memcpy(&to->netaddr, &from->netaddr, sizeof(from->netaddr));
|
||||||
memcpy(&to->netmask, &from->netmask, sizeof(from->netmask));
|
memcpy(&to->netmask, &from->netmask, sizeof(from->netmask));
|
||||||
to->sense = from->sense;
|
to->sense = from->sense;
|
||||||
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/* Create duplicate of ha structure */
|
/* Create duplicate of ha structure */
|
||||||
static struct ast_ha *ast_duplicate_ha(struct ast_ha *original)
|
static struct ast_ha *ast_duplicate_ha(struct ast_ha *original)
|
||||||
@@ -109,7 +107,6 @@ struct ast_ha *ast_duplicate_ha_list(struct ast_ha *original)
|
|||||||
return (ret); /* Return start of list */
|
return (ret); /* Return start of list */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
|
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
|
||||||
{
|
{
|
||||||
struct ast_ha *ha = malloc(sizeof(struct ast_ha));
|
struct ast_ha *ha = malloc(sizeof(struct ast_ha));
|
||||||
|
|||||||
3
cdr.c
3
cdr.c
@@ -503,11 +503,10 @@ void ast_cdr_reset(struct ast_cdr *cdr, int post)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr) {
|
void ast_cdr_append(struct ast_cdr *cdr, struct ast_cdr *newcdr) {
|
||||||
if(cdr) {
|
if (cdr) {
|
||||||
while(cdr->next)
|
while(cdr->next)
|
||||||
cdr = cdr->next;
|
cdr = cdr->next;
|
||||||
cdr->next = newcdr;
|
cdr->next = newcdr;
|
||||||
} else
|
} else
|
||||||
ast_log(LOG_ERROR, "Can't append a CDR to NULL!\n");
|
ast_log(LOG_ERROR, "Can't append a CDR to NULL!\n");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ int ast_shutting_down(void)
|
|||||||
|
|
||||||
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset)
|
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset)
|
||||||
{
|
{
|
||||||
time_t myt;
|
time_t myt;
|
||||||
|
|
||||||
time(&myt);
|
time(&myt);
|
||||||
if (offset)
|
if (offset)
|
||||||
@@ -169,7 +169,7 @@ int ast_channel_register_ex(char *type, char *description, int capabilities,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
chan = backends;
|
chan = backends;
|
||||||
while(chan) {
|
while (chan) {
|
||||||
if (!strcasecmp(type, chan->type)) {
|
if (!strcasecmp(type, chan->type)) {
|
||||||
ast_log(LOG_WARNING, "Already have a handler for type '%s'\n", type);
|
ast_log(LOG_WARNING, "Already have a handler for type '%s'\n", type);
|
||||||
ast_mutex_unlock(&chlock);
|
ast_mutex_unlock(&chlock);
|
||||||
|
|||||||
3
config.c
3
config.c
@@ -445,8 +445,7 @@ static int cfg_process(struct ast_config *tmp, struct ast_category **_tmpc, stru
|
|||||||
#ifdef PRESERVE_COMMENTS
|
#ifdef PRESERVE_COMMENTS
|
||||||
,struct ast_comment_struct *
|
,struct ast_comment_struct *
|
||||||
#endif
|
#endif
|
||||||
);
|
);
|
||||||
|
|
||||||
struct ast_variable *v;
|
struct ast_variable *v;
|
||||||
#ifdef PRESERVE_COMMENTS
|
#ifdef PRESERVE_COMMENTS
|
||||||
struct ast_comment *com = NULL;
|
struct ast_comment *com = NULL;
|
||||||
|
|||||||
@@ -167,7 +167,7 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
|
|||||||
else
|
else
|
||||||
separator = ",";
|
separator = ",";
|
||||||
s = strsep(&stringp,separator);
|
s = strsep(&stringp,separator);
|
||||||
while(s && *s) {
|
while (s && *s) {
|
||||||
int freq1, freq2, time, modulate=0;
|
int freq1, freq2, time, modulate=0;
|
||||||
|
|
||||||
if (s[0]=='!')
|
if (s[0]=='!')
|
||||||
|
|||||||
@@ -326,26 +326,25 @@ static void rebuild_matrix(int samples)
|
|||||||
static int show_translation(int fd, int argc, char *argv[])
|
static int show_translation(int fd, int argc, char *argv[])
|
||||||
{
|
{
|
||||||
#define SHOW_TRANS 11
|
#define SHOW_TRANS 11
|
||||||
int x,y,z;
|
int x, y, z;
|
||||||
char line[80];
|
char line[80];
|
||||||
if (argc > 4)
|
if (argc > 4)
|
||||||
return RESULT_SHOWUSAGE;
|
return RESULT_SHOWUSAGE;
|
||||||
|
|
||||||
if(argv[2] && !strcasecmp(argv[2],"recalc")) {
|
if (argv[2] && !strcasecmp(argv[2],"recalc")) {
|
||||||
z = argv[3] ? atoi(argv[3]) : 1;
|
z = argv[3] ? atoi(argv[3]) : 1;
|
||||||
|
|
||||||
if(z <= 0) {
|
if (z <= 0) {
|
||||||
ast_cli(fd," C'mon let's be serious here... defaulting to 1.\n");
|
ast_cli(fd," C'mon let's be serious here... defaulting to 1.\n");
|
||||||
z = 1;
|
z = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(z > MAX_RECALC) {
|
if (z > MAX_RECALC) {
|
||||||
ast_cli(fd," Maximum limit of recalc exceeded by %d, truncating value to %d\n",z-MAX_RECALC,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;
|
z = MAX_RECALC;
|
||||||
}
|
}
|
||||||
ast_cli(fd," Recalculating Codec Translation (number of sample seconds: %d)\n\n",z);
|
ast_cli(fd," Recalculating Codec Translation (number of sample seconds: %d)\n\n",z);
|
||||||
rebuild_matrix(z);
|
rebuild_matrix(z);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ast_cli(fd, " Translation times between formats (in milliseconds)\n");
|
ast_cli(fd, " Translation times between formats (in milliseconds)\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user