Skip to content

Commit

Permalink
[dcmnet] Fix indentation after previous change
Browse files Browse the repository at this point in the history
  • Loading branch information
100029962 committed Apr 17, 2023
1 parent b592cdb commit 0ea4d91
Showing 1 changed file with 21 additions and 21 deletions.
42 changes: 21 additions & 21 deletions dcmnet/libsrc/dulfsm.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2309,42 +2309,42 @@ requestAssociationTCP(PRIVATE_NETWORKKEY ** network,
OFTimer connectTimer;
do {
#ifndef DCMTK_HAVE_POLL
// we're in non-blocking mode. Prepare to wait for timeout.
fd_set fdSet;
FD_ZERO(&fdSet);
// we're in non-blocking mode. Prepare to wait for timeout.
fd_set fdSet;
FD_ZERO(&fdSet);
#ifdef __MINGW32__
// on MinGW, FD_SET expects an unsigned first argument
FD_SET((unsigned int) s, &fdSet);
// on MinGW, FD_SET expects an unsigned first argument
FD_SET((unsigned int) s, &fdSet);
#else
FD_SET(s, &fdSet);
FD_SET(s, &fdSet);
#endif /* __MINGW32__ */
#endif /* DCMTK_HAVE_POLL */

struct timeval timeout;
if (params->tcpPollInterval == -1)
timeout.tv_sec = connectTimeout;
else
timeout.tv_sec = params->tcpPollInterval;
timeout.tv_usec = 0;
struct timeval timeout;
if (params->tcpPollInterval == -1)
timeout.tv_sec = connectTimeout;
else
timeout.tv_sec = params->tcpPollInterval;
timeout.tv_usec = 0;

if (params->tcpConnectCanceled && params->tcpConnectCanceled(params->tcpCancelContext)) {
// TCP connect attempt was canceled. Flag connection as timed out
rc = 0;
break;
}

do {
do {
#ifdef DCMTK_HAVE_POLL
struct pollfd pfd[] =
{
{ s, POLLOUT, 0 }
};
rc = poll(pfd, 1, timeout.tv_sec*1000+(timeout.tv_usec/1000));
struct pollfd pfd[] =
{
{ s, POLLOUT, 0 }
};
rc = poll(pfd, 1, timeout.tv_sec*1000+(timeout.tv_usec/1000));
#else
// the typecast is safe because Windows ignores the first select() parameter anyway
rc = select(OFstatic_cast(int, s + 1), NULL, &fdSet, NULL, &timeout);
// the typecast is safe because Windows ignores the first select() parameter anyway
rc = select(OFstatic_cast(int, s + 1), NULL, &fdSet, NULL, &timeout);
#endif
} while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
} while (rc == -1 && OFStandard::getLastNetworkErrorCode().value() == DCMNET_EINTR);
} while (rc == 0 && connectTimer.getDiff() < connectTimeout);

if (DCM_dcmnetLogger.isEnabledFor(OFLogger::DEBUG_LOG_LEVEL))
Expand Down

0 comments on commit 0ea4d91

Please sign in to comment.