}
info->text = value;
info->lang = strdup(locale);
- *icon = g_list_append(*icon, info);
+ *icon = g_list_prepend(*icon, info);
return PMINFO_R_OK;
}
}
info->text = value;
info->lang = strdup(locale);
- *label = g_list_append(*label, info);
+ *label = g_list_prepend(*label, info);
return PMINFO_R_OK;
}
}
#define BUSY_WAITING_USEC (1000000 / 10 / 2) /* 0.05 sec */
-#define BUSY_WAITING_MAX 40 /* wait for max 2 sec */
+#define BUSY_WAITING_MAX 100 /* wait for max 5 sec */
static int __db_busy_handler(void *data, int count)
{
if (count < BUSY_WAITING_MAX) {
int ret;
ret = sqlite3_open_v2(path, db, flags, NULL);
- if (ret != SQLITE_OK)
+ if (ret != SQLITE_OK) {
+ sqlite3_close_v2(*db);
return ret;
+ }
ret = sqlite3_busy_handler(*db, __db_busy_handler, NULL);
if (ret != SQLITE_OK) {