The reason is that since free_outgoing() is called by the list algorithms, it can take only one
parameter (a pointer to a struct outgoing).
struct addrinfo *ai;
struct addrinfo *aip;
timeout_t ev;
+ struct meshlink_handle *mesh;
} outgoing_t;
extern int maxoutbufsize;
send_id(mesh, c);
}
-static void free_outgoing(meshlink_handle_t *mesh, outgoing_t *outgoing) {
+static void free_outgoing(outgoing_t *outgoing) {
+ meshlink_handle_t *mesh = outgoing->mesh;
+
timeout_del(&mesh->loop, &outgoing->ev);
if(outgoing->ai)
if(!found) {
outgoing_t *outgoing = xzalloc(sizeof *outgoing);
+ outgoing->mesh = mesh;
outgoing->name = name;
list_insert_tail(mesh->outgoings, outgoing);
setup_outgoing_connection(mesh, outgoing);