swrap: Fix sendto() with connected sockets
swrap: Fix sendto() with connected sockets

Let the socket wrapper code work with the net ads dns gethostbyname etc
code (lib/addn/dnssock.c) which uses connect on a UDP socket before then
using sendto and recvfrom.

Here, we make sure we don't error out in that case.

Tested by creating a test case for this and then observing that:

1. The test case works when the socket wrapper lib is not being used
   ie, run the test directly after defining some SHELL variables.

2. That the test case fails when run with the un modified socket
   wrapper code.

3. Apply this fix and observe that it runs correctly.

Pair-Programmed-With: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@samba.org>
Signed-off-by: Richard Sharpe <0354e42be68c7c48202851a87a484e65754d7264@samba.org>
Signed-off-by: Andreas Schneider <5be00ddc76278cf6077f5047ca3384a88460c671@samba.org>
Reviewed-by: Ralph Boehme <57e8a7776d6892a83f2a49678f8141f4fb883e62@samba.org>

anoopcs9/socket_wrapper,anoopcs9/socket_wrapper