tools: Use mobile-broadband-provider-info database location if present

This commit is contained in:
Marcel Holtmann 2011-06-03 08:49:03 +02:00
parent 99d9f86bd4
commit d573a3a57c
1 changed files with 5 additions and 3 deletions

View File

@ -33,8 +33,10 @@
#include <glib.h>
#define PROVIDER_DB "/usr/share/" \
"mobile-broadband-provider-info/serviceproviders.xml"
#ifndef PROVIDER_DATABASE
#define PROVIDER_DATABASE "/usr/share/mobile-broadband-provider-info" \
"serviceproviders.xml"
#endif
static gboolean match_found;
static const char *current_element;
@ -151,7 +153,7 @@ static int lookup_apn(const char *mcc, const char *mnc, const char *spn)
if (mcc == NULL || mnc == NULL)
return -1;
fd = open(PROVIDER_DB, O_RDONLY);
fd = open(PROVIDER_DATABASE, O_RDONLY);
if (fd < 0)
return -1;