summaryrefslogtreecommitdiff
path: root/src/notification_noti.c
diff options
context:
space:
mode:
authorseungha.son <seungha.son@samsung.com>2017-04-12 17:24:14 +0900
committerseungha.son <seungha.son@samsung.com>2017-04-12 17:31:39 +0900
commit00b34a6e66f3f9c67c08996abf19e651e8607737 (patch)
tree6bdddd2182bfd9802e828f1412c36ee99d3841a9 /src/notification_noti.c
parentf293658db50d5ce66483bc5a142ace9e0f9be540 (diff)
downloadnotification-00b34a6e66f3f9c67c08996abf19e651e8607737.tar.gz
notification-00b34a6e66f3f9c67c08996abf19e651e8607737.tar.bz2
notification-00b34a6e66f3f9c67c08996abf19e651e8607737.zip
Fix error that set priv id
Signed-off-by: seungha.son <seungha.son@samsung.com> Change-Id: I15c7d124ed0f3162bba8c6b2a4c928275554805b
Diffstat (limited to 'src/notification_noti.c')
-rwxr-xr-xsrc/notification_noti.c6
1 files 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)