Hi,

This is my first patch, it's just to handle
ECORE_CONN_EVENT_SERVER_ERROR in the google plugin in order to see
what's wrong, because I don't find why the plugin isn't working.

Thanks, 

--
Soulou

Index: src/plugins/google/google.c
===================================================================
--- src/plugins/google/google.c	(revision 58278)
+++ src/plugins/google/google.c	(working copy)
@@ -12,6 +12,7 @@
 static void _code_updated(EWeather *eweather);
 static Eina_Bool _server_add(void *data, int type, void *event);
 static Eina_Bool _server_del(void *data, int type, void *event);
+static Eina_Bool _server_error(void *data, int type, void *event);
 static Eina_Bool _server_data(void *data, int type, void *event);
 static Eina_Bool _weather_cb_check(void *data);
 static EWeather_Type _weather_type_get(const char* id);
@@ -97,6 +98,9 @@
    inst->data_handler =
       ecore_event_handler_add(ECORE_CON_EVENT_SERVER_DATA,
 	    _server_data, inst);
+   inst->data_handler =
+	   ecore_event_handler_add(ECORE_CON_EVENT_SERVER_ERROR,
+		_server_error, inst);
 
    inst->check_timer =
       ecore_timer_add(0, _weather_cb_check, inst);
@@ -225,6 +229,23 @@
 }
 
    static Eina_Bool
+_server_error(void *data, int type, void *event)
+{
+   Instance * inst;
+   Ecore_Con_Event_Server_Error *ev;
+
+   if ((!inst->server) || (inst->server != ev->server)) return EINA_TRUE;
+
+   inst = data;
+   ev = event;
+
+   fprintf(stderr, "Connection error to %s : %s\n", 
+      inst->server->name ,ev->error);
+
+   return EINA_FALSE;
+}
+
+   static Eina_Bool
 _server_data(void *data, int type, void *event)
 {
    Instance *inst;
------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to