mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-11-03 04:17:17 -05:00
Fix: Skip loading of geoip database if none is given
This commit is contained in:
parent
1b7db528f4
commit
64ab166225
@ -57,6 +57,11 @@ geoip_db_t * geoip_db_new(const char *filename)
|
||||
MMDB_s mmdb;
|
||||
int status;
|
||||
|
||||
if (!filename) {
|
||||
ICECAST_LOG_INFO("No geoip database given");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
status = MMDB_open(filename, MMDB_MODE_MMAP, &mmdb);
|
||||
if (status != MMDB_SUCCESS) {
|
||||
if (status == MMDB_IO_ERROR) {
|
||||
|
Loading…
Reference in New Issue
Block a user