This fixes segfaults when opkg_update_package_lists() is called multiple times.
git-svn-id: http://opkg.googlecode.com/svn/trunk@609
e8e0d7a0-c8d9-11dd-a880-
a1081c7ac358
}
+static struct opkg_conf saved_conf;
/*** Public API ***/
int
opkg_new()
{
+ saved_conf = *conf;
+
if (opkg_conf_init())
goto err0;
int
opkg_re_read_config_files(void)
{
- pkg_hash_deinit();
- pkg_hash_init();
-
- if (pkg_hash_load_feeds())
- goto err;
-
- if (pkg_hash_load_status_files())
- goto err;
-
- return 0;
-
-err:
- pkg_hash_deinit();
- return -1;
+ opkg_free();
+ *conf = saved_conf;
+ return opkg_new();
}
void