Re: [Libevent-users] Server closes connection to client just after accept()

2010-05-12 Thread Anomit Ghosh
On Thu, May 13, 2010 at 11:35 AM, Nick Mathewson wrote: > My first guess is that you're calling accept() wrong: you need to > initialize addrlen to sizeof(client_addr) before you call it, if I'm > reading the accept() documentation right. Thanks a lot! That seemed to be the problem. Sorry for bo

Re: [Libevent-users] Server closes connection to client just after accept()

2010-05-12 Thread Nick Mathewson
On Wed, May 12, 2010 at 2:55 PM, Anomit Ghosh wrote: > This is the code in question: http://codepad.org/7eD9n14B > Run the code as `./server 127.0.0.1 ` > > I registered a callback(sock_callback) on the listening socket that > puts the new connections after accepting in a list. Now the problem > s

[Libevent-users] ANN: Libevent 2.0.5-beta released; Libevent 2.0 now in feature-freeze

2010-05-12 Thread Nick Mathewson
Hi everyone! Thanks to many people's hard work, Libevent 2.0 has now had its first beta release. You can download it from: http://www.monkey.org/~provos/libevent-2.0.5-beta.tar.gz http://www.monkey.org/~provos/libevent-2.0.5-beta.tar.gz.sig Don't forget to validate the signature. The comple

[Libevent-users] Server closes connection to client just after accept()

2010-05-12 Thread Anomit Ghosh
This is the code in question: http://codepad.org/7eD9n14B Run the code as `./server 127.0.0.1 ` I registered a callback(sock_callback) on the listening socket that puts the new connections after accepting in a list. Now the problem seems to be that even after doing event_add() in L73 the connectio