From 00b34a6e66f3f9c67c08996abf19e651e8607737 Mon Sep 17 00:00:00 2001 From: "seungha.son" Date: Wed, 12 Apr 2017 17:24:14 +0900 Subject: [PATCH] Fix error that set priv id Signed-off-by: seungha.son Change-Id: I15c7d124ed0f3162bba8c6b2a4c928275554805b --- src/notification_noti.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/notification_noti.c b/src/notification_noti.c index 75dd89d..efdbf00 100755 --- a/src/notification_noti.c +++ b/src/notification_noti.c @@ -986,10 +986,12 @@ EXPORT_API int notification_noti_insert(notification_h noti) } ret = sqlite3_step(stmt); - if (ret == SQLITE_OK || ret == SQLITE_DONE) + if (ret == SQLITE_OK || ret == SQLITE_DONE) { + noti->priv_id = (int)sqlite3_last_insert_rowid(db); ret = NOTIFICATION_ERROR_NONE; - else + } else { ret = NOTIFICATION_ERROR_FROM_DB; + } err: if (stmt) -- 2.7.4