summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKwanghoon Son <k.son@samsung.com>2022-08-16 03:18:01 -0400
committerKwanghoon Son <k.son@samsung.com>2022-08-17 00:50:09 -0400
commit21b5067659b4a9e3686a2a54be26ed9a72a7cc72 (patch)
tree7345a597e4a92fff0c7db825b7505b9b5f48461a
parent0997d944e2dadbfcd603da0fe84e38860955f447 (diff)
downloadvision-source-tizen_7.0_hotfix.tar.gz
vision-source-tizen_7.0_hotfix.tar.bz2
vision-source-tizen_7.0_hotfix.zip
[Version] : 0.0.6 [Issue type] : Bug fix sizeof return architecture pointer size. Change it to snprintf Change-Id: I5ff9a2b175f180516cefc459058fd059c23b7ff1 Signed-off-by: Kwanghoon Son <k.son@samsung.com>
-rw-r--r--packaging/vision-source.spec2
-rw-r--r--src/vision_source.c15
2 files changed, 12 insertions, 5 deletions
diff --git a/packaging/vision-source.spec b/packaging/vision-source.spec
index d7735d9..43d9f4a 100644
--- a/packaging/vision-source.spec
+++ b/packaging/vision-source.spec
@@ -1,6 +1,6 @@
Name: vision-source
Summary: vision source
-Version: 0.0.6
+Version: 0.0.7
Release: 0
Group: Multimedia/Framework
License: Apache-2.0
diff --git a/src/vision_source.c b/src/vision_source.c
index 5983538..acf2e19 100644
--- a/src/vision_source.c
+++ b/src/vision_source.c
@@ -56,6 +56,8 @@ int _vision_source_dlsym(vision_source_internal_s *handle)
int _vision_source_attach(const char *backend_name,
vision_source_internal_s *handle)
{
+ LOGD("ENTER");
+ LOGI("backend %s connected", backend_name);
handle->dl_handle = dlopen(backend_name, RTLD_LAZY);
VISION_SOURCE_NULL_ARG_CHECK(handle->dl_handle);
@@ -64,11 +66,13 @@ int _vision_source_attach(const char *backend_name,
dlclose(handle->dl_handle);
return ret;
}
+ LOGD("EXIT");
return VISION_SOURCE_ERROR_NONE;
}
int _vision_source_get_backend(char *name)
{
+ LOGD("ENTER");
dictionary *ini = iniparser_load(INI_PATH);
if (ini == NULL) {
return VISION_SOURCE_ERROR_INVALID_PARAMETER;
@@ -80,21 +84,21 @@ int _vision_source_get_backend(char *name)
return VISION_SOURCE_ERROR_INVALID_PARAMETER;
}
- strncat(name, backend_name, sizeof(backend_name));
- const char *suffix = ".so";
- strncat(name, suffix, sizeof(suffix));
+ snprintf(name, MAX_BACKEND_NAME, "libvision-source-%s.so", backend_name);
iniparser_freedict(ini);
+ LOGD("EXIT");
return VISION_SOURCE_ERROR_NONE;
}
int vision_source_init(vision_source_h *handle)
{
+ LOGD("ENTER");
VISION_SOURCE_NULL_ARG_CHECK(handle);
vision_source_internal_s *source_handle = NULL;
- char backend_tmp[MAX_BACKEND_NAME] = { "libvision-source-" };
+ char backend_tmp[MAX_BACKEND_NAME];
int ret = _vision_source_get_backend(backend_tmp);
if (ret != VISION_SOURCE_ERROR_NONE) {
return ret;
@@ -111,11 +115,13 @@ int vision_source_init(vision_source_h *handle)
}
*handle = source_handle;
+ LOGD("EXIT");
return VISION_SOURCE_ERROR_NONE;
}
int vision_source_exit(vision_source_h handle)
{
+ LOGD("ENTER");
VISION_SOURCE_NULL_ARG_CHECK(handle);
vision_source_internal_s *source_handle =
(vision_source_internal_s *) handle;
@@ -133,6 +139,7 @@ int vision_source_exit(vision_source_h handle)
}
free(source_handle);
+ LOGD("EXIT");
return VISION_SOURCE_ERROR_NONE;
}