From: Richard Mudgett Date: Tue, 15 Nov 2011 20:09:02 +0000 (+0000) Subject: Make FastAGI HANGUP show up in AGI debug output. X-Git-Tag: 1.8.9.0-rc1~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37611b4eccb7526ce964415a11807432b338255b;p=thirdparty%2Fasterisk.git Make FastAGI HANGUP show up in AGI debug output. * Change from using send() to ast_agi_send() so the HANGUP shows up in the AGI debug output. (closes issue ASTERISK-18723) Reported by: James Van Vleet Patches: jira_asterisk_18723_v1.8.patch (license #5621) patch uploaded by rmudgett git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.8@345431 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/res/res_agi.c b/res/res_agi.c index b4a8d764a8..0e3cf66c66 100644 --- a/res/res_agi.c +++ b/res/res_agi.c @@ -3483,7 +3483,7 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi if (pid > -1) { kill(pid, SIGHUP); } else if (agi->fast) { - send(agi->ctrl, "HANGUP\n", 7, 0); + ast_agi_send(agi->fd, chan, "HANGUP\n"); } } } @@ -3598,7 +3598,7 @@ static enum agi_result run_agi(struct ast_channel *chan, char *request, AGI *agi } waitpid(pid, status, WNOHANG); } else if (agi->fast) { - send(agi->ctrl, "HANGUP\n", 7, 0); + ast_agi_send(agi->fd, chan, "HANGUP\n"); } } fclose(readf);