From: Sangyoon Jang Date: Thu, 8 Dec 2016 08:26:01 +0000 (+0900) Subject: Fix getting pkgtype from request X-Git-Tag: accepted/tizen/3.0/common/20161212.060358~1 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fappfw%2Fpkgmgr-server.git;a=commitdiff_plain;h=d017fb753c147bddde26c874aa56b29c1d58ea5f Fix getting pkgtype from request Change-Id: I9d85af7f9da1f5c7615ee1d3c403054dc673e8d6 Signed-off-by: Sangyoon Jang --- diff --git a/src/request.c b/src/request.c index f7c10fb..7fb6e20 100644 --- a/src/request.c +++ b/src/request.c @@ -322,7 +322,7 @@ static int __handle_request_install(uid_t caller_uid, } pkgtype = _get_pkgtype_from_file(pkgpath); - if (!pkgtype && arg_pkgtype) + if (!pkgtype && arg_pkgtype && strlen(arg_pkgtype)) pkgtype = (const char *)arg_pkgtype; if (pkgtype == NULL) { g_dbus_method_invocation_return_value(invocation, @@ -411,7 +411,7 @@ static int __handle_request_mount_install(uid_t caller_uid, } pkgtype = _get_pkgtype_from_file(pkgpath); - if (!pkgtype && arg_pkgtype) + if (!pkgtype && arg_pkgtype && strlen(arg_pkgtype)) pkgtype = (const char *)arg_pkgtype; if (pkgtype == NULL) { g_dbus_method_invocation_return_value(invocation,