htsmsg_field_t *f;
htsmsg_t *ids;
uint32_t id;
+ const char *s;
if (!(f = htsmsg_field_find(args, "id")))
return EINVAL;
+ s = htsmsg_field_get_str(f);
+ if (s && strcmp(s, "all") == 0) {
+ tvh_mutex_lock(&global_lock);
+ tcp_connection_cancel_all();
+ tvh_mutex_unlock(&global_lock);
+ return 0;
+ }
if (!(ids = htsmsg_field_get_list(f)))
if (htsmsg_field_get_u32(f, &id))
return EINVAL;
}
}
+/**
+ *
+ */
+void
+tcp_connection_cancel_all(void)
+{
+ tcp_server_launch_t *tsl;
+
+ lock_assert(&global_lock);
+
+ LIST_FOREACH(tsl, &tcp_server_active, alink)
+ if (tsl->ops.cancel)
+ tsl->ops.cancel(tsl->opaque);
+}
+
/*
*
*/
struct access *aa);
void tcp_connection_land(void *tcp_id);
void tcp_connection_cancel(uint32_t id);
+void tcp_connection_cancel_all(void);
htsmsg_t *tcp_server_connections ( void );