aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-28 18:01:52 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-09-28 18:01:52 +0000
commit217df85e2a6682758e6ea3d816c57bccc41079fc (patch)
treed46fe3e54a7103b119b3f59c8abb9fcc885c8afb /apps
parentaec96f88739ffa4c2545f57a0a5e9cf5649729f0 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@43931 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'apps')
-rw-r--r--apps/app_alarmreceiver.c2
-rw-r--r--apps/app_festival.c2
-rw-r--r--apps/app_hasnewvoicemail.c2
-rw-r--r--apps/app_queue.c32
4 files changed, 18 insertions, 20 deletions
diff --git a/apps/app_alarmreceiver.c b/apps/app_alarmreceiver.c
index ae564d841..6ef78f5eb 100644
--- a/apps/app_alarmreceiver.c
+++ b/apps/app_alarmreceiver.c
@@ -145,7 +145,7 @@ static void database_increment( char *key )
res = ast_db_put(db_family, key, value);
if((res)&&(option_verbose >= 4))
- ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: database_increment write error");
+ ast_verbose(VERBOSE_PREFIX_4 "AlarmReceiver: database_increment write error\n");
return;
}
diff --git a/apps/app_festival.c b/apps/app_festival.c
index 941e1b7a0..7c69dc8b9 100644
--- a/apps/app_festival.c
+++ b/apps/app_festival.c
@@ -471,7 +471,7 @@ static int festival_exec(struct ast_channel *chan, void *vdata)
* */
if ( read_data == -1 )
{
- ast_log(LOG_WARNING,"Unable to read from cache/festival fd");
+ ast_log(LOG_WARNING,"Unable to read from cache/festival fd\n");
close(fd);
ast_config_destroy(cfg);
LOCAL_USER_REMOVE(u);
diff --git a/apps/app_hasnewvoicemail.c b/apps/app_hasnewvoicemail.c
index dbfea6a65..7578c10c9 100644
--- a/apps/app_hasnewvoicemail.c
+++ b/apps/app_hasnewvoicemail.c
@@ -260,7 +260,7 @@ static char *acf_vmcount_exec(struct ast_channel *chan, char *cmd, char *data, c
args = ast_strdupa(data);
if (!args) {
- ast_log(LOG_ERROR, "Out of memory");
+ ast_log(LOG_ERROR, "Out of memory\n");
LOCAL_USER_REMOVE(u);
return buf;
}
diff --git a/apps/app_queue.c b/apps/app_queue.c
index 1a12bceeb..ec53d6641 100644
--- a/apps/app_queue.c
+++ b/apps/app_queue.c
@@ -3306,7 +3306,7 @@ static void reload_queues(void)
struct ast_config *cfg;
char *cat, *tmp;
struct ast_variable *var;
- struct member *prev, *cur, *newm;
+ struct member *prev, *cur, *newm, *next;
int new;
char *general_val = NULL;
char interface[80];
@@ -3405,23 +3405,21 @@ static void reload_queues(void)
}
/* Free remaining members marked as delme */
- for (prev = NULL, newm = NULL, cur = q->members; cur; prev = cur, cur = cur->next) {
- if (newm) {
- free(newm);
- newm = NULL;
- }
-
- if (cur->delme) {
- if (prev) {
- prev->next = cur->next;
- newm = cur;
- } else {
- q->members = cur->next;
- newm = cur;
- }
- remove_from_interfaces(cur->interface);
- }
+ for (prev = NULL, cur = q->members, next = cur ? cur->next : NULL;
+ cur;
+ cur = next, next = cur ? cur->next : NULL) {
+ if (!cur->delme)
+ continue;
+
+ if (prev)
+ prev->next = next;
+ else
+ q->members = next;
+
+ remove_from_interfaces(cur->interface);
+ free(cur);
}
+
if (!new)
ast_mutex_unlock(&q->lock);
if (new) {