From: Sangyoon Jang Date: Tue, 8 Sep 2015 04:44:02 +0000 (+0900) Subject: Save empty string when metadata value isn't set X-Git-Tag: accepted/tizen/mobile/20150908.231345^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Ftizen_3.0.m1_mobile;p=platform%2Fcore%2Fappfw%2Fpkgmgr-info.git Save empty string when metadata value isn't set Change-Id: Iac07b79981e688013f9478eb4aca9fa24da3c8aa Signed-off-by: Sangyoon Jang --- diff --git a/parser/pkgmgr_parser_db.c b/parser/pkgmgr_parser_db.c index 94b3aff..0532a88 100644 --- a/parser/pkgmgr_parser_db.c +++ b/parser/pkgmgr_parser_db.c @@ -919,7 +919,7 @@ static int __insert_uiapplication_appmetadata_info(manifest_x *mfx) snprintf(query, MAX_QUERY_LEN, "insert into package_app_app_metadata(app_id, md_key, md_value) " \ "values('%s','%s', '%s')",\ - up->appid, md->key, md->value); + up->appid, md->key, md->value ? md->value : ""); ret = __exec_query(query); if (ret == -1) { _LOGD("Package UiApp Metadata Info DB Insert Failed\n"); @@ -1245,7 +1245,7 @@ static int __insert_serviceapplication_appmetadata_info(manifest_x *mfx) snprintf(query, MAX_QUERY_LEN, "insert into package_app_app_metadata(app_id, md_key, md_value) " \ "values('%s','%s', '%s')",\ - sp->appid, md->key, md->value); + sp->appid, md->key, md->value ? md->value : ""); ret = __exec_query(query); if (ret == -1) { _LOGD("Package ServiceApp Metadata Info DB Insert Failed\n");