From fd057cc020a9b4acfcee17e7e9ecea9b48478523 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Tue, 26 May 2026 12:02:06 -0400 Subject: [PATCH] MT#55283 remove unused DEL_STREAM Change-Id: Ie4cc5d55b93038a246a5038ace1d7a3d4edcce84 --- daemon/kernel.c | 1 - kernel-module/nft_rtpengine.c | 34 ---------------------------------- kernel-module/nft_rtpengine.h | 2 +- utils/kplay-test.c | 1 - utils/kplay-test2.c | 1 - 5 files changed, 1 insertion(+), 38 deletions(-) diff --git a/daemon/kernel.c b/daemon/kernel.c index ed568d9b2..9d9e435e3 100644 --- a/daemon/kernel.c +++ b/daemon/kernel.c @@ -142,7 +142,6 @@ bool kernel_init_table(void) { [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), [REMG_DEL_CALL] = sizeof(struct rtpengine_command_del_call), [REMG_ADD_STREAM] = sizeof(struct rtpengine_command_add_stream), - [REMG_DEL_STREAM] = sizeof(struct rtpengine_command_del_stream), [REMG_PACKET] = sizeof(struct rtpengine_command_packet), [REMG_INIT_PLAY_STREAMS] = sizeof(struct rtpengine_command_init_play_streams), [REMG_GET_PACKET_STREAM] = sizeof(struct rtpengine_command_get_packet_stream), diff --git a/kernel-module/nft_rtpengine.c b/kernel-module/nft_rtpengine.c index bfb916e6c..17728d6dc 100644 --- a/kernel-module/nft_rtpengine.c +++ b/kernel-module/nft_rtpengine.c @@ -3586,34 +3586,6 @@ static void del_stream(struct re_stream *stream, struct rtpengine_table *table) stream_put(stream); } -static int table_del_stream(struct rtpengine_table *table, const struct rtpengine_stream_idx_info *info) { - int err; - struct re_call *call; - struct re_stream *stream; - - DBG("table_del_stream()\n"); - - call = get_call_lock(table, info->call_idx); - err = -ENOENT; - if (!call) - return -ENOENT; - - stream = get_stream_lock(call, info->stream_idx); - err = -ENOENT; - if (!stream) - goto out; - - del_stream(stream, table); - - err = 0; - -out: - call_put(call); - return err; -} - - - static ssize_t proc_stream_read(struct file *f, char __user *b, size_t l, loff_t *o) { struct re_stream *stream = f->private_data; @@ -5144,7 +5116,6 @@ static const size_t min_req_sizes[__REMG_LAST] = { [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), [REMG_DEL_CALL] = sizeof(struct rtpengine_command_del_call), [REMG_ADD_STREAM] = sizeof(struct rtpengine_command_add_stream), - [REMG_DEL_STREAM] = sizeof(struct rtpengine_command_del_stream), [REMG_PACKET] = sizeof(struct rtpengine_command_packet), [REMG_INIT_PLAY_STREAMS]= sizeof(struct rtpengine_command_init_play_streams), [REMG_GET_PACKET_STREAM]= sizeof(struct rtpengine_command_get_packet_stream), @@ -5164,7 +5135,6 @@ static const size_t max_req_sizes[__REMG_LAST] = { [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), [REMG_DEL_CALL] = sizeof(struct rtpengine_command_del_call), [REMG_ADD_STREAM] = sizeof(struct rtpengine_command_add_stream), - [REMG_DEL_STREAM] = sizeof(struct rtpengine_command_del_stream), [REMG_PACKET] = sizeof(struct rtpengine_command_packet) + 65535, [REMG_INIT_PLAY_STREAMS]= sizeof(struct rtpengine_command_init_play_streams), [REMG_GET_PACKET_STREAM]= sizeof(struct rtpengine_command_get_packet_stream), @@ -5304,10 +5274,6 @@ static inline ssize_t proc_control_read_write(struct file *file, char __user *ub err = table_new_stream(t, &msg.add_stream->stream); break; - case REMG_DEL_STREAM: - err = table_del_stream(t, &msg.del_stream->stream); - break; - case REMG_PACKET: err = stream_packet(t, &msg.packet->packet, buflen - sizeof(*msg.packet)); break; diff --git a/kernel-module/nft_rtpengine.h b/kernel-module/nft_rtpengine.h index 97be9b4c2..e9f4553ab 100644 --- a/kernel-module/nft_rtpengine.h +++ b/kernel-module/nft_rtpengine.h @@ -213,7 +213,7 @@ enum rtpengine_command { REMG_ADD_CALL, REMG_DEL_CALL, REMG_ADD_STREAM, - REMG_DEL_STREAM, + __REMG_UNSUED_1, // REMG_DEL_STREAM, REMG_PACKET, REMG_DEL_TARGET, REMG_INIT_PLAY_STREAMS, diff --git a/utils/kplay-test.c b/utils/kplay-test.c index 7d4339bdb..11410946b 100644 --- a/utils/kplay-test.c +++ b/utils/kplay-test.c @@ -34,7 +34,6 @@ int main() { [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), [REMG_DEL_CALL] = sizeof(struct rtpengine_command_del_call), [REMG_ADD_STREAM] = sizeof(struct rtpengine_command_add_stream), - [REMG_DEL_STREAM] = sizeof(struct rtpengine_command_del_stream), [REMG_PACKET] = sizeof(struct rtpengine_command_packet), [REMG_INIT_PLAY_STREAMS] = sizeof(struct rtpengine_command_init_play_streams), [REMG_GET_PACKET_STREAM] = sizeof(struct rtpengine_command_get_packet_stream), diff --git a/utils/kplay-test2.c b/utils/kplay-test2.c index 13f11f128..0734ccf62 100644 --- a/utils/kplay-test2.c +++ b/utils/kplay-test2.c @@ -41,7 +41,6 @@ int main() { [REMG_ADD_CALL] = sizeof(struct rtpengine_command_add_call), [REMG_DEL_CALL] = sizeof(struct rtpengine_command_del_call), [REMG_ADD_STREAM] = sizeof(struct rtpengine_command_add_stream), - [REMG_DEL_STREAM] = sizeof(struct rtpengine_command_del_stream), [REMG_PACKET] = sizeof(struct rtpengine_command_packet), [REMG_INIT_PLAY_STREAMS] = sizeof(struct rtpengine_command_init_play_streams), [REMG_GET_PACKET_STREAM] = sizeof(struct rtpengine_command_get_packet_stream),