if(retval == 0) {
/* connection finished */
- close(fds[idx].fd);
-
list_for_each_entry(conn, &server->connections, list) {
if(conn->fd == fds[idx].fd) {
+ ustcomm_close_app(conn);
list_del(&conn->list);
+ free(conn);
break;
}
}
return ustcomm_connect_path(path, conn, pid);
}
-/* Close a connection to a traceable app. */
+/* Close a connection to a traceable app. It frees the
+ * resources. It however does not free the
+ * ustcomm_connection itself.
+ */
int ustcomm_close_app(struct ustcomm_connection *conn)
{
}
}
+/* Free a traceable application server */
+
void ustcomm_fini_app(struct ustcomm_app *handle, int keep_socket_file)
{
ustcomm_fini_server(&handle->server, keep_socket_file);
}
+/* Free a ustd server */
+
void ustcomm_fini_ustd(struct ustcomm_ustd *handle)
{
ustcomm_fini_server(&handle->server, 0);