]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Thu, 28 Sep 2006 18:01:52 +0000 (18:01 +0000)
committerAutomerge script <automerge@asterisk.org>
Thu, 28 Sep 2006 18:01:52 +0000 (18:01 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@43931 65c4cc65-6c06-0410-ace0-fbb531ad65f3

14 files changed:
apps/app_alarmreceiver.c
apps/app_festival.c
apps/app_hasnewvoicemail.c
apps/app_queue.c
channels/chan_misdn.c
channels/chan_sip.c
channels/chan_skinny.c
channels/iax2-provision.c
frame.c
funcs/func_timeout.c
include/asterisk/logger.h
res/res_features.c
res/res_monitor.c
res/res_musiconhold.c

index ae564d841dadccafcdd59104e13d170f7cde3603..6ef78f5eb0042b4f35013a25ccba44ed8d4dd00d 100644 (file)
@@ -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; 
 }
index 941e1b7a080f7fa0f95a40ef032b4440f2b453d0..7c69dc8b981d9395f188ec863b887c2037004e4e 100644 (file)
@@ -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);
index dbfea6a65e2b4d0b4888b6f65f6135a33f0396ac..7578c10c9b229d1f20557a9058c0499d420a2151 100644 (file)
@@ -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;
        }
index 1a12bceebee76fa43b8e368a29d725e1be939c09..ec53d6641545261b3beaba41bf69847d8fc79d3f 100644 (file)
@@ -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) {
index 111a2e121298d6e7df3b2a4d168c3f146e82b079..7ac458ca0422d106eab9ef8f1bacd03c4ed64ba0 100644 (file)
@@ -1630,7 +1630,7 @@ static int misdn_call(struct ast_channel *ast, char *dest, int timeout)
        
        {
                struct chan_list *ch=MISDN_ASTERISK_TECH_PVT(ast);
-               if (!ch) { ast_verbose("No chan_list in misdn_call"); return -1;}
+               if (!ch) { ast_verbose("No chan_list in misdn_call\n"); return -1;}
                
                newbc->capability=ast->transfercapability;
                pbx_builtin_setvar_helper(ast,"TRANSFERCAPABILITY",ast_transfercapability2str(newbc->capability));
@@ -2751,7 +2751,7 @@ static struct ast_frame *process_ast_dsp(struct chan_list *tmp, struct ast_frame
        
        f = ast_dsp_process(tmp->ast, tmp->dsp, f2);
        if (f && (f->frametype == AST_FRAME_DTMF)) {
-               ast_log(LOG_DEBUG, "Detected inband DTMF digit: %c", f->subclass);
+               ast_log(LOG_DEBUG, "Detected inband DTMF digit: %c\n", f->subclass);
                if (f->subclass == 'f' && tmp->faxdetect) {
                        /* Fax tone -- Handle and return NULL */
                        struct ast_channel *ast = tmp->ast;
index c1aef6a417a81281b122a6bd7bd43cd4f17992c7..db02bb60b847d07e18fbedb80ebeaefe7ddc1b96 100644 (file)
@@ -1170,7 +1170,7 @@ static int append_history(struct sip_pvt *p, const char *event, const char *data
        if (!recordhistory || !p)
                return 0;
        if(!(hist = malloc(sizeof(struct sip_history)))) {
-               ast_log(LOG_WARNING, "Can't allocate memory for history");
+               ast_log(LOG_WARNING, "Can't allocate memory for history\n");
                return 0;
        }
        memset(hist, 0, sizeof(struct sip_history));
@@ -11443,10 +11443,7 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
        parse_request(&req);
        req.method = find_sip_method(req.rlPart1);
        if (ast_test_flag(&req, SIP_PKT_DEBUG)) {
-               ast_verbose("--- (%d headers %d lines)", req.headers, req.lines);
-               if (req.headers + req.lines == 0) 
-                       ast_verbose(" Nat keepalive ");
-               ast_verbose("---\n");
+               ast_verbose("--- (%d headers %d lines)%s ---\n", req.headers, req.lines, (req.headers + req.lines == 0) ? " Nat keepalive" : "");
        }
 
        if (req.headers < 2) {
index 54524ce4eaba9196b2cf4c74e02869a32b96345b..c5f148726a1bb3b5b97f8f7570189a7f4187abdb 100644 (file)
@@ -1609,7 +1609,7 @@ static struct skinny_device *build_device(char *cat, struct ast_variable *v)
                                                                l->sub = sub;
                                                        } else {
                                                                /* XXX Should find a way to clean up our memory */
-                                                               ast_log(LOG_WARNING, "Out of memory allocating subchannel");
+                                                               ast_log(LOG_WARNING, "Out of memory allocating subchannel\n");
                                                        return NULL;
                                                        }
                                        }
@@ -1617,7 +1617,7 @@ static struct skinny_device *build_device(char *cat, struct ast_variable *v)
                                        d->lines = l;                   
                                } else {
                                        /* XXX Should find a way to clean up our memory */
-                                       ast_log(LOG_WARNING, "Out of memory allocating line");
+                                       ast_log(LOG_WARNING, "Out of memory allocating line\n");
                                        return NULL;
                                }
                        } else {
@@ -3178,7 +3178,7 @@ static int reload_config(void)
        if (skinnysock < 0) {
                skinnysock = socket(AF_INET, SOCK_STREAM, 0);
                if(setsockopt(skinnysock, SOL_SOCKET, SO_REUSEADDR, &on, sizeof(on)) == -1) {
-                       ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s", errno, strerror(errno));
+                       ast_log(LOG_ERROR, "Set Socket Options failed: errno %d, %s\n", errno, strerror(errno));
                        ast_config_destroy(cfg);
                        return 0;
                }
index c1b6f4b3d20ba3b1fab35144e4a78d14f794b430..b7ef989d39d8774979d8ce5d1c2dbd5b646cf1d8 100644 (file)
@@ -279,7 +279,7 @@ static int iax_template_parse(struct iax_template *cur, struct ast_config *cfg,
                if (!src) {
                        src = iax_template_find(def, 0);
                        if (!src)
-                               ast_log(LOG_WARNING, "Unable to locate default base template '%s' for creating '%s', omitting.", def, s);
+                               ast_log(LOG_WARNING, "Unable to locate default base template '%s' for creating '%s', omitting.\n", def, s);
                }
                if (!src)
                        return -1;
diff --git a/frame.c b/frame.c
index ed282f0c751558fc0346dca4aeb340602568e633..27d82d665d229c9c7ff6dca136f12cf5f5128d65 100644 (file)
--- a/frame.c
+++ b/frame.c
@@ -198,7 +198,7 @@ struct ast_frame *ast_smoother_read(struct ast_smoother *s)
        /* IF we have an optimization frame, send it */
        if (s->opt) {
                if (s->opt->offset < AST_FRIENDLY_OFFSET)
-                       ast_log(LOG_WARNING, "Returning a frame of inappropriate offset (%d).",
+                       ast_log(LOG_WARNING, "Returning a frame of inappropriate offset (%d).\n",
                                                        s->opt->offset);
                opt = s->opt;
                s->opt = NULL;
index 4e9256ef5b28236dd2a0cb0f7fcf0a75c4c1e56d..5983617aa6c5be87024bd47de5445c5229c58eef 100644 (file)
@@ -43,7 +43,7 @@ static char *builtin_function_timeout_read(struct ast_channel *chan, char *cmd,
        time_t myt;
 
        if (!data) {
-               ast_log(LOG_ERROR, "Must specify type of timeout to get.");
+               ast_log(LOG_ERROR, "Must specify type of timeout to get.\n");
                 return NULL;
        }
        
@@ -73,7 +73,7 @@ static char *builtin_function_timeout_read(struct ast_channel *chan, char *cmd,
                break;
 
        default:
-               ast_log(LOG_ERROR, "Unknown timeout type specified.");
+               ast_log(LOG_ERROR, "Unknown timeout type specified.\n");
                break;
        }
 
@@ -87,7 +87,7 @@ static void builtin_function_timeout_write(struct ast_channel *chan, char *cmd,
        struct tm myt;
 
        if (!data) {
-               ast_log(LOG_ERROR, "Must specify type of timeout to set.");
+               ast_log(LOG_ERROR, "Must specify type of timeout to set.\n");
                return;
        }
        
@@ -129,7 +129,7 @@ static void builtin_function_timeout_write(struct ast_channel *chan, char *cmd,
                break;
 
        default:
-               ast_log(LOG_ERROR, "Unknown timeout type specified.");
+               ast_log(LOG_ERROR, "Unknown timeout type specified.\n");
                break;
        }
 }
index ac764baa4cc0fe38c61c2d64fa7c6c4f96fc750e..2f5adc769640c1c22ddd9a78e4b86d8216f4d762 100644 (file)
@@ -43,7 +43,7 @@ extern "C" {
 /*! Used for sending a log message */
 /*!
        \brief This is the standard logger function.  Probably the only way you will invoke it would be something like this:
-       ast_log(LOG_WHATEVER, "Problem with the %s Captain.  We should get some more.  Will %d be enough?", "flux capacitor", 10);
+       ast_log(LOG_WHATEVER, "Problem with the %s Captain.  We should get some more.  Will %d be enough?\n", "flux capacitor", 10);
        where WHATEVER is one of ERROR, DEBUG, EVENT, NOTICE, or WARNING depending
        on which log you wish to output to. These are implemented as macros, that
        will provide the function with the needed arguments.
index fc1b4af489d0e93421f4214bbf7f6311702788ad..a33844b1e0e6f326d5cd2271a6ea560c3340c7df 100644 (file)
@@ -2062,7 +2062,7 @@ static int load_config(void)
                        char *exten, *party=NULL, *app=NULL, *app_args=NULL; 
 
                        if (!tmp_val) { 
-                               ast_log(LOG_ERROR, "res_features: strdup failed");
+                               ast_log(LOG_ERROR, "res_features: strdup failed\n");
                                continue;
                        }
                        
index adc6144b5bdaa0274b3e2146880b07b8518a089d..642114a1369ce74b9f89aa62a475c1ac1316edce 100644 (file)
@@ -298,7 +298,7 @@ int ast_monitor_change_fname(struct ast_channel *chan, const char *fname_base, i
 {
        char tmp[256];
        if (ast_strlen_zero(fname_base)) {
-               ast_log(LOG_WARNING, "Cannot change monitor filename of channel %s to null", chan->name);
+               ast_log(LOG_WARNING, "Cannot change monitor filename of channel %s to null\n", chan->name);
                return -1;
        }
        
index 426965a81eeee11efcc4439f3a6095485e8861e8..b005cd765a86009b7a8a756bf7c7a1cd283dd79e 100644 (file)
@@ -759,7 +759,7 @@ static int moh_scan_files(struct mohclass *class) {
        
        files_DIR = opendir(class->dir);
        if (!files_DIR) {
-               ast_log(LOG_WARNING, "Cannot open dir %s or dir does not exist", class->dir);
+               ast_log(LOG_WARNING, "Cannot open dir %s or dir does not exist\n", class->dir);
                return -1;
        }
 
@@ -1218,7 +1218,7 @@ int load_module(void)
                res = ast_register_application(app4, moh4_exec, synopsis4, descrip4);
 
        if (!init_classes(0)) {         /* No music classes configured, so skip it */
-               ast_log(LOG_WARNING, "No music on hold classes configured, disabling music on hold.");
+               ast_log(LOG_WARNING, "No music on hold classes configured, disabling music on hold.\n");
        } else {
                ast_install_music_functions(local_ast_moh_start, local_ast_moh_stop, local_ast_moh_cleanup);
        }