summaryrefslogtreecommitdiffstats
path: root/src/task.h
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2012-03-02 20:12:59 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2012-03-02 20:12:59 +0100
commitebd9d98fd7a2c08f57b1187a7b9efafbfbb63fe7 (patch)
tree707d1bfe6c1da4032f3859ee2b514ff5927a72c2 /src/task.h
parent3a4964f5e8c07943474036e594698b313a73d502 (diff)
downloadfastd-ebd9d98fd7a2c08f57b1187a7b9efafbfbb63fe7.tar
fastd-ebd9d98fd7a2c08f57b1187a7b9efafbfbb63fe7.zip
Delete pending tasks for deleted peers
Diffstat (limited to 'src/task.h')
-rw-r--r--src/task.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/task.h b/src/task.h
index fbf2c63..b65e992 100644
--- a/src/task.h
+++ b/src/task.h
@@ -39,6 +39,11 @@ typedef enum _fastd_task_type {
TASK_HANDSHAKE,
} fastd_task_type;
+typedef struct _fastd_task_any {
+ fastd_task_type type;
+ fastd_peer *peer;
+} fastd_task_any;
+
typedef struct _fastd_task_send {
fastd_task_type type;
fastd_peer *peer;
@@ -59,7 +64,7 @@ typedef struct _fastd_task_handshake {
} fastd_task_handshake;
typedef union _fastd_task {
- fastd_task_type type;
+ fastd_task_any any;
fastd_task_send send;
fastd_task_handle_recv handle_recv;
fastd_task_handshake handshake;
@@ -78,4 +83,6 @@ void fastd_task_put_handle_recv(fastd_context *ctx, fastd_peer *peer, fastd_buff
void fastd_task_schedule_handshake(fastd_context *ctx, fastd_peer *peer, int timeout);
+void fastd_task_delete_peer(fastd_context *ctx, fastd_peer *peer);
+
#endif /* _FASTD_TASK_H_ */