From 14ff07c08952d332db59ed2af5265d8e9607dd9d Mon Sep 17 00:00:00 2001 From: Sung-jae Park Date: Tue, 5 Mar 2013 12:42:06 +0000 Subject: [PATCH] Return TRUE as default for livebox_service_touch_effect. Even if the given Id is not valid, this API should return TRUE as default. Change-Id: Icb27109d31ef1f92e13f3ca4361d29f1cf44ae3b --- packaging/liblivebox-service.spec | 2 +- src/livebox-service.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packaging/liblivebox-service.spec b/packaging/liblivebox-service.spec index afc2a7a..6b73913 100644 --- a/packaging/liblivebox-service.spec +++ b/packaging/liblivebox-service.spec @@ -1,6 +1,6 @@ Name: liblivebox-service Summary: Service API for gathering installed livebox information. -Version: 0.3.7 +Version: 0.3.8 Release: 1 Group: framework/livebox License: Flora License diff --git a/src/livebox-service.c b/src/livebox-service.c index 2dfaa1d..83eb633 100644 --- a/src/livebox-service.c +++ b/src/livebox-service.c @@ -852,14 +852,14 @@ EAPI int livebox_service_touch_effect(const char *pkgid) handle = open_db(); if (!handle) { ErrPrint("Unable to open a DB\n"); - return 0; + return 1; } ret = sqlite3_prepare_v2(handle, "SELECT touch_effect FROM client WHERE pkgid = ?", -1, &stmt, NULL); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); close_db(handle); - return 0; + return 1; } /*! @@ -871,7 +871,7 @@ EAPI int livebox_service_touch_effect(const char *pkgid) lbid = livebox_service_pkgname(pkgid); if (!lbid) { ErrPrint("Invalid appid (%s)\n", pkgid); - ret = 0; + ret = 1; goto out; } @@ -879,7 +879,7 @@ EAPI int livebox_service_touch_effect(const char *pkgid) free(lbid); if (ret != SQLITE_OK) { ErrPrint("Error: %s\n", sqlite3_errmsg(handle)); - ret = 0; + ret = 1; goto out; } -- 2.7.4