Fix error that set priv id 42/124742/1
authorseungha.son <seungha.son@samsung.com>
Wed, 12 Apr 2017 08:24:14 +0000 (17:24 +0900)
committerseungha.son <seungha.son@samsung.com>
Wed, 12 Apr 2017 08:31:39 +0000 (17:31 +0900)
Signed-off-by: seungha.son <seungha.son@samsung.com>
Change-Id: I15c7d124ed0f3162bba8c6b2a4c928275554805b

src/notification_noti.c

index 75dd89d..efdbf00 100755 (executable)
@@ -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)