/** * aim_conn_close - Close a connection * @deadconn: Connection to close * * Close (but not free) a connection. * * This leaves everything untouched except for clearing the * handler list and setting the fd to -1 (used to recognize * dead connections). It will also remove cookies if necessary. * */ void aim_conn_close(aim_conn_t *deadconn) { if (deadconn->fd >= 3) closesocket(deadconn->fd); deadconn->fd = -1; if (deadconn->handlerlist) aim_clearhandlers(deadconn); return; }
/** * aim_conn_close - Close a connection * @deadconn: Connection to close * * Close (but not free) a connection. * * This leaves everything untouched except for clearing the * handler list and setting the fd to -1 (used to recognize * dead connections). It will also remove cookies if necessary. * */ faim_export void aim_conn_close(aim_conn_t *deadconn) { aim_rxcallback_t userfunc; if (deadconn->fd >= 3) close(deadconn->fd); deadconn->fd = -1; if ((userfunc = aim_callhandler(deadconn->sessv, deadconn, AIM_CB_FAM_SPECIAL, AIM_CB_SPECIAL_CONNDEAD))) userfunc(deadconn->sessv, NULL, deadconn); if (deadconn->handlerlist) aim_clearhandlers(deadconn); return; }