Check the API and its type.
authorSung-jae Park <nicesj.park@samsung.com>
Sun, 30 Jun 2013 05:23:35 +0000 (14:23 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Sun, 30 Jun 2013 05:23:35 +0000 (14:23 +0900)
Change-Id: Ieda77a5ef0e4b01c3f7230bd0db7f00035dbf158

lib/src/main.c

index bbba095..958ccde 100644 (file)
@@ -488,6 +488,9 @@ EAPI int add_to_home_shortcut(const char *appid, const char *name, int type, con
        struct result_cb_item *item;
        int ret;
 
+       if (ADD_TO_HOME_IS_LIVEBOX(type))
+               ErrPrint("Invalid type used for adding a shortcut\n");
+
        if (!s_info.initialized) {
                s_info.initialized = 1;
                com_core_add_event_callback(CONNECTOR_DISCONNECTED, disconnected_cb, NULL);
@@ -556,6 +559,9 @@ EAPI int add_to_home_livebox(const char *appid, const char *name, int type, cons
        struct result_cb_item *item;
        int ret;
 
+       if (!ADD_TO_HOME_IS_LIVEBOX(type))
+               ErrPrint("Invalid type is used for adding a livebox\n");
+
        if (!s_info.initialized) {
                s_info.initialized = 1;
                com_core_add_event_callback(CONNECTOR_DISCONNECTED, disconnected_cb, NULL);