diff options
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r-- | res/res_pjsip.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c index fd470b719..4427c4ecf 100644 --- a/res/res_pjsip.c +++ b/res/res_pjsip.c @@ -2965,13 +2965,16 @@ struct sync_task_data { static int sync_task(void *data) { struct sync_task_data *std = data; + int ret; + std->fail = std->task(std->task_data); ast_mutex_lock(&std->lock); std->complete = 1; ast_cond_signal(&std->cond); + ret = std->fail; ast_mutex_unlock(&std->lock); - return std->fail; + return ret; } int ast_sip_push_task_synchronous(struct ast_taskprocessor *serializer, int (*sip_task)(void *), void *task_data) |