uasync: pass socket name to all add_socket call sites

This commit is contained in:
evgeny committed 2026-09-20 01:13:38 +03:00
1 parent c36cebe357
commit b33caa56b8
31 files changed
+61 -59

No files matched your search

+2 -2
View File
@@ -405,7 +405,7 @@ static void rh_accept_callback(socket_t fd, void* arg) {
if (!cli) { socket_close_wrapper(cfd); return; }
cli->fd = cfd;
cli->rh = rh;
cli->socket_id = uasync_add_socket_t(rh->ua, cfd, rh_read_callback, rh_write_callback, NULL, cli);
cli->socket_id = uasync_add_socket_t(rh->ua, cfd, rh_read_callback, rh_write_callback, NULL, "radio_client", cli);
if (!cli->socket_id) { u_free(cli); socket_close_wrapper(cfd); DEBUG_ERROR(DEBUG_CATEGORY_RADIO, "%s: failed to register client fd", RH_ID); return; }
cli->next = rh->clients; rh->clients = cli; rh->client_count++;
@@ -456,7 +456,7 @@ int radio_headless_init(struct UASYNC* ua, struct UTUN_INSTANCE* inst,
}
if (listen(rh->listen_fd, 5) < 0) { socket_close_wrapper(rh->listen_fd); rh->listen_fd = SOCKET_INVALID; return -1; }
rh->listen_sock_id = uasync_add_socket_t(ua, rh->listen_fd, rh_accept_callback, NULL, NULL, rh);
rh->listen_sock_id = uasync_add_socket_t(ua, rh->listen_fd, rh_accept_callback, NULL, NULL, "radio_listen", rh);
if (!rh->listen_sock_id) { socket_close_wrapper(rh->listen_fd); rh->listen_fd = SOCKET_INVALID; return -1; }
radio_set_frame_cb(inst, rh_frame_cb, rh);