• 10 dec 2017: forum version update. In case of issues use this topic.
  • 30 nov 2017: pilight moved servers. In case of issues use this topic.
Hello There, Guest! Login Register

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[fixed] bug fix for ds18b20.c rewrite branch
When one tries to use ds18b20 protocol with rewrite branch, the pilight-daemon crushes with segmentation fault. The reason is that there is an attempt to not yet initialized pointer to 'data' instead of 'node'. Below is simple patch against rewrite branch. I am not skilled with pull requests in github.

diff --git a/libs/pilight/protocols/GPIO/ds18b20.c b/libs/pilight/protocols/GPIO/ds18b20.c
index c9759c5..203ea96 100644
--- a/libs/pilight/protocols/GPIO/ds18b20.c
+++ b/libs/pilight/protocols/GPIO/ds18b20.c
@@ -225,7 +225,7 @@ static void *addDevice(void *param) {

        json_find_number(jdevice, "temperature-offset", &node->temp_offset);

-       data->interval = interval;
+       node->interval = interval;

        node->next = data;
        data = node;

Can some one tell me: should one work bug fixes for 'rewrite' or 'development'? Which one gets a higher priority? I myself more interested in 'rewrite' since there is support for banana pi m2 platform. But may be I should hold my horses.
Some features are added to development and then copied to rewrite (such as new protocols). Totally new features also only added to rewrite such as support for new platforms.

Thanks for reporting though!

Possibly Related Threads...
Thread Author Replies Views Last Post
  rewrite fails to compile ma-ca 25 10,413 09-29-2020, 09:47 AM
Last Post: Debrabroms
  program protocol missing in rewrite Niek 1 1,447 10-07-2017, 08:55 PM
Last Post: curlymo
  daemon crashes in rewrite ma-ca 1 1,686 08-05-2017, 03:40 PM
Last Post: curlymo
  dim action fails in rewrite ma-ca 1 1,453 08-04-2017, 05:16 PM
Last Post: curlymo
  pilight rewrite branch fails to compile ebk 0 1,616 06-30-2017, 01:07 PM
Last Post: ebk
  Rewrite development status TopdRob 1 2,105 12-10-2016, 10:31 PM
Last Post: curlymo
  [fixed] bug in protocols requiring gpio-platform parameter beaming 2 3,796 05-17-2016, 01:56 AM
Last Post: beaming
  HowTo Move your 3rd party code code from development to rewrite wo_rasp 0 1,887 03-15-2016, 02:10 PM
Last Post: wo_rasp

Forum Jump:

Browsing: 1 Guest(s)