|
|
|
|
@ -288,6 +288,9 @@ struct ETCP_CONN* etcp_connection_create(struct UTUN_INSTANCE* instance, char* n
|
|
|
|
|
|
|
|
|
|
static void etcp_fire_conn_status(struct ETCP_CONN* etcp, int status) { |
|
|
|
|
if (!etcp || !etcp->instance) return; |
|
|
|
|
static const char* names[] = { "NEW", "UP", "DOWN", "DELETE" }; |
|
|
|
|
DEBUG_INFO(DEBUG_CATEGORY_GENERAL, "[%s] Connection status changed to %s", etcp->log_name, |
|
|
|
|
(status >= 0 && status < (int)(sizeof(names)/sizeof(names[0]))) ? names[status] : "?"); |
|
|
|
|
struct etcp_status_cbk_entry* cbe = etcp->instance->conn_status_cbks; |
|
|
|
|
while (cbe) { struct etcp_status_cbk_entry* n = cbe->next; cbe->fn(etcp, status, cbe->arg); cbe = n; } |
|
|
|
|
} |
|
|
|
|
|