]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Tue, 11 Apr 2006 22:06:47 +0000 (22:06 +0000)
committerAutomerge script <automerge@asterisk.org>
Tue, 11 Apr 2006 22:06:47 +0000 (22:06 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@19391 65c4cc65-6c06-0410-ace0-fbb531ad65f3

Makefile
apps/app_page.c
asterisk.c
channel.c
pbx/pbx_config.c

index a238a971a0fd3779ba3f018fcbf55c8c66731e35..fec8dd4b9af8a3bfdde10d18d3529bc8417fdf36 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -652,7 +652,6 @@ bininstall: all
        if [ -n "$(OLDHEADERS)" ]; then \
                rm -f $(addprefix $(DESTDIR)$(ASTHEADERDIR)/,$(OLDHEADERS)) ;\
        fi
-       rm -f $(DESTDIR)$(ASTVARLIBDIR)/sounds/voicemail
        mkdir -p $(DESTDIR)$(ASTVARLIBDIR)/sounds
        mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-csv
        mkdir -p $(DESTDIR)$(ASTLOGDIR)/cdr-custom
@@ -671,7 +670,6 @@ bininstall: all
        else \
                echo "You need to do cvs update -d not just cvs update" ; \
        fi 
-       ( cd $(DESTDIR)$(ASTVARLIBDIR)/sounds  ; ln -s $(ASTSPOOLDIR)/voicemail . )
        if [ -f mpg123-0.59r/mpg123 ]; then $(MAKE) -C mpg123-0.59r install; fi
        @echo " +---- Asterisk Installation Complete -------+"  
        @echo " +                                           +"
index 7826d285bee573788e8fd2d14f8639a2af5979ed..6898bfa27ee04504b9527a96f3a57373fb6d2d61 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (c) 2004 - 2005 Digium, Inc.  All rights reserved.
+ * Copyright (c) 2004 - 2006 Digium, Inc.  All rights reserved.
  *
  * Mark Spencer <markster@digium.com>
  *
@@ -149,6 +149,7 @@ static int page_exec(struct ast_channel *chan, void *data)
        struct ast_app *app;
        char *tmp;
        int res=0;
+       char originator[AST_CHANNEL_NAME];
 
        if (ast_strlen_zero(data)) {
                ast_log(LOG_WARNING, "This application requires at least one argument (destination(s) to page)\n");
@@ -175,7 +176,16 @@ static int page_exec(struct ast_channel *chan, void *data)
                ast_app_parse_options(page_opts, &flags, NULL, options);
 
        snprintf(meetmeopts, sizeof(meetmeopts), "%ud|%sqxdw", confid, ast_test_flag(&flags, PAGE_DUPLEX) ? "" : "m");
+
+       ast_copy_string(originator, chan->name, sizeof(originator));
+       if ((tmp = strchr(originator, '-')))
+               *tmp = '\0';
+
        while ((tech = strsep(&tmp, "&"))) {
+               /* don't call the originating device */
+               if (!strcasecmp(tech, originator))
+                       continue;
+
                if ((resource = strchr(tech, '/'))) {
                        *resource++ = '\0';
                        launch_page(chan, meetmeopts, tech, resource);
@@ -183,6 +193,7 @@ static int page_exec(struct ast_channel *chan, void *data)
                        ast_log(LOG_WARNING, "Incomplete destination '%s' supplied.\n", tech);
                }
        }
+
        if (!ast_test_flag(&flags, PAGE_QUIET)) {
                res = ast_streamfile(chan, "beep", chan->language);
                if (!res)
index 40b822f69fb63573c9b677c44257754b4430854c..5e1423e8607d082d3d8cfd8a2be2ab5a050ae2d1 100644 (file)
@@ -615,6 +615,8 @@ static void *listener(void *unused)
                                        consoles[x].fd = s;
                                        if (ast_pthread_create(&consoles[x].t, &attr, netconsole, &consoles[x])) {
                                                ast_log(LOG_ERROR, "Unable to spawn thread to handle connection: %s\n", strerror(errno));
+                                               close(consoles[x].p[0]);
+                                               close(consoles[x].p[1]);
                                                consoles[x].fd = -1;
                                                fdprint(s, "Server failed to spawn thread\n");
                                                close(s);
index 011bdaef3e6dfb34039a4f5d82009f5726d56377..ae4c747e4e1bc9c4f29f5930e443a507e7f43eff 100644 (file)
--- a/channel.c
+++ b/channel.c
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster@digium.com>
  *
@@ -1135,7 +1135,6 @@ static void queue_frame_to_spies(struct ast_channel *chan, struct ast_frame *f,
        struct ast_frame *translated_frame = NULL;
        struct ast_channel_spy *spy;
        struct ast_channel_spy_queue *queue;
-       struct ast_channel_spy_queue *other_queue;
        struct channel_spy_trans *trans;
        struct ast_frame *last;
 
@@ -1197,48 +1196,42 @@ static void queue_frame_to_spies(struct ast_channel *chan, struct ast_frame *f,
 
                if (queue->samples > SPY_QUEUE_SAMPLE_LIMIT) {
                        if (ast_test_flag(spy, CHANSPY_TRIGGER_MODE) != CHANSPY_TRIGGER_NONE) {
-                               other_queue = (dir == SPY_WRITE) ? &spy->read_queue : &spy->write_queue;
-
-                               if (other_queue->samples == 0) {
-                                       switch (ast_test_flag(spy, CHANSPY_TRIGGER_MODE)) {
-                                       case CHANSPY_TRIGGER_READ:
-                                               if (dir == SPY_WRITE) {
-                                                       ast_set_flag(spy, CHANSPY_TRIGGER_WRITE);
-                                                       ast_clear_flag(spy, CHANSPY_TRIGGER_READ);
-                                                       if (option_debug)
-                                                               ast_log(LOG_DEBUG, "Switching spy '%s' on '%s' to write-trigger mode\n",
-                                                                       spy->type, chan->name);
-                                               }
-                                               break;
-                                       case CHANSPY_TRIGGER_WRITE:
-                                               if (dir == SPY_READ) {
-                                                       ast_set_flag(spy, CHANSPY_TRIGGER_READ);
-                                                       ast_clear_flag(spy, CHANSPY_TRIGGER_WRITE);
-                                                       if (option_debug)
-                                                               ast_log(LOG_DEBUG, "Switching spy '%s' on '%s' to read-trigger mode\n",
-                                                                       spy->type, chan->name);
-                                               }
-                                               break;
+                               switch (ast_test_flag(spy, CHANSPY_TRIGGER_MODE)) {
+                               case CHANSPY_TRIGGER_READ:
+                                       if (dir == SPY_WRITE) {
+                                               ast_set_flag(spy, CHANSPY_TRIGGER_WRITE);
+                                               ast_clear_flag(spy, CHANSPY_TRIGGER_READ);
+                                               if (option_debug)
+                                                       ast_log(LOG_DEBUG, "Switching spy '%s' on '%s' to write-trigger mode\n",
+                                                               spy->type, chan->name);
                                        }
-                                       if (option_debug)
-                                               ast_log(LOG_DEBUG, "Triggering queue flush for spy '%s' on '%s'\n",
-                                                       spy->type, chan->name);
-                                       ast_set_flag(spy, CHANSPY_TRIGGER_FLUSH);
-                                       ast_cond_signal(&spy->trigger);
-                                       ast_mutex_unlock(&spy->lock);
-                                       continue;
+                                       break;
+                               case CHANSPY_TRIGGER_WRITE:
+                                       if (dir == SPY_READ) {
+                                               ast_set_flag(spy, CHANSPY_TRIGGER_READ);
+                                               ast_clear_flag(spy, CHANSPY_TRIGGER_WRITE);
+                                               if (option_debug)
+                                                       ast_log(LOG_DEBUG, "Switching spy '%s' on '%s' to read-trigger mode\n",
+                                                               spy->type, chan->name);
+                                       }
+                                       break;
+                               }
+                               if (option_debug)
+                                       ast_log(LOG_DEBUG, "Triggering queue flush for spy '%s' on '%s'\n",
+                                               spy->type, chan->name);
+                               ast_set_flag(spy, CHANSPY_TRIGGER_FLUSH);
+                               ast_cond_signal(&spy->trigger);
+                       } else {
+                               if (option_debug)
+                                       ast_log(LOG_DEBUG, "Spy '%s' on channel '%s' %s queue too long, dropping frames\n",
+                                               spy->type, chan->name, (dir == SPY_READ) ? "read" : "write");
+                               while (queue->samples > SPY_QUEUE_SAMPLE_LIMIT) {
+                                       struct ast_frame *drop = queue->head;
+                                       
+                                       queue->samples -= drop->samples;
+                                       queue->head = drop->next;
+                                       ast_frfree(drop);
                                }
-                       }
-
-                       if (option_debug)
-                               ast_log(LOG_DEBUG, "Spy '%s' on channel '%s' %s queue too long, dropping frames\n",
-                                       spy->type, chan->name, (dir == SPY_READ) ? "read" : "write");
-                       while (queue->samples > SPY_QUEUE_SAMPLE_LIMIT) {
-                               struct ast_frame *drop = queue->head;
-
-                               queue->samples -= drop->samples;
-                               queue->head = drop->next;
-                               ast_frfree(drop);
                        }
                } else {
                        switch (ast_test_flag(spy, CHANSPY_TRIGGER_MODE)) {
index 42e43470afeeaf308a37f410cc3a68ec8c128d56..6e482b5403be133479948b5077b9e45ae2b771e3 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Asterisk -- An open source telephony toolkit.
  *
- * Copyright (C) 1999 - 2005, Digium, Inc.
+ * Copyright (C) 1999 - 2006, Digium, Inc.
  *
  * Mark Spencer <markster@digium.com>
  *
@@ -1808,7 +1808,6 @@ int load_module(void)
 
 int reload(void)
 {
-       ast_context_destroy(NULL, registrar);
        if (clearglobalvars_config)
                pbx_builtin_clear_globals();
        pbx_load_module();