Maybe I am missing something....but why doesn't this work?
Jonathan I. Kamens
jik at athena.mit.edu
Thu May 30 13:15:07 AEST 1991
You need to bzero the sockaddr_in structure (backupserver) before putting
anything into it.
I compiled your program as-is (with a different host name) and it didn't
work. I then added the line "bzero((char *) &backupserver,
sizeof(backupserver));" right before "backupserver.sin_family = AF_INET;" and
it worked fine.
--
Jonathan Kamens USnail:
MIT Project Athena 11 Ashford Terrace
jik at Athena.MIT.EDU Allston, MA 02134
Office: 617-253-8085 Home: 617-782-0710
More information about the Comp.unix.wizards
mailing list