Hey!

We've recently identified a bug in 1.0.0 whereby, if there's an
"empty" server on the network (i.e. a server that just does OCInit()
and OCProcess() in an idle loop, but doesn't register any resources,
then that breaks the whole resource discovery process. In particular:

1. Start ocserverbasicops and wait 5 seconds
2. Start occlientbasicops -u 0 -t 1 and wait until it discovers the resource

Great, but

1. Start ocserverbasicops and wait 5 seconds
2. Start empty-server[0] and wait 5 seconds
3. Start occlientbasicops -u 0 -t 1 and wait until it discovers the resource

At this point in 1.0 it just segfaults with a null payload. As of
40a94b8 on master it discovers the resources and then segfaults.

I believe the difference between 1.0 and 40a94b8 is more than just the
fact that the segfault-causing response arrives sooner, because in
iotivity-node, where a null payload does not cause a segfault, the
rest of the discovery responses do nevertheless go missing in 1.0[1]

So, notwithstanding the segfault, discovery in the presence of such an
empty server seems to have been fixed. Is there any chance that this
fix might be rolled into a 1.0.x release?

Please let me know!



Gabriel

[0] https://gist.github.com/gabrielschulhof/062581e00223d1f68df9
[1] https://github.com/otcshare/iotivity-node/issues/34

Reply via email to