Hello, e-devel.

I found (and fix) a bug: when you has ibox module loaded and enabled,
and try to minimize (or hide) some window (e.g. firefox or mozilla, how
i understand, from appliactions that support ewhm): THEN e17 is dropped
with "segmentation fault".

How i said before bug is in ibox module: see attach.

Second attached file is patch to support sysfs + i2c sensors in 2.6 kernels.
This patch has no code for 2.4 kernels :-(



--

Болдин Павел aka davinchi

    [EMAIL PROTECTED] or [EMAIL PROTECTED] or [EMAIL PROTECTED]

    ZU - Zagovor Unixoidov. SSAU 303.

--- e_mod_main.c	2005-04-23 10:16:25 +0500
+++ e_mod_main.c~	2005-05-14 21:31:20 +0500
@@ -793,6 +793,42 @@ _temperature_cb_check(void *data)
 	       ret = 1;
 	     fclose(f);
 	  }
+	else
+	  {
+
+	     therms = ecore_file_ls("/sys/bus/i2c/devices");
+	     if(therms  && !ecore_list_is_empty(therms))
+	       {
+		  char *name;
+		  while((name = ecore_list_next(therms)))
+		    {
+		       char fname[1024];
+
+		       sprintf(fname, "/sys/bus/i2c/devices/%s/temp1_input",
+				name);
+
+		       if(ecore_file_exists(fname))
+			 {
+			    FILE *f;
+			    
+			    f = fopen(fname,"r");
+			    if(f) 
+			      {
+				 fgets(buf,sizeof(buf), f);
+				 buf[sizeof(buf) - 1] = 0;
+
+				 /* actuallty read the temp */
+				 if (sscanf(buf, "%i", &temp) == 1)
+				   ret = 1;
+				 
+				 /* Hack for temp */
+				 temp = temp / 1000;
+				 fclose(f);
+			      }
+			 }
+		    }
+	       }
+	  }
      }
    else
      {

--- e_mod_main.c.orig	2005-05-17 00:37:18 +0500
+++ e_mod_main.c	2005-05-17 00:28:44 +0500
@@ -547,6 +547,8 @@ _ibox_icon_new(IBox_Box *ibb, E_Border *
 static void
 _ibox_icon_free(IBox_Icon *ic)
 {
+   if( ic == NULL )
+     return;
    ic->ibb->icons = evas_list_remove(ic->ibb->icons, ic);
    if (ic->bg_object) evas_object_del(ic->bg_object);
    if (ic->overlay_object) evas_object_del(ic->overlay_object);

Reply via email to