The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Special Forums > IP Networking
Google UNIX.COM



Thread: Bad Address
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 12-20-2007
porter porter is offline
Registered User
 

Join Date: Jan 2007
Posts: 2,965
Quote:
Originally Posted by shankarramv View Post
csd=accept(sd,(struct sockaddr_in *) &client,csd);
That looks all wrong.

The last arg should be the address of a socklen_t, and you are also reusing the variable as a file descriptor.

I suggest you compile with maximum warnings, if using gcc use "-Wall -Werror".
Reply With Quote