Misc formatting cleanups

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3279 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.0
James Golovich 22 years ago
parent 024f486810
commit 3f9c34f415

@ -67,13 +67,11 @@ void ast_free_ha(struct ast_ha *ha)
/* 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;
}
}
/* Create duplicate of ha structure */
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 */
}
struct ast_ha *ast_append_ha(char *sense, char *stuff, struct ast_ha *path)
{
struct ast_ha *ha = malloc(sizeof(struct ast_ha));

@ -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) {
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");
}

@ -143,7 +143,7 @@ int ast_shutting_down(void)
void ast_channel_setwhentohangup(struct ast_channel *chan, time_t offset)
{
time_t myt;
time_t myt;
time(&myt);
if (offset)
@ -169,7 +169,7 @@ int ast_channel_register_ex(char *type, char *description, int capabilities,
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);

@ -445,8 +445,7 @@ static int cfg_process(struct ast_config *tmp, struct ast_category **_tmpc, stru
#ifdef PRESERVE_COMMENTS
,struct ast_comment_struct *
#endif
);
);
struct ast_variable *v;
#ifdef PRESERVE_COMMENTS
struct ast_comment *com = NULL;

@ -167,7 +167,7 @@ int ast_playtones_start(struct ast_channel *chan, int vol, const char *playlst,
else
separator = ",";
s = strsep(&stringp,separator);
while(s && *s) {
while (s && *s) {
int freq1, freq2, time, modulate=0;
if (s[0]=='!')

@ -326,26 +326,25 @@ static void rebuild_matrix(int samples)
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")) {
if (argv[2] && !strcasecmp(argv[2],"recalc")) {
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");
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);
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");

Loading…
Cancel
Save