Am 22.09.2015 um 18:47 schrieb Jan Kandziora:
> 
> However, if I start the owserver with
> 
> /opt/owfs/bin/owserver --debug --fake=FC.67C6697351FF --external
> --configuration=owexternal-test.conf
> 
> instead, it crashes upon reading the same node, with both programs.
> 
> 
As I found out BUS_reset() was dereferencing a NULL pointer when using
--external along with a fake or real second host adapter.

diff --git a/module/owlib/src/c/ow_reset.c b/module/owlib/src/c/ow_reset.c
index 744ac18..d875ed4 100644
--- a/module/owlib/src/c/ow_reset.c
+++ b/module/owlib/src/c/ow_reset.c
@@ -20,6 +20,12 @@ RESET_TYPE BUS_reset(const struct parsedname *pn)
        struct connection_in * in = pn->selected_connection ;
        STAT_ADD1_BUS(e_bus_resets, in);

+       // External adapter has no reset routine at all, so sort it out
here.
+       if ((in->iroutines.reset) == NO_RESET_ROUTINE) {
+               return BUS_RESET_OK ;
+       }
+
+       // Switch by result of adapter reset routine.
        switch ( (in->iroutines.reset) (pn) ) {
        case BUS_RESET_OK:
                in->reconnect_state = reconnect_ok;     // Flag as good!


I have fixed this in the git archive.

Kind regards

        Jan

------------------------------------------------------------------------------
_______________________________________________
Owfs-developers mailing list
Owfs-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/owfs-developers

Reply via email to