chirpstack / chirpstack-gateway-bridge

ChirpStack Gateway Bridge abstracts Packet Forwarder protocols into Protobuf or JSON over MQTT.
https://www.chirpstack.io
MIT License
422 stars 270 forks source link

ApplyConfiguration panic #90

Closed gq-tang closed 5 years ago

gq-tang commented 6 years ago

Out of index panic occurs when the gateway channel in loraserver is set to be greater than 8.

if multiSFCounter >= channelCount {
                    return gc, errors.New("gateway: exceeded maximum number of multi-sf channels")
                }
brocaar commented 6 years ago

The error:

errors.New("gateway: exceeded maximum number of multi-sf channels")

is intentional as the sx1301 / sx1308 on your gateway does not support > 8 multi-spreadingfactor channels.

gq-tang commented 6 years ago

I see, but if the number of channels set on loraserver is >8, gateway-bridge will panic instead of returning an error.

should be changed to >= in source code

brocaar commented 6 years ago

Ah, good catch! Would you like to make a pull-request to change this?

brocaar commented 5 years ago

Closing as the pull-request fixing this has been merged.