Let's say I wish to restart NetX stuff because an error has occurred, like the cable got unplugged. What is the proper procedure?
Here's what I've tried. When an error is detected, sit in a loop trying to init everything. If anything fails, stop and delete everything that was started, and try again. So basically,
Stop HttpServer, Stop DHCP, delete DNS, Delete DHCP, Delete HTTP, delete IP instance, delete Packet Pool in that order. Then, recreate everything just like before.
When I do this with the cable unplugged, the first time through the loop it works fine i.e. detects no IP returned from DHCP and it unwinds itself. The second time, when it gets around to the DHCP server, it goes away and never comes back on the ip_status_check:
status = nx_dhcp_create(&dhcp_0, &ip_0, "SynergyBaseDHCP"); status = nx_dhcp_start(&dhcp_0);
status = nx_ip_status_check(&ip_0, NX_IP_ADDRESS_RESOLVED, &dhcp_status, 500);
All the Stops and deletes return status 0. All subsequent creates and starts return 0.
In reply to @remo:
In reply to wflynn:
In reply to garyj: