• 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
dim action fails in rewrite
#1
The dim action in the rewrite branch fails to execute and I found that the following lines 593-594 in dim.c did cause the error.

Code:
data1->values = json_mkobject();
json_append_member(data1->values, "dimlevel", json_mknumber(data->to_dimlevel, 0));

The following changes did fix the error.

Code:
data1->values = json_mknumber(data->to_dimlevel, 0);  // data1->values = json_mkobject();
data1->values->key = strdup("dimlevel"); //json_append_member(code, "dimlevel", json_mknumber(data->to_dimlevel, 0))
 
Reply
#2
Can you make sure this fail is triggered in the unittest first?

I took me some time to understand why you suggested this change. I assume you mean that the control_device function in the daemon is the issue. If so, i would suggest changing this line in the daemon:
Code:
            jvalues = json_first_child(values);
            while(jvalues) {
It would be great if you could give some more context when you find issues.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  program protocol missing in rewrite Niek 1 486 10-07-2017, 08:55 PM
Last Post: curlymo
  rewrite fails to compile ma-ca 24 3,735 09-01-2017, 11:57 AM
Last Post: wseifert
  daemon crashes in rewrite ma-ca 1 631 08-05-2017, 03:40 PM
Last Post: curlymo
  pilight rewrite branch fails to compile ebk 0 757 06-30-2017, 01:07 PM
Last Post: ebk
  Rewrite development status TopdRob 1 1,163 12-10-2016, 10:31 PM
Last Post: curlymo
  [fixed] bug fix for ds18b20.c rewrite branch beaming 1 1,102 05-13-2016, 06:27 AM
Last Post: curlymo
  HowTo Move your 3rd party code code from development to rewrite wo_rasp 0 1,022 03-15-2016, 02:10 PM
Last Post: wo_rasp

Forum Jump:


Browsing: 1 Guest(s)