From a585598c97cab9ab39ed57f5cb46b9dfd796f4c4 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Mon, 20 Aug 2012 11:13:32 -0300 Subject: [PATCH] ofono: fix error to enum parse. We must account the ".Error." as well. Don't know how we did not noticed it so far. --- dialer/ofono.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dialer/ofono.c b/dialer/ofono.c index 20207a0..8242e6d 100644 --- a/dialer/ofono.c +++ b/dialer/ofono.c @@ -75,6 +75,7 @@ static Eina_Inlist *cbs_call_removed = NULL; #define OFONO_SERVICE "org.ofono" #define OFONO_PREFIX OFONO_SERVICE "." +#define OFONO_PREFIX_ERROR OFONO_SERVICE ".Error." #define OFONO_MODEM_IFACE "Modem" #define OFONO_MANAGER_IFACE "Manager" #define OFONO_SIM_IFACE "SimManager" @@ -167,14 +168,14 @@ static const struct Error_Map { static OFono_Error _ofono_error_parse(const char *name) { - size_t namelen, prefixlen = sizeof(OFONO_PREFIX) - 1; + size_t namelen, prefixlen = sizeof(OFONO_PREFIX_ERROR) - 1; const struct Error_Map *itr; /* whenever interfaces are not there due modem being offline */ if (strcmp(name, "org.freedesktop.DBus.Error.UnknownMethod") == 0) return OFONO_ERROR_OFFLINE; - if (strncmp(name, OFONO_PREFIX, prefixlen) != 0) + if (strncmp(name, OFONO_PREFIX_ERROR, prefixlen) != 0) return OFONO_ERROR_FAILED; name += prefixlen; -- 2.7.4