]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
automerge commit
authorAutomerge script <automerge@asterisk.org>
Wed, 15 Feb 2006 01:04:13 +0000 (01:04 +0000)
committerAutomerge script <automerge@asterisk.org>
Wed, 15 Feb 2006 01:04:13 +0000 (01:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.2-netsec@10136 65c4cc65-6c06-0410-ace0-fbb531ad65f3

funcs/func_enum.c
res/res_agi.c

index fa291a42e3158ad3475cada0e351ea44ff984f12..07655a789ba3c5798b91c05f22cf4312933a34cf 100644 (file)
@@ -55,7 +55,7 @@ static char *function_enum(struct ast_channel *chan, char *cmd, char *data, char
 {
        int res=0;
        char tech[80];
-       char dest[80] = "";
+       char dest[256] = "";
        char *zone;
        char *options;
        struct localuser *u;
index 155722e8032ea16cfe7977eb09c7ca27177e2c31..1838f555bd542fe4fcdaab382b2f5fb2883a6cb2 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>
  *
@@ -189,17 +189,23 @@ static int launch_netscript(char *agiurl, char *argv[], int *fds, int *efd, int
                close(s);
                return -1;
        }
+
        pfds[0].fd = s;
        pfds[0].events = POLLOUT;
-       if (poll(pfds, 1, MAX_AGI_CONNECT) != 1) {
-               ast_log(LOG_WARNING, "Connect to '%s' failed!\n", agiurl);
-               close(s);
-               return -1;
+       while (poll(pfds, 1, MAX_AGI_CONNECT) != 1) {
+               if (errno != EINTR) {
+                       ast_log(LOG_WARNING, "Connect to '%s' failed: %s\n", agiurl, strerror(errno));
+                       close(s);
+                       return -1;
+               }
        }
-       if (write(s, "agi_network: yes\n", strlen("agi_network: yes\n")) < 0) {
-               ast_log(LOG_WARNING, "Connect to '%s' failed: %s\n", agiurl, strerror(errno));
-               close(s);
-               return -1;
+
+       while (write(s, "agi_network: yes\n", strlen("agi_network: yes\n")) < 0) {
+               if (errno != EINTR) {
+                       ast_log(LOG_WARNING, "Connect to '%s' failed: %s\n", agiurl, strerror(errno));
+                       close(s);
+                       return -1;
+               }
        }
 
        /* If we have a script parameter, relay it to the fastagi server */