summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--res/res_agi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/res/res_agi.c b/res/res_agi.c
index 91dea088c..1809c6d5a 100644
--- a/res/res_agi.c
+++ b/res/res_agi.c
@@ -3501,7 +3501,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");
}
}
}
@@ -3616,7 +3616,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);