From: Fredrik Tolf Date: Sun, 8 Jun 2008 12:01:32 +0000 (+0200) Subject: netcsconn revision X-Git-Tag: 1.3~19 X-Git-Url: http://git.dolda2000.com/gitweb/?a=commitdiff_plain;h=d5b1f8590f16f19cd1a94eb2affc850ec2d42fa4;p=doldaconnect.git netcsconn revision The callback does now not get an explicit reference to the socket, and does therefore not need to put it explicitly. --- diff --git a/daemon/filenet.c b/daemon/filenet.c index da83a09..6b9b4fc 100644 --- a/daemon/filenet.c +++ b/daemon/filenet.c @@ -176,7 +176,6 @@ static void conncb(struct socket *sk, int err, struct fnetnode *data) data->fnet->connect(data, sk); data->connected = 1; putfnetnode(data); - putsock(sk); } static void resolvecb(struct sockaddr *addr, int addrlen, struct fnetnode *data) diff --git a/daemon/fnet-dc.c b/daemon/fnet-dc.c index d2343da..36e4297 100644 --- a/daemon/fnet-dc.c +++ b/daemon/fnet-dc.c @@ -3289,7 +3289,6 @@ static void peerconnect(struct socket *sk, int err, struct fnetnode *fn) if(err != 0) { putfnetnode(fn); - putsock(sk); return; } hub = fn->data; @@ -3301,7 +3300,6 @@ static void peerconnect(struct socket *sk, int err, struct fnetnode *fn) 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);