aboutsummaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-01 00:05:30 +0000
committerroot <root@f38db490-d61c-443f-a65b-d21fe96a405b>2006-06-01 00:05:30 +0000
commit3322486e6cb5bc566aa9831233da192804999fe7 (patch)
treebd49ce6a33e22156fd49e9d6939512a786fd7d6d /res
parent6736fbb15e6da892a19a00b87450f2dad6087458 (diff)
automerge commit
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.2-netsec@31224 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res')
-rw-r--r--res/res_agi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 14713fcc2..ddfabb357 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -140,6 +140,7 @@ static int launch_netscript(char *agiurl, char *argv[], int *fds, int *efd, int
struct sockaddr_in sin;
struct hostent *hp;
struct ast_hostent ahp;
+ int res;
host = ast_strdupa(agiurl + 6); /* Remove agi:// */
if (!host)
@@ -192,9 +193,13 @@ static int launch_netscript(char *agiurl, char *argv[], int *fds, int *efd, int
pfds[0].fd = s;
pfds[0].events = POLLOUT;
- while (poll(pfds, 1, MAX_AGI_CONNECT) != 1) {
+ while ((res = poll(pfds, 1, MAX_AGI_CONNECT)) != 1) {
if (errno != EINTR) {
- ast_log(LOG_WARNING, "Connect to '%s' failed: %s\n", agiurl, strerror(errno));
+ if (!res) {
+ ast_log(LOG_WARNING, "FastAGI connection to '%s' timed out after MAX_AGI_CONNECT (%d) milliseconds.\n",
+ agiurl, MAX_AGI_CONNECT);
+ } else
+ ast_log(LOG_WARNING, "Connect to '%s' failed: %s\n", agiurl, strerror(errno));
close(s);
return -1;
}