- /* turn on network debugging? */
- if (tTd(16, 101))
- {
- int on = 1;
- (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG, (char *)&on, sizeof on);
- }
- if (CurEnv->e_xfp != NULL)
- (void) fflush(CurEnv->e_xfp); /* for debugging */
- errno = 0; /* for debugging */
-#ifdef NVMUNIX
- bind(s, &SendmailAddress, sizeof SendmailAddress, 0);
- if (connect(s, &SendmailAddress, sizeof SendmailAddress, 0) < 0)
-#else NVMUNIX
- addr.sin_family = AF_INET;
- if (connect(s, (struct sockaddr *) &addr, sizeof addr) < 0)
-#endif NVMUNIX
- {
+ if (tTd(16, 1))
+ printf("makeconnection: fd=%d\n", s);
+
+ /* turn on network debugging? */
+ if (tTd(16, 101))
+ {
+ int on = 1;
+ (void) setsockopt(DaemonSocket, SOL_SOCKET, SO_DEBUG,
+ (char *)&on, sizeof on);
+ }
+ if (CurEnv->e_xfp != NULL)
+ (void) fflush(CurEnv->e_xfp); /* for debugging */
+ errno = 0; /* for debugging */
+ addr.sin_family = AF_INET;
+ if (connect(s, (struct sockaddr *) &addr, sizeof addr) >= 0)
+ break;
+
+ /* couldn't connect.... figure out why */