1
0
Fork 0

Fix: Skip loading of geoip database if none is given

This commit is contained in:
Philipp Schafft 2024-01-22 01:25:53 +00:00
parent 1b7db528f4
commit 64ab166225
1 changed files with 5 additions and 0 deletions

View File

@ -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) {