projects
/
ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change benign WARN to DBG
[ust.git]
/
libustcomm
/
ustcomm.c
diff --git
a/libustcomm/ustcomm.c
b/libustcomm/ustcomm.c
index 60428df0553082bfaa35130b134008743421a202..cb72db65733eb5353c7d10a74018ff856874c648 100644
(file)
--- a/
libustcomm/ustcomm.c
+++ b/
libustcomm/ustcomm.c
@@
-421,11
+421,11
@@
int ustcomm_recv_message(struct ustcomm_server *server, char **msg, struct ustco
if(retval == 0) {
/* connection finished */
if(retval == 0) {
/* connection finished */
- close(fds[idx].fd);
-
list_for_each_entry(conn, &server->connections, list) {
if(conn->fd == 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);
list_del(&conn->list);
+ free(conn);
break;
}
}
break;
}
}
@@
-503,7
+503,7
@@
static int init_named_socket(const char *name, char **path_out)
PERROR("unlink of socket file");
goto close_sock;
}
PERROR("unlink of socket file");
goto close_sock;
}
-
WARN
("socket already exists; overwriting");
+
DBG
("socket already exists; overwriting");
}
result = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
}
result = bind(fd, (struct sockaddr *)&addr, sizeof(addr));
@@
-636,7
+636,10
@@
int ustcomm_connect_app(pid_t pid, struct ustcomm_connection *conn)
return ustcomm_connect_path(path, conn, pid);
}
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)
{
int ustcomm_close_app(struct ustcomm_connection *conn)
{
@@
-784,11
+787,15
@@
static void ustcomm_fini_server(struct ustcomm_server *server, int keep_socket_f
}
}
}
}
+/* 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);
}
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);
void ustcomm_fini_ustd(struct ustcomm_ustd *handle)
{
ustcomm_fini_server(&handle->server, 0);
This page took
0.023442 seconds
and
4
git commands to generate.