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
This commit is contained in:
Matthew Jordan
2014-07-23 16:46:13 +00:00
parent 321efa785b
commit ccc6e8bd17
2 changed files with 18 additions and 8 deletions

View File

@@ -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) {