From 5620d31fcd475e4bbb6e10fdcd03133d12b35793 Mon Sep 17 00:00:00 2001 From: Pekka Pessi Date: Fri, 7 Mar 2008 18:46:34 +0200 Subject: [PATCH] su_root.c: su_task_execute() now accepts NULL as return_value pointer darcs-hash:20080307164634-65a35-c1f8a4d854439de9a1eebef36ed4c9a2e008fe8e.gz --- libsofia-sip-ua/su/su_root.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libsofia-sip-ua/su/su_root.c b/libsofia-sip-ua/su/su_root.c index 86c8b5d1..8ed26c1d 100644 --- a/libsofia-sip-ua/su/su_root.c +++ b/libsofia-sip-ua/su/su_root.c @@ -327,9 +327,14 @@ int su_task_execute(su_task_r const task, int (*function)(void *), void *arg, int *return_value) { + int dummy; + if (function == NULL) return (errno = EFAULT), -1; + if (return_value == NULL) + return_value = &dummy; + if (!su_port_own_thread(task->sut_port)) { return su_port_execute(task, function, arg, return_value); } -- GitLab