summaryrefslogtreecommitdiff
path: root/main/endpoints.c
diff options
context:
space:
mode:
authorMatthew Jordan <mjordan@digium.com>2014-07-23 16:46:13 +0000
committerMatthew Jordan <mjordan@digium.com>2014-07-23 16:46:13 +0000
commitccc6e8bd170ed6a53158e2307237c99b6f33d6e6 (patch)
tree9ef2bf03fab223e4ea35cebc9950580fa73e3f07 /main/endpoints.c
parent321efa785b154d0db300c908daf927d9c9fabe60 (diff)
endpoints: Fix failing unit tests from r419196
This patch does two things: (1) It updates the unit tests to expect additional stasis messages. More messages are now sent to the endpoint topic, due to forwarding all channel messages and the forwarding relationship set up between endpoints themselves. (2) Remove the technology forwarding subscription during ast_endpoint_shutdown. This prevents an improper double shutdown of an endpoint from occurring. ........ Merged revisions 419318 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@419319 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/endpoints.c')
-rw-r--r--main/endpoints.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/main/endpoints.c b/main/endpoints.c
index 985f6e634..07687eecc 100644
--- a/main/endpoints.c
+++ b/main/endpoints.c
@@ -194,8 +194,6 @@ static void endpoint_dtor(void *obj)
ao2_cleanup(endpoint->router);
endpoint->router = NULL;
- endpoint->tech_forward = stasis_forward_cancel(endpoint->tech_forward);
-
stasis_cp_single_unsubscribe(endpoint->topics);
endpoint->topics = NULL;
@@ -368,6 +366,7 @@ void ast_endpoint_shutdown(struct ast_endpoint *endpoint)
}
ao2_unlink(endpoints, endpoint);
+ endpoint->tech_forward = stasis_forward_cancel(endpoint->tech_forward);
clear_msg = create_endpoint_snapshot_message(endpoint);
if (clear_msg) {