forked from osmocom/wireshark
Get rid of unused routine (the initialization is done in
geoip_db_post_update_cb() - as the comment says, "and also once on startup"). svn path=/trunk/; revision=54726
This commit is contained in:
parent
59722b868d
commit
1f1887f47e
|
@ -228,32 +228,6 @@ geoip_db_pref_init(module_t *nameres)
|
||||||
geoip_db_paths_uat);
|
geoip_db_paths_uat);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
|
||||||
geoip_db_init(void) {
|
|
||||||
guint i;
|
|
||||||
|
|
||||||
geoip_dat_arr = g_array_new(FALSE, FALSE, sizeof(GeoIP *));
|
|
||||||
|
|
||||||
for (i = 0; i < num_geoip_db_paths; i++) {
|
|
||||||
if (geoip_db_paths[i].path) {
|
|
||||||
geoip_dat_scan_dir(geoip_db_paths[i].path);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* add fake databases for latitude and longitude (using "City" in reality) */
|
|
||||||
{
|
|
||||||
GeoIP *gi_lat;
|
|
||||||
GeoIP *gi_lon;
|
|
||||||
|
|
||||||
gi_lat = (GeoIP *)g_malloc(sizeof (GeoIP));
|
|
||||||
gi_lat->databaseType = WS_LAT_FAKE_EDITION;
|
|
||||||
g_array_append_val(geoip_dat_arr, gi_lat);
|
|
||||||
gi_lon = (GeoIP *)g_malloc(sizeof (GeoIP));
|
|
||||||
gi_lon->databaseType = WS_LON_FAKE_EDITION;
|
|
||||||
g_array_append_val(geoip_dat_arr, gi_lon);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
guint
|
guint
|
||||||
geoip_db_num_dbs(void) {
|
geoip_db_num_dbs(void) {
|
||||||
return geoip_dat_arr->len;
|
return geoip_dat_arr->len;
|
||||||
|
@ -569,9 +543,6 @@ geoip_db_get_paths(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#else /* HAVE_GEOIP */
|
#else /* HAVE_GEOIP */
|
||||||
void
|
|
||||||
geoip_db_init(void) {}
|
|
||||||
|
|
||||||
guint
|
guint
|
||||||
geoip_db_num_dbs(void) {
|
geoip_db_num_dbs(void) {
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue