fixed some problems with the socket socket.c code.
- removed the duplicate calls to socket_connect(), instead creating a
common function socket_send_connect() used by both code paths
- fixed some NULL ptr checks (probably was cut-and-paste bugs)
- ensure we use the result of the name resolution
- added a few comments
- use 'fde' for the file description event. The variable name
'connect_ev' immediately made me think of an event context, not a
fde. Using common variable name conventions makes code a bit easier
to read
git-svn-id: svn+ssh://svn.samba.org/data/svn/samba/branches/SAMBA_4_0@11820
0c0555d6-39d7-0310-84fc-
f1cc0bd64818