diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-28 15:50:37 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2013-08-28 15:50:37 +0200 |
commit | 6e63479b03df9c2189404fb631b1fbd4cab21186 (patch) | |
tree | 117c0ef37c0ddb7bd02c2ede1a8ac98b6788920a /src/task.c | |
parent | 72b8ec6a93885c943d8303303e268bd5ec286a46 (diff) | |
download | fastd-6e63479b03df9c2189404fb631b1fbd4cab21186.tar fastd-6e63479b03df9c2189404fb631b1fbd4cab21186.zip |
Remote unused fastd_task_replace_peer()
Diffstat (limited to 'src/task.c')
-rw-r--r-- | src/task.c | 23 |
1 files changed, 0 insertions, 23 deletions
@@ -79,29 +79,6 @@ void fastd_task_schedule_keepalive(fastd_context_t *ctx, fastd_peer_t *peer, int fastd_queue_put(ctx, &ctx->task_queue, &task->entry, timeout); } -typedef struct replace_peer_extra { - fastd_peer_t *old_peer; - fastd_peer_t *new_peer; -} replace_peer_extra_t; - - -static bool replace_peer(fastd_queue_entry_t *data, void *extra) { - replace_peer_extra_t *e = extra; - fastd_task_t *task = container_of(data, fastd_task_t, entry); - fastd_peer_t *old_peer = e->old_peer; - fastd_peer_t *new_peer = e->new_peer; - - if (task->peer == old_peer) - task->peer = new_peer; - - return true; -} - -void fastd_task_replace_peer(fastd_context_t *ctx, fastd_peer_t *old_peer, fastd_peer_t *new_peer) { - replace_peer_extra_t extra = {old_peer, new_peer}; - fastd_queue_filter(ctx, &ctx->task_queue, replace_peer, &extra); -} - typedef struct delete_task_extra { fastd_peer_t *peer; bool handshake_only; |