commit bbde5ceaee75d67802c9e2018c23adcc292d75e8 from: Martijn van Duren date: Thu Mar 28 17:13:13 2019 UTC Remove RB trees, since we probably let the client implement their timeouts commit - 57d45cc8af4306005f9b3e7ece21a0050755b4cd commit + bbde5ceaee75d67802c9e2018c23adcc292d75e8 blob - 0ed8394df9e95b8fd668a234d13250aab4334b33 blob + 4ab66caa6dbfaeaf85a4fc4f8d3086a46b1c69b4 --- smtp_proc.c +++ smtp_proc.c @@ -1,5 +1,4 @@ #include -#include #include #include @@ -23,7 +22,6 @@ typedef int (*smtp_cb)(char *, int, struct timespec *, struct smtp_callback; struct smtp_request; -RB_HEAD(smtp_requests, smtp_request) smtp_requests; static int smtp_register(char *, char *, char *, smtp_cb); static void smtp_newline(int, short, void *); @@ -31,15 +29,7 @@ static void smtp_connect(struct smtp_callback *, int, uint64_t, uint64_t, char *); static void smtp_handle_filter(struct smtp_callback *, int, struct timespec *, uint64_t, uint64_t, void *); -static int smtp_request_cmp(struct smtp_request *, struct smtp_request *); -RB_PROTOTYPE_STATIC(smtp_requests, smtp_request, entry, smtp_request_cmp); -struct smtp_request { - uint64_t reqid; - uint64_t token; - RB_ENTRY(smtp_request) entry; -}; - struct smtp_callback { char *type; char *phase; @@ -289,11 +279,3 @@ smtp_register(char *type, char *phase, char *direction errno = EINVAL; return -1; } - -static int -smtp_request_cmp(struct smtp_request *r1, struct smtp_request *r2) -{ - return r1->reqid - r2->reqid; -} - -RB_GENERATE_STATIC(smtp_requests, smtp_request, entry, smtp_request_cmp);