From 8d2da0d857f04238dc23396c93f0417fd3f7277c Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Tue, 7 Feb 2023 14:34:49 +1000 Subject: [PATCH] brei: remove some obsolete functions --- src/brei-shared.c | 15 --------------- src/brei-shared.h | 11 ----------- 2 files changed, 26 deletions(-) diff --git a/src/brei-shared.c b/src/brei-shared.c index 1ef80ed..9325619 100644 --- a/src/brei-shared.c +++ b/src/brei-shared.c @@ -31,21 +31,6 @@ #include "brei-shared.h" -struct brei_message_private { - struct brei_message base; - int *fd; -}; - -int -brei_message_take_fd(struct brei_message *m) -{ - struct brei_message_private *msg = (struct brei_message_private*)m; - - int fd = *msg->fd; - *msg->fd = -1; - return fd; -} - /** * Return the number of int32s required to store count bytes. */ diff --git a/src/brei-shared.h b/src/brei-shared.h index ec2bb4e..abd5072 100644 --- a/src/brei-shared.h +++ b/src/brei-shared.h @@ -84,17 +84,6 @@ brei_send_message(int fd, size_t nargs, va_list args); -/** - * Return the first file descriptor passed along with this message, or -1. - * You must only call this when a message is supposed to have an fd. - * - * Brei can not determine which message an fd belongs to, hence calling this - * function for a non-fd-carrying message will take that fd away from the - * message that fd actually belongs to. - */ -int -brei_message_take_fd(struct brei_message *b); - /** * Dispatch messages for the data on fd. * The callback is called for each protocol message, parsing must be done by