mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04: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;
|
MMDB_s mmdb;
|
||||||
int status;
|
int status;
|
||||||
|
|
||||||
|
if (!filename) {
|
||||||
|
ICECAST_LOG_INFO("No geoip database given");
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
status = MMDB_open(filename, MMDB_MODE_MMAP, &mmdb);
|
status = MMDB_open(filename, MMDB_MODE_MMAP, &mmdb);
|
||||||
if (status != MMDB_SUCCESS) {
|
if (status != MMDB_SUCCESS) {
|
||||||
if (status == MMDB_IO_ERROR) {
|
if (status == MMDB_IO_ERROR) {
|
||||||
|
Loading…
Reference in New Issue
Block a user