The callback does now not get an explicit reference to the socket,
and does therefore not need to put it explicitly.
data->fnet->connect(data, sk);
data->connected = 1;
putfnetnode(data);
- putsock(sk);
}
static void resolvecb(struct sockaddr *addr, int addrlen, struct fnetnode *data)
if(err != 0)
{
putfnetnode(fn);
- putsock(sk);
return;
}
hub = fn->data;
sk->errcb = (void (*)(struct socket *, int, void *))peererror;
sk->data = peer;
socksettos(sk, confgetint("fnet", "fnptos"));
- putsock(sk);
peer->timeout = timercallback(ntime() + 180, (void (*)(int, void *))peertimeout, peer);
sendmynick(peer);
sendpeerlock(peer);