• 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
duplicate device names causing seqgfault in lua.c
#1
When I copy/pasted a device in my config in order to add a device and forgot to change the device name of the copy,  a seqfault occurred in lua.c.

I saw thar there is a check in devices.c that should force the deamon to stop with an error when duplicate device names are found, but apparently the lua.c code is executed before that.

The issue can easily be reproduced with a config with just two generic label devices with the same name like this:

Code:
{
       "devices": {
               "testlabel": {
                       "protocol": [ "generic_label" ],
                       "id": [{
                               "id": 1
                       }],
                       "label": "",
                       "color": "black"
               },
               "testlabel": {
                       "protocol": [ "generic_label" ],
                       "id": [{
                               "id": 2
                       }],
                       "label": "",
                       "color": "black"
               }
       },
       "rules": {

       },
       "gui": {

       },
       "settings": {

       },
       "hardware": {

       },
       "registry": {

       }
 
Reply
#2
Thanks for reporting. Fixed it.
 
Reply
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  Function with single argument is causing an error Niek 1 2,466 08-04-2018, 02:46 PM
Last Post: curlymo
  [Solved] Rules switching state based on another device state not working apartmedia 6 2,462 09-27-2017, 01:41 PM
Last Post: apartmedia

Forum Jump:


Browsing: 1 Guest(s)