chan_pjsip.c: Fix uninitialized cause value on failure.
authorRichard Mudgett <rmudgett@digium.com>
Thu, 30 Mar 2017 01:46:56 +0000 (20:46 -0500)
committerRichard Mudgett <rmudgett@digium.com>
Thu, 9 Nov 2017 13:42:34 +0000 (08:42 -0500)
Change-Id: I3f9dd3c31bd582e54a30381500077de2319d8cc3

channels/chan_pjsip.c

index 7520c2b..0160425 100644 (file)
@@ -2442,6 +2442,8 @@ static struct ast_channel *chan_pjsip_request_with_stream_topology(const char *t
 
        req_data.topology = topology;
        req_data.dest = data;
+       /* Default failure value in case ast_sip_push_task_synchronous() itself fails. */
+       req_data.cause = AST_CAUSE_FAILURE;
 
        if (ast_sip_push_task_synchronous(NULL, request, &req_data)) {
                *cause = req_data.cause;