diff options
author | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-28 14:00:47 +0200 |
---|---|---|
committer | Aleksander Morgado <aleksander@lanedo.com> | 2012-03-29 09:18:04 +0200 |
commit | 3f7a6fe31b3fbcec493ba6a1ab97e766ebec7edc (patch) | |
tree | 463862d10026174200b11b52eada3d1dc09858cd | |
parent | 19d53751a2cca0ecd2d6b60813076db08fb4bd52 (diff) |
libmm-common,location-gps-raw: fix check looking for mandatory parameters
-rw-r--r-- | libmm-common/mm-location-gps-raw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/libmm-common/mm-location-gps-raw.c b/libmm-common/mm-location-gps-raw.c index 0cae9261..fa0f4b4c 100644 --- a/libmm-common/mm-location-gps-raw.c +++ b/libmm-common/mm-location-gps-raw.c @@ -276,17 +276,17 @@ mm_location_gps_raw_new_from_dictionary (GVariant *dictionary, /* If any of the mandatory parameters is missing, cleanup */ if (!self->priv->utc_time || - !self->priv->longitude || - !self->priv->latitude) { + self->priv->longitude == MM_LOCATION_GPS_RAW_LONGITUDE_UNKNOWN || + self->priv->latitude == MM_LOCATION_GPS_RAW_LATITUDE_UNKNOWN) { g_set_error (error, MM_CORE_ERROR, MM_CORE_ERROR_INVALID_ARGS, "Cannot create GPS RAW location from dictionary: " "mandatory parameters missing " "(utc-time: %s, longitude: %s, latitude: %s)", - self->priv->utc_time ? "yes" : "no", - self->priv->longitude ? "yes" : "no", - self->priv->latitude ? "yes" : "no"); + self->priv->utc_time ? "yes" : "missing", + (self->priv->longitude != MM_LOCATION_GPS_RAW_LONGITUDE_UNKNOWN) ? "yes" : "missing", + (self->priv->latitude != MM_LOCATION_GPS_RAW_LATITUDE_UNKNOWN) ? "yes" : "missing"); g_clear_object (&self); } |