* Handle our once-per-second timeout event. We do two things: * we decrement link->loopCount for those links being muted due to * a detected loopback condition, and we remove any hosts from * the hashtable whom we haven't heard from in a long while. */
| 1021 | * the hashtable whom we haven't heard from in a long while. |
| 1022 | */ |
| 1023 | static int |
| 1024 | ng_bridge_unmute(hook_p hook, void *arg) |
| 1025 | { |
| 1026 | link_p link = NG_HOOK_PRIVATE(hook); |
| 1027 | node_p node = NG_HOOK_NODE(hook); |
| 1028 | priv_p priv = NG_NODE_PRIVATE(node); |
| 1029 | int *counter = arg; |
| 1030 | |
| 1031 | if (link->loopCount != 0) { |
| 1032 | link->loopCount--; |
| 1033 | if (link->loopCount == 0 && priv->conf.debugLevel >= 2) { |
| 1034 | log(LOG_INFO, "ng_bridge: %s:" |
| 1035 | " restoring looped back %s\n", |
| 1036 | ng_bridge_nodename(node), NG_HOOK_NAME(hook)); |
| 1037 | } |
| 1038 | } |
| 1039 | (*counter)++; |
| 1040 | return (1); |
| 1041 | } |
| 1042 | |
| 1043 | static void |
| 1044 | ng_bridge_timeout(node_p node, hook_p hook, void *arg1, int arg2) |
nothing calls this directly
no test coverage detected