From 41ce2c3aca241a3866246e68fc7b91e6151e2f51 Mon Sep 17 00:00:00 2001 From: Joe Zhao Date: Sun, 6 Sep 2015 15:32:24 -0600 Subject: fixed error 139 --- logging.cpp | 3 +-- totimer.cpp | 2 +- totimer.h | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/logging.cpp b/logging.cpp index 798f00f..e91f90f 100644 --- a/logging.cpp +++ b/logging.cpp @@ -28,7 +28,7 @@ void log(tres* res,int code) if( rc ){ fprintf(stderr, "Can't open database: %s\n", sqlite3_errmsg(db)); sqlite3_close(db); - exit(0); + return; } sprintf(sqlop,"insert into log (Cat) Values ('%s');",res->reason); rc = sqlite3_exec(db, sqlop, NULL, 0, &zErrMsg); @@ -38,7 +38,6 @@ void log(tres* res,int code) } sqlite3_close(db); } - delete res->reason; delete res; tray_deactivate(); } \ No newline at end of file diff --git a/totimer.cpp b/totimer.cpp index ec9b5dd..b4209dd 100644 --- a/totimer.cpp +++ b/totimer.cpp @@ -69,7 +69,7 @@ void timer_set(tres* lastres, guint32 wait) { timeout=true; lastres->time = lastres->time + wait; - timerid = g_timeout_add(wait*60*1000,(GSourceFunc)notify,lastres); + timerid = g_timeout_add(wait*1000,(GSourceFunc)notify,lastres); } } diff --git a/totimer.h b/totimer.h index 0bbd5bb..f529360 100644 --- a/totimer.h +++ b/totimer.h @@ -9,7 +9,7 @@ #include "logging.h" #include "glib.h" -#define POTIME 25 +#define POTIME 1 #define POTEXT 5 void timer_init(); -- cgit v1.2.3-70-g09d2