From 1073925bb4a914486b1c60b8bf680a627a69d95d Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Fri, 7 Mar 2008 17:45:14 +0000 Subject: [PATCH] Fri Mar 7 11:46:34 EST 2008 Pekka.Pessi@nokia.com * su_root.c: su_task_execute() now accepts NULL as return_value pointer git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7823 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/libsofia-sip-ua/su/su_root.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libs/sofia-sip/libsofia-sip-ua/su/su_root.c b/libs/sofia-sip/libsofia-sip-ua/su/su_root.c index 86c8b5d168..8ed26c1dde 100644 --- a/libs/sofia-sip/libsofia-sip-ua/su/su_root.c +++ b/libs/sofia-sip/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); }