From 09e5d3243294002f28eb69f66e5dfded08c99efa Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Mon, 8 Dec 2014 15:18:38 +0200 Subject: [PATCH] shared/mgmt: Remove unneeded sync_write API --- src/shared/mgmt.c | 14 -------------- src/shared/mgmt.h | 2 -- 2 files changed, 16 deletions(-) diff --git a/src/shared/mgmt.c b/src/shared/mgmt.c index 8d4e0385f..43351e2f7 100644 --- a/src/shared/mgmt.c +++ b/src/shared/mgmt.c @@ -45,7 +45,6 @@ struct mgmt { bool close_on_unref; struct io *io; bool writer_active; - bool sync_write; struct queue *request_queue; struct queue *reply_queue; struct queue *pending_list; @@ -220,8 +219,6 @@ static bool can_write_data(struct io *io, void *user_data) static void wakeup_writer(struct mgmt *mgmt) { - while (mgmt->sync_write && can_write_data(mgmt->io, mgmt)); - if (!queue_isempty(mgmt->pending_list)) { /* only queued reply commands trigger wakeup */ if (queue_isempty(mgmt->reply_queue)) @@ -473,7 +470,6 @@ struct mgmt *mgmt_new(int fd) } mgmt->writer_active = false; - mgmt->sync_write = false; return mgmt_ref(mgmt); } @@ -588,16 +584,6 @@ bool mgmt_set_close_on_unref(struct mgmt *mgmt, bool do_close) return true; } -bool mgmt_set_sync_write(struct mgmt *mgmt, bool sync_write) -{ - if (!mgmt) - return false; - - mgmt->sync_write = sync_write; - - return true; -} - static struct mgmt_request *create_request(uint16_t opcode, uint16_t index, uint16_t length, const void *param, mgmt_request_func_t callback, diff --git a/src/shared/mgmt.h b/src/shared/mgmt.h index b57eefc42..7caeb3844 100644 --- a/src/shared/mgmt.h +++ b/src/shared/mgmt.h @@ -43,8 +43,6 @@ bool mgmt_set_debug(struct mgmt *mgmt, mgmt_debug_func_t callback, bool mgmt_set_close_on_unref(struct mgmt *mgmt, bool do_close); -bool mgmt_set_sync_write(struct mgmt *mgmt, bool sync_write); - typedef void (*mgmt_request_func_t)(uint8_t status, uint16_t length, const void *param, void *user_data); -- 2.47.3