static void close_connection(struct vhci_conn *conn) { syslog(LOG_INFO, "Closing connection %s handle %d", batostr(&conn->dest), conn->handle); g_io_channel_close(conn->chan); g_io_channel_unref(conn->chan); vconn[conn->handle - 1] = NULL; disconn_complete(conn); free(conn); }
static void close_connection(struct vhci_conn *conn) { char addr[18]; ba2str(&conn->dest, addr); syslog(LOG_INFO, "Closing connection %s handle %d", addr, conn->handle); close(conn->fd); vconn[conn->handle - 1] = NULL; disconn_complete(conn); free(conn); }
static void close_connection(struct vhci_conn *conn) { char addr[18]; ba2str(&conn->dest, addr); syslog(LOG_INFO, "Closing connection %s handle %d", addr, conn->handle); g_io_channel_shutdown(conn->chan, TRUE, NULL); g_io_channel_unref(conn->chan); vconn[conn->handle - 1] = NULL; disconn_complete(conn); free(conn); }