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)
downloadefl-821d68ded1dc3f5cca016f3a4e80f48237f27c11.tar.gz
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
elocation_address_get(Elocation_Address *address_shadow)
{
if (!address) return EINA_FALSE;
+ if (address == address_shadow) return EINA_TRUE;
address_shadow = address;
return EINA_TRUE;
@@ -1116,6 +1117,7 @@ EAPI Eina_Bool
elocation_position_get(Elocation_Position *position_shadow)
{
if (!position) return EINA_FALSE;
+ if (position == position_shadow) return EINA_TRUE;
position_shadow = position;
return EINA_TRUE;
@@ -1126,6 +1128,7 @@ EAPI Eina_Bool
elocation_status_get(int *status_shadow)
{
if (status < 0) return EINA_FALSE;
+ if (&status == status_shadow) return EINA_TRUE;
status_shadow = &status;
return EINA_TRUE;