diff options
-rwxr-xr-x | .cproject | 38 | ||||
-rwxr-xr-x | src/alarm_engine.c | 8 | ||||
-rwxr-xr-x | src/main.c | 9 |
3 files changed, 36 insertions, 19 deletions
@@ -27,17 +27,11 @@ <option defaultValue="gnu.cpp.compiler.debugging.level.max" id="sbi.gnu.cpp.compiler.option.debugging.level.core.141050907" name="Debug level" superClass="sbi.gnu.cpp.compiler.option.debugging.level.core" useByScannerDiscovery="false" valueType="enumerated"/> <option defaultValue="false" id="sbi.gnu.cpp.compiler.option.misc.pic.core.649876876" name="-fPIC option" superClass="sbi.gnu.cpp.compiler.option.misc.pic.core" useByScannerDiscovery="false" valueType="boolean"/> <option id="sbi.gnu.cpp.compiler.option.1635922497" name="Tizen-Target" superClass="sbi.gnu.cpp.compiler.option" useByScannerDiscovery="false" valueType="userObjs"> - <listOptionValue builtIn="false" value="wearable-3.0-emulator.core_llvm37.i386.core.app"/> + <listOptionValue builtIn="false" value="wearable-3.0-emulator.core.private.20161124_1_llvm37.i386.core.app"/> </option> <option id="sbi.gnu.cpp.compiler.option.frameworks_inc.core.1462225429" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.cpp.compiler.option.frameworks_inc.core" useByScannerDiscovery="false" valueType="includePath"> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-watch""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> @@ -73,6 +67,7 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-extension""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efreet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1/eina""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eio-1""/> @@ -89,10 +84,14 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/fontconfig""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/freetype2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/gio-unix-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/glib-2.0""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/harfbuzz""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotcon""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/json-glib-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/location""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/maps""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media""/> @@ -100,16 +99,22 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/messaging""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/metadata-editor""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minizip""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/msg-service""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/network""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/notification""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/nsd/""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/phonenumber-utils""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/rua/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/sensor""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony-client""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ug-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vconf""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> @@ -136,17 +141,11 @@ <option defaultValue="gnu.c.debugging.level.max" id="sbi.gnu.c.compiler.option.debugging.level.core.851660263" name="Debug level" superClass="sbi.gnu.c.compiler.option.debugging.level.core" useByScannerDiscovery="false" valueType="enumerated"/> <option defaultValue="false" id="sbi.gnu.c.compiler.option.misc.pic.core.595554805" name="-fPIC option" superClass="sbi.gnu.c.compiler.option.misc.pic.core" useByScannerDiscovery="false" valueType="boolean"/> <option id="sbi.gnu.c.compiler.option.977795878" name="Tizen-Target" superClass="sbi.gnu.c.compiler.option" useByScannerDiscovery="false" valueType="userObjs"> - <listOptionValue builtIn="false" value="wearable-3.0-emulator.core_llvm37.i386.core.app"/> + <listOptionValue builtIn="false" value="wearable-3.0-emulator.core.private.20161124_1_llvm37.i386.core.app"/> </option> <option id="sbi.gnu.c.compiler.option.frameworks_inc.core.1431123454" name="Tizen-Frameworks-Include-Path" superClass="sbi.gnu.c.compiler.option.frameworks_inc.core" useByScannerDiscovery="false" valueType="includePath"> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/libxml2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> - <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-agent""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appcore-watch""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/appfw""/> @@ -182,6 +181,7 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efl-extension""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/efreet-1""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/EGL""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eina-1/eina""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/eio-1""/> @@ -198,10 +198,14 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/fontconfig""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/freetype2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/gio-unix-2.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES2""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/GLES3""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/glib-2.0""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/harfbuzz""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/iotcon""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/json-glib-1.0""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/KHR""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/location""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/maps""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/media""/> @@ -209,16 +213,22 @@ <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/messaging""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/metadata-editor""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/minizip""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/msg-service""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/network""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/notification""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/nsd/""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/phonenumber-utils""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/rua/""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/SDL2""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/sensor""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/storage""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/system""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/telephony-client""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/tzsh""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ug-1""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/ui""/> + <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/vconf""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_service""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_dali""/> <listOptionValue builtIn="false" value=""${SBI_SYSROOT}/usr/include/widget_viewer_evas""/> diff --git a/src/alarm_engine.c b/src/alarm_engine.c index bb631cd..b2ef5a8 100755 --- a/src/alarm_engine.c +++ b/src/alarm_engine.c @@ -74,10 +74,10 @@ int write_into_db(int db_id, int alarm_id, struct tm * new_time, int weekly) if (ret != SQLITE_OK) { if (alarm_cancel(alarm_id) != ALARM_ERROR_NONE) ALM_ERR("could not remove alarm"); - ALM_ERR("Insertion Error! [%s]", sqlite3_errmsg(sampleDb)); - sqlite3_free(ErrMsg); - sqlite3_close(sampleDb); /*close db instance for failed case*/ - return SQLITE_ERROR; + ALM_ERR("Insertion Error! [%s]", sqlite3_errmsg(sampleDb)); + sqlite3_free(ErrMsg); + sqlite3_close(sampleDb); /*close db instance for failed case*/ + return SQLITE_ERROR; } else ALM_INFO("insert done"); sqlite3_close(sampleDb); /*close db instance for success case*/ @@ -1009,7 +1009,10 @@ static void _save_button_pressed_edit(void *data, Evas_Object *obj, void *event_ ALM_INFO("time differnce is [%d]", diff); time_t newt = t+diff; struct tm *new_time = localtime(&newt); - new_time->tm_sec = 0; + if(!new_time) { + ALM_ERR("local time returned null"); + return; + } ALM_INFO(" new time (%d-%d-%d %d:%d) ----- %d sec", new_time->tm_mday, new_time->tm_mon, new_time->tm_year, new_time->tm_hour, new_time->tm_min, new_time->tm_sec); /* * Set alarm by using alarm API. @@ -1527,6 +1530,10 @@ static void _save_button_pressed(void *data, Evas_Object *obj, void *event_info) ALM_INFO("time differnce is [%d]", diff); time_t newt = t+diff; struct tm *new_time = localtime(&newt); + if(!new_time) { + _E("local time returned null"); + return; + } new_time->tm_sec = 0; ALM_INFO(" new time (%d-%d-%d %d:%d) ----- %d sec", new_time->tm_mday, new_time->tm_mon, new_time->tm_year, new_time->tm_hour, new_time->tm_min, new_time->tm_sec); /* |