Page MenuHomePhabricator

E Build Break (tempget threading newness)
Closed, ResolvedPublic

Description

Hi there!

Just a one-liner here to fix the build.

Line 324 of temperature/e_mod_main.c has:

EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);

Just needs this:

diff --git a/src/modules/temperature/e_mod_main.c b/src/modules/temperature/e_mod_main.c
index 41e1c38..fce1b8c 100644
--- a/src/modules/temperature/e_mod_main.c
+++ b/src/modules/temperature/e_mod_main.c
@@ -321,7 +321,9 @@ _temprature_check_done(void *data, Ecore_Thread *th)

    eina_stringshare_del(tth->sensor_name);
    eina_stringshare_del(tth->sensor_path);
+#ifdef HAVE_EEZE
    EINA_LIST_FREE(tth->tempdevs, s) eina_stringshare_del(s);
+#endif
    free(tth->extn);
    free(tth);
 }

Otherwise this is great, no need for my patch.

netstar created this task.Dec 1 2016, 4:58 AM
This comment was removed by netstar.

Ah ok, a small issue with OpenBSD build:

This fixes:

diff --git a/src/modules/temperature/e_mod_tempget.c b/src/modules/temperature/e_mod_tempget.c
index d4078c3..cadbc4d 100644
--- a/src/modules/temperature/e_mod_tempget.c
+++ b/src/modules/temperature/e_mod_tempget.c
@@ -93,7 +93,7 @@ init(Tempthread *tth)
 #ifdef __OpenBSD__
    int dev, numt;
    struct sensordev snsrdev;
-   c size_t sdlen = sizeof(snsrdev);
+   size_t sdlen = sizeof(snsrdev);
 #endif
 #if defined (__FreeBSD__) || defined(__DragonFly__)
    unsigned i;
@@ -143,14 +143,14 @@ init(Tempthread *tth)
                }
              if (strcmp(snsrdev.xname, "cpu0") == 0)
                {
-                  sensor_type = SENSOR_TYPE_OPENBSD;
-                  sensor_name = strdup("cpu0");
+                  tth->sensor_type = SENSOR_TYPE_OPENBSD;
+                  tth->sensor_name = strdup("cpu0");
                   break;
                }
              else if (strcmp(snsrdev.xname, "km0") == 0)
                {
-                  sensor_type = SENSOR_TYPE_OPENBSD;
-                  sensor_name = strdup("km0");
+                  tth->sensor_type = SENSOR_TYPE_OPENBSD;
+                  tth->sensor_name = strdup("km0");
                   break;
                }
           }

This is good. With those two above small patches, seems tempget issue is gone now (due to odd shells on restart and spawn on dfly and openbsd) using threads.

This might save you some finger movement:

https://phab.enlightenment.org/D4446