summaryrefslogtreecommitdiff
path: root/src/lib/elocation
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 11:14:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-12-19 11:14:37 +0900
commitff24ac2d6ddaafba49ae5100f17fe37e5d874140 (patch)
treeb98881dd9ccb98896bbc8784a91e6b61a7403b41 /src/lib/elocation
parent47bf356435d7b4562e64f45ef59dbf190dff16c7 (diff)
efl: Reset ecore event types on init
This fixes cycles of init/shutdown/init where ecore event types would become invalid, since they are now stored in a dynamic array rather than a statically stored array. The risk here is that if a module of EFL tends to init/shutdown in a "normal" scenario then the event type array will grow in a leaking manner. This could be fixed by resetting those event ID's only when the loop actually exits (EFL_EVENT_DEL on the main loop). I'm not using EFL_EVENT_DEL in this patch as this would add too many event callbacks to the main loop object, which may result in slightly slower event calls to it, affecting the overall performance.
Diffstat (limited to 'src/lib/elocation')
-rw-r--r--src/lib/elocation/elocation.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/lib/elocation/elocation.c b/src/lib/elocation/elocation.c
index 0edf925480..cb0431c1ab 100644
--- a/src/lib/elocation/elocation.c
+++ b/src/lib/elocation/elocation.c
@@ -1253,21 +1253,18 @@ elocation_init(void)
1253 } 1253 }
1254 1254
1255 /* Create all ecore event types we send out to interested applications */ 1255 /* Create all ecore event types we send out to interested applications */
1256 if (ELOCATION_EVENT_IN == 0) 1256 ELOCATION_EVENT_IN = ecore_event_type_new();
1257 { 1257 ELOCATION_EVENT_OUT = ecore_event_type_new();
1258 ELOCATION_EVENT_IN = ecore_event_type_new(); 1258 ELOCATION_EVENT_STATUS = ecore_event_type_new();
1259 ELOCATION_EVENT_OUT = ecore_event_type_new(); 1259 ELOCATION_EVENT_POSITION = ecore_event_type_new();
1260 ELOCATION_EVENT_STATUS = ecore_event_type_new(); 1260 ELOCATION_EVENT_ADDRESS = ecore_event_type_new();
1261 ELOCATION_EVENT_POSITION = ecore_event_type_new(); 1261 ELOCATION_EVENT_VELOCITY = ecore_event_type_new();
1262 ELOCATION_EVENT_ADDRESS = ecore_event_type_new(); 1262 ELOCATION_EVENT_GEOCODE = ecore_event_type_new();
1263 ELOCATION_EVENT_VELOCITY = ecore_event_type_new(); 1263 ELOCATION_EVENT_REVERSEGEOCODE = ecore_event_type_new();
1264 ELOCATION_EVENT_GEOCODE = ecore_event_type_new(); 1264 ELOCATION_EVENT_NMEA = ecore_event_type_new();
1265 ELOCATION_EVENT_REVERSEGEOCODE = ecore_event_type_new(); 1265 ELOCATION_EVENT_SATELLITE = ecore_event_type_new();
1266 ELOCATION_EVENT_NMEA = ecore_event_type_new(); 1266 ELOCATION_EVENT_POI = ecore_event_type_new();
1267 ELOCATION_EVENT_SATELLITE = ecore_event_type_new(); 1267 ELOCATION_EVENT_META_READY = ecore_event_type_new();
1268 ELOCATION_EVENT_POI = ecore_event_type_new();
1269 ELOCATION_EVENT_META_READY = ecore_event_type_new();
1270 }
1271 1268
1272 obj_master= eldbus_object_get(conn, GEOCLUE_DBUS_NAME, GEOCLUE_OBJECT_PATH); 1269 obj_master= eldbus_object_get(conn, GEOCLUE_DBUS_NAME, GEOCLUE_OBJECT_PATH);
1273 if (!obj_master) 1270 if (!obj_master)