summaryrefslogtreecommitdiff
path: root/src/lib/elocation
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-11-11 12:02:10 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2014-11-11 12:02:10 +0100
commit821d68ded1dc3f5cca016f3a4e80f48237f27c11 (patch)
treefda0e6b57fafda1004d1e49cae27f3f6965b73ce /src/lib/elocation
parent510773a99df919d557323da057034a4cbca1a3f5 (diff)
elocation: Check if the passed in address/position/status is already up to date
This API needs to get rewritten when the GeoClue2 support lands.
Diffstat (limited to 'src/lib/elocation')
-rw-r--r--src/lib/elocation/elocation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/elocation/elocation.c b/src/lib/elocation/elocation.c
index 2b795261f4..2478c51623 100644
--- a/src/lib/elocation/elocation.c
+++ b/src/lib/elocation/elocation.c
@@ -1106,6 +1106,7 @@ EAPI Eina_Bool
1106elocation_address_get(Elocation_Address *address_shadow) 1106elocation_address_get(Elocation_Address *address_shadow)
1107{ 1107{
1108 if (!address) return EINA_FALSE; 1108 if (!address) return EINA_FALSE;
1109 if (address == address_shadow) return EINA_TRUE;
1109 1110
1110 address_shadow = address; 1111 address_shadow = address;
1111 return EINA_TRUE; 1112 return EINA_TRUE;
@@ -1116,6 +1117,7 @@ EAPI Eina_Bool
1116elocation_position_get(Elocation_Position *position_shadow) 1117elocation_position_get(Elocation_Position *position_shadow)
1117{ 1118{
1118 if (!position) return EINA_FALSE; 1119 if (!position) return EINA_FALSE;
1120 if (position == position_shadow) return EINA_TRUE;
1119 1121
1120 position_shadow = position; 1122 position_shadow = position;
1121 return EINA_TRUE; 1123 return EINA_TRUE;
@@ -1126,6 +1128,7 @@ EAPI Eina_Bool
1126elocation_status_get(int *status_shadow) 1128elocation_status_get(int *status_shadow)
1127{ 1129{
1128 if (status < 0) return EINA_FALSE; 1130 if (status < 0) return EINA_FALSE;
1131 if (&status == status_shadow) return EINA_TRUE;
1129 1132
1130 status_shadow = &status; 1133 status_shadow = &status;
1131 return EINA_TRUE; 1134 return EINA_TRUE;