diff options
author | Liu Bolun <bolunx.liu@intel.com> | 2012-11-14 10:48:16 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:03:40 -0700 |
commit | 013907bbe7ffb1c1e19b172dbbef39dceb6573ad (patch) | |
tree | 532ddd3e2694b4bbc073aefc41d477b5deed5104 | |
parent | ec2f29d0c23a6c7ea3a36e03a9635b63ac23ae35 (diff) | |
download | wrs_omxil_core-013907bbe7ffb1c1e19b172dbbef39dceb6573ad.tar.gz |
[PORT FROM MAIN]OMX Core: Checking return value of dlopen() instead of error string to workaround Bionic issue
BZ: 66993
Change to use return value of dlopen() instead of dlerror() to check whether the call to dlopen()
is successful or not, to workaround the synchronization issue of dl_err_str in Bionic.
Signed-off-by: Liu Bolun <bolunx.liu@intel.com>
Change-Id: I200fe18c8ac5841f7aeb29f44ba6d5e6dc2cf100
Reviewed-on: http://android.intel.com:8080/76392
Reviewed-by: Liu, BolunX <bolunx.liu@intel.com>
Reviewed-by: Feng, Wei <wei.feng@intel.com>
Tested-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: Tong, BoX <box.tong@intel.com>
Reviewed-by: cactus <cactus@intel.com>
Tested-by: cactus <cactus@intel.com>
-rw-r--r-- | utils/src/module.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/utils/src/module.c b/utils/src/module.c index 93ced62..c325d97 100644 --- a/utils/src/module.c +++ b/utils/src/module.c @@ -146,12 +146,11 @@ struct module *module_open(const char *file, int flag) new->ref_count = 1; new->priv = NULL; new->next = NULL; + new->handle = NULL; - dlerror(); new->handle = dlopen(file, flag); - dlerr = dlerror(); - if (dlerr) { - LOGE("dlopen failed (%s)\n", dlerr); + if (!(new->handle)) { + LOGE("dlopen failed (%s)\n", file); module_set_error(dlerr); pthread_mutex_unlock(&g_lock); goto free_new; |