- timeout_del(&n->mtutimeout);
-
- char *name;
- char *address;
- char *port;
- char *envp[8] = {NULL};
-
- xasprintf(&envp[0], "NETNAME=%s", netname ? : "");
- xasprintf(&envp[1], "DEVICE=%s", device ? : "");
- xasprintf(&envp[2], "INTERFACE=%s", iface ? : "");
- xasprintf(&envp[3], "NODE=%s", n->name);
- sockaddr2str(&n->address, &address, &port);
- xasprintf(&envp[4], "REMOTEADDRESS=%s", address);
- xasprintf(&envp[5], "REMOTEPORT=%s", port);
- xasprintf(&envp[6], "NAME=%s", myself->name);
-
- execute_script(n->status.reachable ? "host-up" : "host-down", envp);
-
- xasprintf(&name, n->status.reachable ? "hosts/%s-up" : "hosts/%s-down", n->name);
- execute_script(name, envp);
-
- free(name);
- free(address);
- free(port);
-
- for(int i = 0; i < 7; i++)
- free(envp[i]);