*----------------------------------------------------------------------
*/
-#define TCPSOCKWARN(a, ...) ASOCKWARN(BaseSocket(a), __VA_ARGS__)
-#define TCPSOCKLOG(a, b, ...) ASOCKLOG(a, BaseSocket(b), __VA_ARGS__)
-#define TCPSOCKLG0(a, ...) ASOCKLG0(BaseSocket(a), __VA_ARGS__)
+#define TCPSOCKWARN(a,b) ASOCKWARN(BaseSocket(a), b)
+#define TCPSOCKLOG(a,b,c) ASOCKLOG(a, BaseSocket(b), c)
+#define TCPSOCKLG0(a,b) ASOCKLG0(BaseSocket(a), b)
/*
*outAddrLen = addrLen;
return ASOCKERR_SUCCESS;
} else {
- TCPSOCKWARN(tempAsock, "%s: could not locate socket.\n", __FUNCTION__);
+ TCPSOCKWARN(tempAsock, ("%s: could not locate socket.\n", __FUNCTION__));
return ASOCKERR_GENERIC;
}
}
char addrBuf[NI_MAXHOST];
if (ipRetStr == NULL) {
- TCPSOCKWARN(asock, "%s: Output string is not usable.\n", __FUNCTION__);
+ TCPSOCKWARN(asock, ("%s: Output string is not usable.\n",
+ __FUNCTION__));
ret = ASOCKERR_INVAL;
} else if (Posix_GetNameInfo((struct sockaddr *)&addr, addrLen, addrBuf,
sizeof addrBuf, NULL, 0,
NI_NUMERICHOST) == 0) {
*ipRetStr = Util_SafeStrdup(addrBuf);
} else {
- TCPSOCKWARN(asock, "%s: could not find IP address.\n", __FUNCTION__);
+ TCPSOCKWARN(asock, ("%s: could not find IP address.\n", __FUNCTION__));
ret = ASOCKERR_GENERIC;
}
}
if (asock) {
TCPSOCKLG0(asock,
- "Created new %s %s listener for (%s)\n",
- addr.ss_family == AF_INET ? "IPv4" : "IPv6",
- "socket", ipString);
+ ("Created new %s %s listener for (%s)\n",
+ addr.ss_family == AF_INET ? "IPv4" : "IPv6",
+ "socket", ipString));
} else {
Log(ASOCKPREFIX "Could not create %s listener socket, error %d: %s\n",
addr.ss_family == AF_INET ? "IPv4" : "IPv6", *outError,
ASSERT(NULL != addr);
port = AsyncTCPSocketGetPortFromAddr(addr);
- TCPSOCKLG0(asock, "creating new listening socket on port %d\n", port);
+ TCPSOCKLG0(asock, ("creating new listening socket on port %d\n", port));
#ifndef _WIN32
/*
} else {
asock->genericErrno = ASOCK_LASTERROR();
}
- TCPSOCKLG0(asock, "Connection failed: %s\n",
- Err_Errno2String(asock->genericErrno));
+ TCPSOCKLG0(asock, ("Connection failed: %s\n",
+ Err_Errno2String(asock->genericErrno)));
/* Remove connect callback. */
removed = AsyncTCPSocketPollRemove(asock, TRUE, POLL_FLAG_WRITE,
asock->internalConnectFn);
/* From now on socket is ours. */
SSL_SetCloseOnShutdownFlag(sslSock);
- TCPSOCKLOG(1, s, "new asock id %u attached to fd %d\n", s->base.id, s->fd);
+ TCPSOCKLOG(1, s, ("new asock id %u attached to fd %d\n", s->base.id, s->fd));
return s;
int retVal;
if (!asock->base.errorFn) {
- TCPSOCKWARN(asock, "%s: no registered error handler!\n", __FUNCTION__);
+ TCPSOCKWARN(asock, ("%s: no registered error handler!\n", __FUNCTION__));
return ASOCKERR_INVAL;
}
ASSERT(AsyncTCPSocketIsLocked(asock));
if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
- TCPSOCKWARN(asock, "recv called but state is not connected!\n");
+ TCPSOCKWARN(asock, ("recv called but state is not connected!\n"));
return ASOCKERR_NOTCONNECTED;
}
if (asock->inBlockingRecv && !asock->inRecvLoop) {
- TCPSOCKWARN(asock, "Recv called while a blocking recv is pending.\n");
+ TCPSOCKWARN(asock, ("Recv called while a blocking recv is pending.\n"));
return ASOCKERR_INVAL;
}
int err;
if (!asock->base.errorFn) {
- TCPSOCKWARN(asock, "%s: no registered error handler!\n", __FUNCTION__);
+ TCPSOCKWARN(asock, ("%s: no registered error handler!\n", __FUNCTION__));
return ASOCKERR_INVAL;
}
/*
* No sockets were ready within the specified time.
*/
- TCPSOCKLG0(warnSock, "%s: Timeout waiting for a ready socket.\n",
- __FUNCTION__);
+ TCPSOCKLG0(warnSock, ("%s: Timeout waiting for a ready socket.\n",
+ __FUNCTION__));
return ASOCKERR_TIMEOUT;
case -1: {
* XXX: update the timeout by the amount we had previously waited.
*/
- TCPSOCKLG0(warnSock, "%s: Socket interrupted by a signal.\n",
- __FUNCTION__);
+ TCPSOCKLG0(warnSock, ("%s: Socket interrupted by a signal.\n",
+ __FUNCTION__));
continue;
}
}
}
- TCPSOCKLG0(warnSock, "%s: Failed with error %d: %s\n", __FUNCTION__,
- sysErr, Err_Errno2String(sysErr));
+ TCPSOCKLG0(warnSock, ("%s: Failed with error %d: %s\n", __FUNCTION__,
+ sysErr, Err_Errno2String(sysErr)));
return ASOCKERR_GENERIC;
}
default: {
if (sockErr) {
asock[i]->genericErrno = sockErr;
TCPSOCKLG0(asock[i],
- "%s: Socket error lookup returned %d: %s\n",
- __FUNCTION__, sockErr,
- Err_Errno2String(sockErr));
+ ("%s: Socket error lookup returned %d: %s\n",
+ __FUNCTION__, sockErr,
+ Err_Errno2String(sockErr)));
}
} else {
sysErr = ASOCK_LASTERROR();
asock[i]->genericErrno = sysErr;
- TCPSOCKLG0(asock[i], "%s: Last socket error %d: %s\n",
- __FUNCTION__, sysErr, Err_Errno2String(sysErr));
+ TCPSOCKLG0(asock[i],
+ ("%s: Last socket error %d: %s\n",
+ __FUNCTION__, sysErr, Err_Errno2String(sysErr)));
}
}
}
#endif
- TCPSOCKWARN(warnSock, "%s: Failed to return a ready socket.\n",
- __FUNCTION__);
+ TCPSOCKWARN(warnSock, ("%s: Failed to return a ready socket.\n",
+ __FUNCTION__));
return ASOCKERR_GENERIC;
}
}
if (read && s->fd == -1) {
if (!s->listenAsock4 && !s->listenAsock6) {
- TCPSOCKLG0(s, "%s: Failed to find listener socket.\n", __FUNCTION__);
+ TCPSOCKLG0(s, ("%s: Failed to find listener socket.\n", __FUNCTION__));
return ASOCKERR_GENERIC;
}
}
buf = (uint8*)buf + numBytes;
} else if (numBytes == 0) {
- TCPSOCKLG0(s, "blocking %s detected peer closed connection\n",
- read ? "recv" : "send");
+ TCPSOCKLG0(s, ("blocking %s detected peer closed connection\n",
+ read ? "recv" : "send"));
return ASOCKERR_REMOTE_DISCONNECT;
} else if ((sysErr = ASOCK_LASTERROR()) != ASOCK_EWOULDBLOCK) {
s->genericErrno = sysErr;
- TCPSOCKWARN(s, "blocking %s error %d: %s\n", read ? "recv" : "send",
- sysErr, Err_Errno2String(sysErr));
+ TCPSOCKWARN(s, ("blocking %s error %d: %s\n", read ? "recv" : "send",
+ sysErr, Err_Errno2String(sysErr)));
return ASOCKERR_GENERIC;
}
ASSERT(asock->inLowLatencySendCb < 2);
if (AsyncTCPSocketGetState(asock) != AsyncSocketConnected) {
- TCPSOCKWARN(asock, "send called but state is not connected!\n");
+ TCPSOCKWARN(asock, ("send called but state is not connected!\n"));
return ASOCKERR_NOTCONNECTED;
}
!= NULL ? 1 : 0)
!= VMWARE_STATUS_SUCCESS) {
retVal = ASOCKERR_POLL;
- TCPSOCKLOG(1, asock, "Failed to register poll callback for send\n");
+ TCPSOCKLOG(1, asock,
+ ("Failed to register poll callback for send\n"));
goto outUndoAppend;
}
asock->sendCbTimer = TRUE;
asock->internalSendFn)
!= VMWARE_STATUS_SUCCESS) {
retVal = ASOCKERR_POLL;
- TCPSOCKLOG(1, asock, "Failed to register poll callback for send\n");
+ TCPSOCKLOG(1, asock,
+ ("Failed to register poll callback for send\n"));
goto outUndoAppend;
}
asock->sendCb = TRUE;
* unless you can preserve the system error number
*/
if (recvd > 0) {
- TCPSOCKLOG(3, s, "need\t%d\trecv\t%d\tremain\t%d\n", needed, recvd,
- needed - recvd);
+ TCPSOCKLOG(3, s, ("need\t%d\trecv\t%d\tremain\t%d\n", needed, recvd,
+ needed - recvd));
s->sslConnected = TRUE;
s->base.recvPos += recvd;
if (AsyncSocketCheckAndDispatchRecv(&s->base, &result)) {
goto exit;
}
} else if (recvd == 0) {
- TCPSOCKLG0(s, "recv detected client closed connection\n");
+ TCPSOCKLG0(s, ("recv detected client closed connection\n"));
/*
* We treat this as an error so that the owner can detect closing
* of connection by peer (via the error handler callback).
result = ASOCKERR_REMOTE_DISCONNECT;
goto exit;
} else if ((sysErr = ASOCK_LASTERROR()) == ASOCK_EWOULDBLOCK) {
- TCPSOCKLOG(4, s, "recv would block\n");
+ TCPSOCKLOG(4, s, ("recv would block\n"));
break;
} else {
- TCPSOCKLG0(s, "recv error %d: %s\n", sysErr, Err_Errno2String(sysErr));
+ TCPSOCKLG0(s, ("recv error %d: %s\n", sysErr,
+ Err_Errno2String(sysErr)));
s->genericErrno = sysErr;
result = ASOCKERR_GENERIC;
goto exit;
ASSERT(s->base.refCount > 1);
tmp.sendFn(tmp.buf, tmp.len, BaseSocket(s), tmp.clientData);
if (AsyncTCPSocketGetState(s) == AsyncSocketClosed) {
- TCPSOCKLG0(s, "owner closed connection in send callback\n");
+ TCPSOCKLG0(s, ("owner closed connection in send callback\n"));
result = ASOCKERR_CLOSED;
}
}
}
if (AsyncTCPSocketGetState(s) != AsyncSocketConnected) {
- TCPSOCKWARN(s, "write buffers on a disconnected socket!\n");
+ TCPSOCKWARN(s, ("write buffers on a disconnected socket!\n"));
return ASOCKERR_GENERIC;
}
* unless you can preserve the system error number
*/
if (sent > 0) {
- TCPSOCKLOG(3, s, "left\t%d\tsent\t%d\tremain\t%d\n",
- left, sent, left - sent);
+ TCPSOCKLOG(3, s, ("left\t%d\tsent\t%d\tremain\t%d\n",
+ left, sent, left - sent));
s->sendBufFull = FALSE;
s->sslConnected = TRUE;
if ((s->sendPos += sent) == sizeToSend) {
}
}
} else if (sent == 0) {
- TCPSOCKLG0(s, "socket write() should never return 0.\n");
+ TCPSOCKLG0(s, ("socket write() should never return 0.\n"));
NOT_REACHED();
} else if ((error = ASOCK_LASTERROR()) != ASOCK_EWOULDBLOCK) {
- TCPSOCKLG0(s, "send error %d: %s\n", error, Err_Errno2String(error));
+ TCPSOCKLG0(s, ("send error %d: %s\n", error, Err_Errno2String(error)));
s->genericErrno = error;
if (error == ASOCK_EPIPE || error == ASOCK_ECONNRESET) {
result = ASOCKERR_REMOTE_DISCONNECT;
sysErr = ASOCK_LASTERROR();
s->genericErrno = sysErr;
if (sysErr == ASOCK_EWOULDBLOCK) {
- TCPSOCKWARN(s, "spurious accept notification\n");
+ TCPSOCKWARN(s, ("spurious accept notification\n"));
#if TARGET_OS_IPHONE
/*
* For iOS, while the app is suspended and device's screen is locked,
*/
} else if (sysErr == ECONNABORTED) {
- TCPSOCKLG0(s, "accept: new connection was aborted\n");
+ TCPSOCKLG0(s, ("accept: new connection was aborted\n"));
return ASOCKERR_GENERIC;
#endif
} else {
- TCPSOCKWARN(s, "accept failed on fd %d, error %d: %s\n",
- s->fd, sysErr, Err_Errno2String(sysErr));
+ TCPSOCKWARN(s, ("accept failed on fd %d, error %d: %s\n",
+ s->fd, sysErr, Err_Errno2String(sysErr)));
return ASOCKERR_ACCEPT;
}
*/
if (IN6_IS_ADDR_V4MAPPED(&(addr6->sin6_addr))) {
- TCPSOCKWARN(s, "accept rejected on fd %d due to a IPv4-mapped IPv6 "
- "remote connection address.\n", s->fd);
+ TCPSOCKWARN(s,
+ ("accept rejected on fd %d due to a IPv4-mapped IPv6 "
+ "remote connection address.\n", s->fd));
SSLGeneric_close(fd);
return ASOCKERR_ACCEPT;
if (optval != 0) {
s->genericErrno = optval;
- TCPSOCKLOG(1, s, "connection SO_ERROR: %s\n", Err_Errno2String(optval));
+ TCPSOCKLOG(1, s, ("connection SO_ERROR: %s\n", Err_Errno2String(optval)));
return ASOCKERR_GENERIC;
}
if (read) {
if (AsyncTCPSocketAcceptInternal(asock) != ASOCKERR_SUCCESS) {
- TCPSOCKLG0(s, "wait for connection: accept failed\n");
+ TCPSOCKLG0(s, ("wait for connection: accept failed\n"));
/*
* Just fall through, we'll loop and try again as long as we still
* The recv loop would read the data if there is any and it is
* not safe to proceed and race with the recv loop.
*/
- TCPSOCKLG0(s, "busy: another thread in recv loop\n");
+ TCPSOCKLG0(s, ("busy: another thread in recv loop\n"));
return ASOCKERR_BUSY;
}
retVal = AsyncTCPSocketPoll(s, read, timeoutMS, &asock);
if (retVal != ASOCKERR_SUCCESS) {
if (retVal == ASOCKERR_GENERIC) {
- TCPSOCKWARN(s, "%s: failed to poll on the socket during read.\n",
- __FUNCTION__);
+ TCPSOCKWARN(s, ("%s: failed to poll on the socket during read.\n",
+ __FUNCTION__));
}
} else {
ASSERT(asock == s);
retVal = AsyncTCPSocketPoll(s, read, timeoutMS, &asock);
if (retVal != ASOCKERR_SUCCESS) {
if (retVal == ASOCKERR_GENERIC) {
- TCPSOCKWARN(s, "%s: failed to poll on the socket during write.\n",
- __FUNCTION__);
+ TCPSOCKWARN(s, ("%s: failed to poll on the socket during write.\n",
+ __FUNCTION__));
}
} else {
ASSERT(asock == s);
* The recv loop would read the data if there is any and it is
* not safe to proceed and race with the recv loop.
*/
- TCPSOCKLG0(s, "busy: another thread in recv loop\n");
+ TCPSOCKLG0(s, ("busy: another thread in recv loop\n"));
retVal = ASOCKERR_BUSY;
/* Add a bit of backoff. */
AsyncTCPSocketUnlock(s);
retVal = AsyncTCPSocketPoll(s, TRUE, 0, &asock);
if (retVal != ASOCKERR_SUCCESS) {
if (retVal == ASOCKERR_GENERIC) {
- TCPSOCKWARN(s, "%s: failed to poll on the socket during read.\n",
- __FUNCTION__);
+ TCPSOCKWARN(s, ("%s: failed to poll on the socket during read.\n",
+ __FUNCTION__));
}
} else if (AsyncTCPSocketGetState(s) == AsyncSocketConnected) {
ASSERT(asock == s);
AsyncTCPSocketAddRef(s);
if (AsyncTCPSocketGetState(s) != AsyncSocketConnected) {
- TCPSOCKWARN(s, "flush called but state is not connected!\n");
+ TCPSOCKWARN(s, ("flush called but state is not connected!\n"));
retVal = ASOCKERR_INVAL;
goto outHaveLock;
}
retVal = AsyncTCPSocketPoll(s, FALSE, done - now, &asock);
if (retVal != ASOCKERR_SUCCESS) {
- TCPSOCKWARN(s, "flush failed\n");
+ TCPSOCKWARN(s, ("flush failed\n"));
goto outHaveLock;
}
/* Don't timeout if you've sent everything */
if (now > done && s->sendBufList) {
- TCPSOCKWARN(s, "flush timed out\n");
+ TCPSOCKWARN(s, ("flush timed out\n"));
retVal = ASOCKERR_TIMEOUT;
goto outHaveLock;
}
AsyncTCPSocketAcceptCallback);
if (pollStatus != VMWARE_STATUS_SUCCESS) {
- TCPSOCKWARN(asock, "failed to install listen accept callback!\n");
+ TCPSOCKWARN(asock, ("failed to install listen accept callback!\n"));
}
return pollStatus == VMWARE_STATUS_SUCCESS;
if (asock->recvCb) {
Bool removed;
TCPSOCKLOG(1, asock,
- "Removing poll recv callback while cancelling recv.\n");
+ ("Removing poll recv callback while cancelling recv.\n"));
removed = AsyncTCPSocketPollRemove(asock, TRUE,
POLL_FLAG_READ | POLL_FLAG_PERIODIC,
asock->internalRecvFn);
asock->recvCbTimer = FALSE;
}
if (asock->recvCb) {
- TCPSOCKLOG(1, asock, "recvCb is non-NULL, removing recv callback\n");
+ TCPSOCKLOG(1, asock, ("recvCb is non-NULL, removing recv callback\n"));
removed = AsyncTCPSocketPollRemove(asock, TRUE,
POLL_FLAG_READ | POLL_FLAG_PERIODIC,
asock->internalRecvFn);
if (asock->sendCb) {
TCPSOCKLOG(1, asock,
- "sendBufList is non-NULL, removing send callback\n");
+ ("sendBufList is non-NULL, removing send callback\n"));
/*
* The send callback could be either a device or RTime callback, so
asock->flushEnabledMaxWaitMsec);
if (ret != ASOCKERR_SUCCESS) {
TCPSOCKWARN(asock,
- "AsyncTCPSocket_Flush failed: %s. Closing now.\n",
- AsyncSocket_Err2String(ret));
+ ("AsyncTCPSocket_Flush failed: %s. Closing now.\n",
+ AsyncSocket_Err2String(ret)));
}
}
* right thing accordingly
*/
- TCPSOCKLOG(1, asock, "closing socket\n");
+ TCPSOCKLOG(1, asock, ("closing socket\n"));
oldState = AsyncTCPSocketGetState(asock);
AsyncTCPSocketSetState(asock, AsyncSocketClosed);
switch(oldState) {
case AsyncSocketListening:
- TCPSOCKLOG(1, asock,
- "old state was listening, removing accept callback\n");
+ TCPSOCKLOG(1, asock, ("old state was listening, removing accept "
+ "callback\n"));
AsyncTCPSocketCancelListenCb(asock);
break;
case AsyncSocketConnecting:
- TCPSOCKLOG(1, asock,
- "old state was connecting, removing connect callback\n");
+ TCPSOCKLOG(1, asock, ("old state was connecting, removing connect "
+ "callback\n"));
removed = AsyncTCPSocketCancelCbForConnectingClose(asock);
if (!removed) {
- TCPSOCKLOG(1, asock,
- "connect callback is not present in the poll list.\n");
+ TCPSOCKLOG(1, asock, ("connect callback is not present in the poll "
+ "list.\n"));
}
break;
case AsyncSocketConnected:
- TCPSOCKLOG(1, asock, "old state was connected\n");
+ TCPSOCKLOG(1, asock, ("old state was connected\n"));
AsyncTCPSocketCancelCbForClose(BaseSocket(asock));
break;
case AsyncSocketCBCancelled:
- TCPSOCKLOG(1, asock, "old state was CB-cancelled\n");
+ TCPSOCKLOG(1, asock, ("old state was CB-cancelled\n"));
break;
default:
asock->internalRecvFn, asock->fd);
}
} else {
- TCPSOCKLG0(asock, "Skip recv because %s\n",
- asock->recvCb ? "blocking recv is in progress"
- : "recv callback is cancelled");
+ TCPSOCKLG0(asock, ("Skip recv because %s\n",
+ asock->recvCb ? "blocking recv is in progress"
+ : "recv callback is cancelled"));
}
/* This is a one-shot callback so we always release the reference taken. */
if (s->sendCb) {
AsyncTCPSocketSendCallback(s);
} else {
- TCPSOCKLG0(s, "cancelled send callback fired\n");
+ TCPSOCKLG0(s, ("cancelled send callback fired\n"));
}
s->inIPollCb &= ~IN_IPOLL_SEND;
AsyncTCPSocketSslConnectCallback);
if (pollStatus != VMWARE_STATUS_SUCCESS) {
- TCPSOCKWARN(asock, "failed to reinstall ssl connect callback!\n");
+ TCPSOCKWARN(asock, ("failed to reinstall ssl connect callback!\n"));
asock->sslPollFlags = 0;
(*asock->sslConnectFn)(FALSE, BaseSocket(asock), asock->clientData);
}
ASSERT(AsyncTCPSocketIsLocked(asock));
if (asock->sslConnectFn || asock->sslAcceptFn) {
- TCPSOCKWARN(asock, "An SSL operation was already initiated.\n");
+ TCPSOCKWARN(asock, ("An SSL operation was already initiated.\n"));
return ASOCKERR_GENERIC;
}
AsyncTCPSocketSslAcceptCallback);
if (pollStatus != VMWARE_STATUS_SUCCESS) {
- TCPSOCKWARN(asock, "failed to reinstall ssl accept callback!\n");
+ TCPSOCKWARN(asock, ("failed to reinstall ssl accept callback!\n"));
asock->sslPollFlags = 0;
(*asock->sslAcceptFn)(FALSE, BaseSocket(asock), asock->clientData);
}
ASSERT(AsyncTCPSocketIsLocked(asock));
if (asock->sslAcceptFn || asock->sslConnectFn) {
- TCPSOCKWARN(asock, "An SSL operation was already initiated.\n");
+ TCPSOCKWARN(asock, ("An SSL operation was already initiated.\n"));
return ASOCKERR_GENERIC;
}
break;
default:
TCPSOCKLG0(tcpSocket,
- "%s: Option layer [%d] (option [%d]) is not "
+ ("%s: Option layer [%d] (option [%d]) is not "
"supported for TCP socket.\n",
- __FUNCTION__, (int)layer, optID);
+ __FUNCTION__, (int)layer, optID));
return ASOCKERR_INVAL;
}
(optID == ASYNC_SOCKET_OPT_SEND_LOW_LATENCY_MODE)) {
ASSERT(inBufLen == sizeof(Bool));
tcpSocket->sendLowLatency = *((const Bool *)valuePtr);
- TCPSOCKLG0(tcpSocket, "%s: sendLowLatencyMode set to [%d].\n",
- __FUNCTION__, (int)tcpSocket->sendLowLatency);
+ TCPSOCKLG0(tcpSocket,
+ ("%s: sendLowLatencyMode set to [%d].\n",
+ __FUNCTION__, (int)tcpSocket->sendLowLatency));
return ASOCKERR_SUCCESS;
}
if (!isSupported) {
TCPSOCKLG0(tcpSocket,
- "%s: Option layer/level [%d], option/name [%d]: "
+ ("%s: Option layer/level [%d], option/name [%d]: "
"could not set OS option for TCP socket; "
"option not supported.\n",
- __FUNCTION__, (int)layer, optID);
+ __FUNCTION__, (int)layer, optID));
return ASOCKERR_INVAL;
}
valuePtr, inBufLen) != 0) {
tcpSocket->genericErrno = Err_Errno();
TCPSOCKLG0(tcpSocket,
- "%s: Option layer/level [%d], option/name [%d]: "
+ ("%s: Option layer/level [%d], option/name [%d]: "
"could not set OS option for TCP socket; "
"error [%d: %s].\n",
__FUNCTION__, (int)layer, optID,
tcpSocket->genericErrno,
- Err_Errno2String(tcpSocket->genericErrno));
+ Err_Errno2String(tcpSocket->genericErrno)));
return ASOCKERR_GENERIC;
}
TCPSOCKLG0(tcpSocket,
- "%s: Option layer/level [%d], option/name [%d]: successfully "
+ ("%s: Option layer/level [%d], option/name [%d]: successfully "
"set OS option for TCP socket.\n",
- __FUNCTION__, (int)layer, optID);
+ __FUNCTION__, (int)layer, optID));
return ASOCKERR_SUCCESS;
}
break;
default:
TCPSOCKLG0(tcpSocket,
- "%s: Option layer [%d] (option [%d]) is not "
+ ("%s: Option layer [%d] (option [%d]) is not "
"supported for TCP socket.\n",
- __FUNCTION__, (int)layer, optID);
+ __FUNCTION__, (int)layer, optID));
return ASOCKERR_INVAL;
}
*outBufLen = sizeof(Bool);
*((Bool *)valuePtr) = tcpSocket->sendLowLatency;
TCPSOCKLG0(tcpSocket,
- "%s: sendLowLatencyMode is [%d].\n",
- __FUNCTION__, (int)tcpSocket->sendLowLatency);
+ ("%s: sendLowLatencyMode is [%d].\n",
+ __FUNCTION__, (int)tcpSocket->sendLowLatency));
return ASOCKERR_SUCCESS;
}
if (!isSupported) {
TCPSOCKLG0(tcpSocket,
- "%s: Option layer/level [%d], option/name [%d]: "
+ ("%s: Option layer/level [%d], option/name [%d]: "
"could not get OS option for TCP socket; "
"option not supported.\n",
- __FUNCTION__, (int)layer, optID);
+ __FUNCTION__, (int)layer, optID));
return ASOCKERR_INVAL;
}
valuePtr, outBufLen) != 0) {
tcpSocket->genericErrno = Err_Errno();
TCPSOCKLG0(tcpSocket,
- "%s: Option layer/level [%d], option/name [%d]: "
+ ("%s: Option layer/level [%d], option/name [%d]: "
"could not get OS option for TCP socket; "
"error [%d: %s].\n",
__FUNCTION__, (int)layer, optID,
tcpSocket->genericErrno,
- Err_Errno2String(tcpSocket->genericErrno));
+ Err_Errno2String(tcpSocket->genericErrno)));
return ASOCKERR_GENERIC;
}
TCPSOCKLG0(tcpSocket,
- "%s: Option layer/level [%d], option/name [%d]: successfully "
+ ("%s: Option layer/level [%d], option/name [%d]: successfully "
"got OS option for TCP socket.\n",
- __FUNCTION__, (int)layer, optID);
+ __FUNCTION__, (int)layer, optID));
return ASOCKERR_SUCCESS;
}