Not doing so causes a file descriptor leak.
+ Revision 605.39 2003/04/26 21:55:15 ajc
+ * Anytime a socket connect() fails, CLOSE THE SOCKET before erroring out.
+ Not doing so causes a file descriptor leak.
+
Revision 605.38 2003/04/26 04:22:51 ajc
* Removal of individual "remote" lines from message delivery instruction sets
was corrupting the end of the set, rendering the "bounceto" line unusable
Revision 605.38 2003/04/26 04:22:51 ajc
* Removal of individual "remote" lines from message delivery instruction sets
was corrupting the end of the set, rendering the "bounceto" line unusable
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
}
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
}
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
}
if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
}
if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
fprintf(stderr, "can't connect: %s\n",
strerror(errno));
if (connect(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
fprintf(stderr, "can't connect: %s\n",
strerror(errno));
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
lprintf(3, "can't connect to %s:%s: %s\n",
host, service, strerror(errno));
if (connect(s, (struct sockaddr *) &sin, sizeof(sin)) < 0) {
lprintf(3, "can't connect to %s:%s: %s\n",
host, service, strerror(errno));