Changed the format parameters in some of the debug printf to

be more cross-platform enabled.
This commit is contained in:
Juan Carlos Luciani 2006-11-15 06:32:25 +00:00
parent 0d7915de0e
commit 027e884407
9 changed files with 124 additions and 124 deletions

View File

@ -82,7 +82,7 @@ CChannel::CChannel(
// L2
//=======================================================================--
{
DbgTrace(1, "CChannel::CChannel(TcpSocket)- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::CChannel(TcpSocket)- Start, Obj = %0X\n", this);
// Use Tcp socket
m_useTcpSocket = true;
@ -126,7 +126,7 @@ CChannel::CChannel(
// L2
//=======================================================================--
{
DbgTrace(1, "CChannel::CChannel(DomainSocket)- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::CChannel(DomainSocket)- Start, Obj = %0X\n", this);
// Do not use Tcp socket
m_useTcpSocket = false;
@ -165,7 +165,7 @@ CChannel::~CChannel(void)
// L2
//=======================================================================--
{
DbgTrace(1, "CChannel::~CChannel- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::~CChannel- Start, Obj = %0X\n", this);
// Cleanup resources allocated for the object
pthread_mutex_destroy(&m_mutex);
@ -276,7 +276,7 @@ CChannel::connectSocket(void)
}
}
DbgTrace(1, "CChannel::connectSocket- End, status = %08X\n", retStatus);
DbgTrace(1, "CChannel::connectSocket- End, status = %0X\n", retStatus);
return retStatus;
@ -301,7 +301,7 @@ CChannel::init(void)
int retStatus = -1;
SmartCChannel *pSmartCChannel = NULL;
DbgTrace(1, "CChannel::init- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::init- Start, Obj = %0X\n", this);
// Verify the state of the object
if (m_state == State_Uninitialized)
@ -333,7 +333,7 @@ CChannel::init(void)
}
else
{
DbgTrace(0, "CChannel::init- Unable to create channel connection thread, error = %08X\n", threadCreateStatus);
DbgTrace(0, "CChannel::init- Unable to create channel connection thread, error = %0X\n", threadCreateStatus);
}
}
catch (...) {
@ -365,7 +365,7 @@ CChannel::init(void)
delete pSmartCChannel;
}
DbgTrace(1, "CChannel::init- End, status = %08X\n", retStatus);
DbgTrace(1, "CChannel::init- End, status = %0X\n", retStatus);
return retStatus;
@ -399,7 +399,7 @@ CChannel::connectionThread(
RCMapIter iter;
ClientReq *pClientReq;
DbgTrace(1, "CChannel::connectionThread- Start, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- Start, Obj = %0X\n", pCChannel);
// Set the thread in the detached state so that it is cleaned up when it exits
pthread_detach(pthread_self());
@ -410,7 +410,7 @@ CChannel::connectionThread(
// Receive and process channel data
while (!doneReceivingData)
{
DbgTrace(2, "CChannel::connectionThread- Receive Loop, Obj = %08X\n", pCChannel);
DbgTrace(2, "CChannel::connectionThread- Receive Loop, Obj = %0X\n", pCChannel);
// Receive the ReqDataPktHdr. Note, if we add other packet types and if the
// packet types have different header lengths, then we will need to modify
@ -445,7 +445,7 @@ CChannel::connectionThread(
{
case ChannelProto::ReqDataCarrierPacketType:
DbgTrace(2, "CChannel::connectionThread- Processing Request Data Packet, Obj = %08X\n", pCChannel);
DbgTrace(2, "CChannel::connectionThread- Processing Request Data Packet, Obj = %0X\n", pCChannel);
// Allocate a buffer big enough to receive the payload. Allow space to NULL terminate.
pRecvBuff = (char*) malloc(payloadLength + 1);
@ -494,7 +494,7 @@ CChannel::connectionThread(
}
else
{
DbgTrace(0, "CChannel::connectionThread- Error, did not find object in map, Obj = %08X\n", pCChannel);
DbgTrace(0, "CChannel::connectionThread- Error, did not find object in map, Obj = %0X\n", pCChannel);
}
// Release exclusive access to the CChannel object
@ -502,23 +502,23 @@ CChannel::connectionThread(
}
else
{
DbgTrace(1, "CChannel::connectionThread- Connection aborted prematurely, Obj = %08X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 1Connection aborted prematurely, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- Connection aborted prematurely, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 1Connection aborted prematurely, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 1bytesReceived = %d\n", bytesReceived);
//DbgTrace(0, "CChannel::connectionThread- 1payloadLength = %d\n", payloadLength);
//DbgTrace(0, "CChannel::connectionThread- 1errno = %d\n", errno);
//printf("bytesReceived = %d, payloadLength = %d\n", bytesReceived, payloadLength);
//printf("CChannel::connectionThread- 1Connection aborted prematurely, Obj = %08X\n", pCChannel);
//printf("CChannel::connectionThread- 1Connection aborted prematurely, Obj = %0X\n", pCChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(1, "CChannel::connectionThread- Connection aborted prematurely, Obj = %08X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 2Connection aborted prematurely, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- Connection aborted prematurely, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 2Connection aborted prematurely, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 2errno = %d\n", errno);
//printf("Socket error = %d\n", errno);
//printf("CChannel::connectionThread- 2Connection aborted prematurely, Obj = %08X\n", pCChannel);
//printf("CChannel::connectionThread- 2Connection aborted prematurely, Obj = %0X\n", pCChannel);
doneReceivingData = true;
}
@ -528,14 +528,14 @@ CChannel::connectionThread(
}
else
{
DbgTrace(0, "CChannel::connectionThread- Unable to allocate receive buffer, Obj = %08X\n", pCChannel);
DbgTrace(0, "CChannel::connectionThread- Unable to allocate receive buffer, Obj = %0X\n", pCChannel);
doneReceivingData = true;
}
break;
case ChannelProto::ReqErrorCarrierPacketType:
DbgTrace(1, "CChannel::connectionThread- Processing Request Error Packet, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- Processing Request Error Packet, Obj = %0X\n", pCChannel);
// Acquire exclusive access to the CChannel object
pthread_mutex_lock(&pCChannel->m_mutex);
@ -551,7 +551,7 @@ CChannel::connectionThread(
}
else
{
DbgTrace(0, "CChannel::connectionThread- Error, did not find object in map, Obj = %08X\n", pCChannel);
DbgTrace(0, "CChannel::connectionThread- Error, did not find object in map, Obj = %0X\n", pCChannel);
}
// Release exclusive access to the CChannel object
@ -560,36 +560,36 @@ CChannel::connectionThread(
default:
DbgTrace(0, "CChannel::connectionThread- Unknown Packet Type, Obj = %08X\n", pCChannel);
DbgTrace(0, "CChannel::connectionThread- Unknown Packet Type, Obj = %0X\n", pCChannel);
doneReceivingData = true;
break;
}
}
else
{
DbgTrace(1, "CChannel::connectionThread- Unable to obtain payload length, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- Unable to obtain payload length, Obj = %0X\n", pCChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(1, "CChannel::connectionThread- The channel connection was terminated, Obj = %08X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 3The channel connection was terminated, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- The channel connection was terminated, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 3The channel connection was terminated, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 3bytesReceived = %d\n", bytesReceived);
//DbgTrace(0, "CChannel::connectionThread- 3expected = %d\n", ReqDataPktHdrTemplate.length());
//DbgTrace(0, "CChannel::connectionThread- 3errno = %d\n", errno);
//printf("bytesReceived = %d, expected = %d\n", bytesReceived, ReqDataPktHdrTemplate.length());
//printf("CChannel::connectionThread- 3The channel connection was terminated, Obj = %08X\n", pCChannel);
//printf("CChannel::connectionThread- 3The channel connection was terminated, Obj = %0X\n", pCChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(1, "CChannel::connectionThread- The channel connection was aborted, Obj = %08X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 4The channel connection was aborted, Obj = %08X\n", pCChannel);
DbgTrace(1, "CChannel::connectionThread- The channel connection was aborted, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 4The channel connection was aborted, Obj = %0X\n", pCChannel);
//DbgTrace(0, "CChannel::connectionThread- 4errno = %d\n", errno);
//printf("Socket error = %d\n", errno);
//printf("CChannel::connectionThread- 4The channel connection was aborted, Obj = %08X\n", pCChannel);
//printf("CChannel::connectionThread- 4The channel connection was aborted, Obj = %0X\n", pCChannel);
doneReceivingData = true;
}
}
@ -651,7 +651,7 @@ CChannel::closeChannel(void)
//=======================================================================--
{
DbgTrace(1, "CChannel::closeChannel- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::closeChannel- Start, Obj = %0X\n", this);
// Acquire CChannel mutex
pthread_mutex_lock(&m_mutex);
@ -697,7 +697,7 @@ CChannel::ok(void)
{
bool retStatus;
DbgTrace(1, "CChannel::ok- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::ok- Start, Obj = %0X\n", this);
// Return true if connected
if (m_state == State_Connected)
@ -705,7 +705,7 @@ CChannel::ok(void)
else
retStatus = false;
DbgTrace(1, "CChannel::ok- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "CChannel::ok- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -729,12 +729,12 @@ CChannel::allocReqId(void)
{
uint32_t allocatedId;
DbgTrace(1, "CChannel::allocReqId- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::allocReqId- Start, Obj = %0X\n", this);
// Perform atomic operation
allocatedId = InterlockedIncrement(&m_reqIdAllocator);
DbgTrace(1, "CChannel::allocReqId- End, allocatedId = %08X\n", allocatedId);
DbgTrace(1, "CChannel::allocReqId- End, allocatedId = %0X\n", allocatedId);
return allocatedId;
@ -768,7 +768,7 @@ CChannel::submitReq(
unsigned long totalBytesSent = 0;
unsigned long bytesToSend = sizeof(reqDataPktHdr) + clientDataLen;
DbgTrace(1, "CChannel::submitReq- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::submitReq- Start, Obj = %0X\n", this);
// Acquire exclusive access to the channel object
pthread_mutex_lock(&m_mutex);
@ -783,7 +783,7 @@ CChannel::submitReq(
if (!insertResult.second)
{
// Insertion failed
DbgTrace(0, "CChannel::submitReq- Unable to insert ClientReq into ClientReqMap, Obj = %08X\n", this);
DbgTrace(0, "CChannel::submitReq- Unable to insert ClientReq into ClientReqMap, Obj = %0X\n", this);
}
else
{
@ -871,7 +871,7 @@ CChannel::submitReq(
}
else
{
DbgTrace(0, "CChannel::submitReq- Error building Req Data Pkt Header, Obj = %08X\n", this);
DbgTrace(0, "CChannel::submitReq- Error building Req Data Pkt Header, Obj = %0X\n", this);
// Remove ClientReq from the ClientReqMap
RCMapIter iter = m_rcMap.find(reqId);
@ -889,13 +889,13 @@ CChannel::submitReq(
}
else
{
DbgTrace(1, "CChannel::submitReq- Channel not connected, state = %08X\n", m_state);
DbgTrace(1, "CChannel::submitReq- Channel not connected, state = %0X\n", m_state);
}
// Release exclusive access to the channel object
pthread_mutex_unlock(&m_mutex);
DbgTrace(1, "CChannel::submitReq- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "CChannel::submitReq- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -918,7 +918,7 @@ CChannel::removeReq(
// L2
//=======================================================================--
{
DbgTrace(1, "CChannel::removeReq- Start, Obj = %08X\n", this);
DbgTrace(1, "CChannel::removeReq- Start, Obj = %0X\n", this);
// Acquire exclusive access to the channel object
pthread_mutex_lock(&m_mutex);

View File

@ -182,7 +182,7 @@ IpcClientOpenUnixRemoteEndPoint(
exit:
DbgTrace(1, "IpcClientOpenUnixRemoteEndPoint- End, status = %08X\n", retStatus);
DbgTrace(1, "IpcClientOpenUnixRemoteEndPoint- End, status = %0X\n", retStatus);
return retStatus;
}
@ -284,7 +284,7 @@ IpcClientOpenInetRemoteEndPoint(
exit:
DbgTrace(1, "IpcClientOpenInetRemoteEndPoint- End, status = %08X\n", retStatus);
DbgTrace(1, "IpcClientOpenInetRemoteEndPoint- End, status = %0X\n", retStatus);
return retStatus;
}
@ -356,7 +356,7 @@ IpcClientCloseRemoteEndPoint(
exit:
DbgTrace(1, "IpcClientCloseRemoteEndPoint- End, status = %08X\n", retStatus);
DbgTrace(1, "IpcClientCloseRemoteEndPoint- End, status = %0X\n", retStatus);
return retStatus;
}
@ -450,7 +450,7 @@ IpcClientSubmitReq(
DbgTrace(0, "IpcClientSubmitReq- Not initialized\n", 0);
}
DbgTrace(1, "IpcClientSubmitReq- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "IpcClientSubmitReq- End, retStatus = %0X\n", retStatus);
return retStatus;
}
@ -538,7 +538,7 @@ IpcClientInit(
exit:
DbgTrace(1, "IpcClientInit- End, status = %08X\n", retStatus);
DbgTrace(1, "IpcClientInit- End, status = %0X\n", retStatus);
return retStatus;
}

View File

@ -75,7 +75,7 @@ ClientReq::ClientReq(
// L2
//=======================================================================--
{
DbgTrace(1, "ClientReq::ClientReq- Start, Obj = %08X\n", this);
DbgTrace(1, "ClientReq::ClientReq- Start, Obj = %0X\n", this);
// Initialize the mutex
if (pthread_mutex_init(&m_mutex, NULL) != 0)
@ -120,7 +120,7 @@ ClientReq::~ClientReq(void)
// L2
//=======================================================================--
{
DbgTrace(1, "ClientReq::~ClientReq- Start, Obj = %08X\n", this);
DbgTrace(1, "ClientReq::~ClientReq- Start, Obj = %0X\n", this);
// Cleanup resources allocated for the object
pthread_mutex_destroy(&m_mutex);
@ -155,7 +155,7 @@ ClientReq::processServerData(
// L2
//=======================================================================--
{
DbgTrace(1, "ClientReq::processServerData- Start, Obj = %08X\n", this);
DbgTrace(1, "ClientReq::processServerData- Start, Obj = %0X\n", this);
// Acquire exclusive access to the object
pthread_mutex_lock(&m_mutex);
@ -199,7 +199,7 @@ ClientReq::processError(void)
// L2
//=======================================================================--
{
DbgTrace(1, "ClientReq::processError- Start, Obj = %08X\n", this);
DbgTrace(1, "ClientReq::processError- Start, Obj = %0X\n", this);
// Acquire exclusive access to the object
pthread_mutex_lock(&m_mutex);
@ -246,7 +246,7 @@ ClientReq::waitForCompletion(
int retStatus;
int oldCancelState;
DbgTrace(1, "ClientReq::waitForCompletion- Start, Obj = %08X\n", this);
DbgTrace(1, "ClientReq::waitForCompletion- Start, Obj = %0X\n", this);
// Make sure that the thread can not be cancelled while executing
// in this routine.
@ -281,7 +281,7 @@ ClientReq::waitForCompletion(
else
retStatus = -1;
DbgTrace(1, "ClientReq::waitForCompletion- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "ClientReq::waitForCompletion- End, retStatus = %0X\n", retStatus);
// Restore the threads cancel state
pthread_setcancelstate(oldCancelState, NULL);
@ -308,7 +308,7 @@ ClientReq::completionStatus(void)
{
CompletionStatus compStatus;
DbgTrace(1, "ClientReq::completionStatus- Start, Obj = %08X\n", this);
DbgTrace(1, "ClientReq::completionStatus- Start, Obj = %0X\n", this);
// Check if we encountered any issues
if (m_internalProblem)
@ -320,7 +320,7 @@ ClientReq::completionStatus(void)
compStatus = SuccessCompletionStatus;
}
DbgTrace(1, "ClientReq::completionStatus- End, compStatus = %08X\n", compStatus);
DbgTrace(1, "ClientReq::completionStatus- End, compStatus = %0X\n", compStatus);
return compStatus;

View File

@ -78,7 +78,7 @@ RemoteEndPoint::RemoteEndPoint(
// L2
//=======================================================================--
{
DbgTrace(1, "RemoteEndPoint::RemoteEndPoint- Start, Obj = %08X\n", this);
DbgTrace(1, "RemoteEndPoint::RemoteEndPoint- Start, Obj = %0X\n", this);
// Initialize our mutex
pthread_mutex_init(&m_mutex, NULL);
@ -138,7 +138,7 @@ RemoteEndPoint::RemoteEndPoint(
// L2
//=======================================================================--
{
DbgTrace(1, "RemoteEndPoint::RemoteEndPoint- Start, Obj = %08X\n", this);
DbgTrace(1, "RemoteEndPoint::RemoteEndPoint- Start, Obj = %0X\n", this);
// Initialize our mutex
pthread_mutex_init(&m_mutex, NULL);
@ -191,7 +191,7 @@ RemoteEndPoint::~RemoteEndPoint(void)
// L2
//=======================================================================--
{
DbgTrace(1, "RemoteEndPoint::~RemoteEndPoint- Start, Obj = %08X\n", this);
DbgTrace(1, "RemoteEndPoint::~RemoteEndPoint- Start, Obj = %0X\n", this);
// Clean up all allocated SmartCChannel objects
for (int i = 0; i < m_cchannelVector.size(); i++)
@ -230,7 +230,7 @@ RemoteEndPoint::getCChannel(void)
SmartCChannel *pSmartCChannel = NULL;
int channelSelector = (m_numChannelSubmits++) % m_numCChannels;
DbgTrace(1, "RemoteEndPoint::getCChannel- Start, Obj = %08X\n", this);
DbgTrace(1, "RemoteEndPoint::getCChannel- Start, Obj = %0X\n", this);
#if DEBUG
assert(m_signature == REMOTE_ENDPOINT_SIGNATURE);
@ -342,7 +342,7 @@ RemoteEndPoint::submitReq(
{
int retStatus = -1;
DbgTrace(1, "RemoteEndPoint::submitReq- Start, Obj = %08X\n", this);
DbgTrace(1, "RemoteEndPoint::submitReq- Start, Obj = %0X\n", this);
try {
SmartCChannel *pSmartCChannel;

View File

@ -81,16 +81,16 @@ ChannelProto::buildReqDataPktHdr(
// - Req Data Packet Header Format -
//
// ReqDataCarrierType
// ReqIdHdr value (value format=%08X)
// PayloadLengthHdr value (value format=%08X)
// ReqIdHdr value (value format=%0X)
// PayloadLengthHdr value (value format=%0X)
//
// Setup the necessary value strings
char wrkBuffer[10];
sprintf(wrkBuffer, "%08X", reqId);
sprintf(wrkBuffer, "%0X", reqId);
string reqIdValue = wrkBuffer;
sprintf(wrkBuffer, "%08X", payloadLength);
sprintf(wrkBuffer, "%0X", payloadLength);
string payloadLengthValue = wrkBuffer;
// Format the header.
@ -121,7 +121,7 @@ ChannelProto::buildReqDataPktHdr(
DbgTrace(0, "ChannelProto::buildReqDataPktHdr- Exception caught while creating header\n", 0);
}
DbgTrace(1, "ChannelProto::buildReqDataPktHdr- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "ChannelProto::buildReqDataPktHdr- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -154,16 +154,16 @@ ChannelProto::buildReqErrorPktHdr(
// - Req Error Packet Header Format -
//
// ReqErrorCarrierType
// ReqIdHdr value (value format=%08X)
// PayloadLengthHdr value (value format=%08X)
// ReqIdHdr value (value format=%0X)
// PayloadLengthHdr value (value format=%0X)
//
// Setup the necessary value strings
char wrkBuffer[10];
sprintf(wrkBuffer, "%08X", reqId);
sprintf(wrkBuffer, "%0X", reqId);
string reqIdValue = wrkBuffer;
sprintf(wrkBuffer, "%08X", payloadLength);
sprintf(wrkBuffer, "%0X", payloadLength);
string payloadLengthValue = wrkBuffer;
// Format the header.
@ -194,7 +194,7 @@ ChannelProto::buildReqErrorPktHdr(
DbgTrace(0, "ChannelProto::buildReqErrorPktHdr- Exception caught while creating header\n", 0);
}
DbgTrace(1, "ChannelProto::buildReqErrorPktHdr- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "ChannelProto::buildReqErrorPktHdr- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -374,7 +374,7 @@ ChannelProto::getReqIdAndPayloadLength(
}
DbgTrace(1,
"ChannelProto::getReqIdAndPayloadLength- End, retStatus = %08X\n",
"ChannelProto::getReqIdAndPayloadLength- End, retStatus = %0X\n",
reqIdObtained && payloadLengthObtained);
return reqIdObtained && payloadLengthObtained;

View File

@ -90,7 +90,7 @@ SChannel::SChannel(
// L2
//=======================================================================--
{
DbgTrace(1, "SChannel::SChannel- Start, Obj = %08X\n", this);
DbgTrace(1, "SChannel::SChannel- Start, Obj = %0X\n", this);
// Initialize the mutex
if (pthread_mutex_init(&m_mutex, NULL) != 0)
@ -123,7 +123,7 @@ SChannel::~SChannel(void)
// L2
//=======================================================================--
{
DbgTrace(1, "SChannel::~SChannel- Start, Obj = %08X\n", this);
DbgTrace(1, "SChannel::~SChannel- Start, Obj = %0X\n", this);
// Cleanup resources allocated for the object
pthread_mutex_destroy(&m_mutex);
@ -163,7 +163,7 @@ SChannel::init(void)
int retStatus = -1;
SmartSChannel *pSmartSChannel = NULL;
DbgTrace(1, "SChannel::init- Start, Obj = %08X\n", this);
DbgTrace(1, "SChannel::init- Start, Obj = %0X\n", this);
// Verify the state of the object
if (m_state == State_Connected)
@ -187,7 +187,7 @@ SChannel::init(void)
}
else
{
DbgTrace(0, "SChannel::init- Unable to create channel connection thread, error = %08X\n", threadCreateStatus);
DbgTrace(0, "SChannel::init- Unable to create channel connection thread, error = %0X\n", threadCreateStatus);
}
}
catch (...) {
@ -209,7 +209,7 @@ SChannel::init(void)
delete pSmartSChannel;
}
DbgTrace(1, "SChannel::init- End, status = %08X\n", retStatus);
DbgTrace(1, "SChannel::init- End, status = %0X\n", retStatus);
return retStatus;
@ -244,7 +244,7 @@ SChannel::connectionThread(
char *pRecvBuff;
ServerReq *pServerReq;
DbgTrace(1, "SChannel::connectionThread- Start, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- Start, Obj = %0X\n", pSChannel);
// Set the thread in the detached state so that it is cleaned up when it exits
pthread_detach(pthread_self());
@ -255,7 +255,7 @@ SChannel::connectionThread(
// Receive and process channel data
while (!doneReceivingData)
{
DbgTrace(2, "SChannel::connectionThread- Receive Loop, Obj = %08X\n", pSChannel);
DbgTrace(2, "SChannel::connectionThread- Receive Loop, Obj = %0X\n", pSChannel);
// Receive the ReqDataPktHdr. Note, if we add other packet types and if the
// packet types have different header lengths, then we will need to modify
@ -289,7 +289,7 @@ SChannel::connectionThread(
{
case ChannelProto::ReqDataCarrierPacketType:
DbgTrace(2, "SChannel::connectionThread- Processing Request Data Packet, Obj = %08X\n", pSChannel);
DbgTrace(2, "SChannel::connectionThread- Processing Request Data Packet, Obj = %0X\n", pSChannel);
// Allocate a buffer big enough to receive the payload. Allow space to NULL terminate.
pRecvBuff = new char[payloadLength + 1];
@ -343,7 +343,7 @@ SChannel::connectionThread(
if (ServiceRequest(pServerReq) != 0)
{
// Failed to start processing of the Request, delete the ServerReq object.
DbgTrace(0, "SChannel::connectionThread- StartRequest failed, Obj = %08X\n", pSChannel);
DbgTrace(0, "SChannel::connectionThread- StartRequest failed, Obj = %0X\n", pSChannel);
delete pServerReq;
}
else
@ -353,8 +353,8 @@ SChannel::connectionThread(
}
else
{
//DbgTrace(1, "SChannel::connectionThread- Failed to obtain idle ServerReq, Obj = %08X\n", pSChannel);
DbgTrace(0, "SChannel::connectionThread- Failed to obtain idle ServerReq, Obj = %08X\n", pSChannel);
//DbgTrace(1, "SChannel::connectionThread- Failed to obtain idle ServerReq, Obj = %0X\n", pSChannel);
DbgTrace(0, "SChannel::connectionThread- Failed to obtain idle ServerReq, Obj = %0X\n", pSChannel);
}
// Check if we must send an Request Error packet back to the client
@ -372,14 +372,14 @@ SChannel::connectionThread(
MSG_NOSIGNAL);
if (bytesSent != sizeof(reqErrorPktHdr))
{
DbgTrace(1, "SChannel::connectionThread- Connection aborted prematurely, Obj = %08X\n", pSChannel);
//printf("SChannel::connectionThread- 1Connection aborted prematurely, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- Connection aborted prematurely, Obj = %0X\n", pSChannel);
//printf("SChannel::connectionThread- 1Connection aborted prematurely, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(0, "SChannel::connectionThread- Error building Req End Pkt Header, Obj = %08X\n", pSChannel);
DbgTrace(0, "SChannel::connectionThread- Error building Req End Pkt Header, Obj = %0X\n", pSChannel);
}
}
@ -388,17 +388,17 @@ SChannel::connectionThread(
}
else
{
DbgTrace(1, "SChannel::connectionThread- Connection aborted prematurely, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- Connection aborted prematurely, Obj = %0X\n", pSChannel);
//printf("bytesReceived = %d, payloadLength = %d\n", bytesReceived, payloadLength);
//printf("SChannel::connectionThread- 2Connection aborted prematurely, Obj = %08X\n", pSChannel);
//printf("SChannel::connectionThread- 2Connection aborted prematurely, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(1, "SChannel::connectionThread- Connection aborted prematurely, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- Connection aborted prematurely, Obj = %0X\n", pSChannel);
//printf("Socket error = %d\n", errno);
//printf("SChannel::connectionThread- 3Connection aborted prematurely, Obj = %08X\n", pSChannel);
//printf("SChannel::connectionThread- 3Connection aborted prematurely, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
@ -408,37 +408,37 @@ SChannel::connectionThread(
}
else
{
DbgTrace(0, "SChannel::connectionThread- Unable to allocate receive buffer, Obj = %08X\n", pSChannel);
DbgTrace(0, "SChannel::connectionThread- Unable to allocate receive buffer, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
break;
default:
DbgTrace(0, "SChannel::connectionThread- Unknown Packet Type, Obj = %08X\n", pSChannel);
DbgTrace(0, "SChannel::connectionThread- Unknown Packet Type, Obj = %0X\n", pSChannel);
doneReceivingData = true;
break;
}
}
else
{
DbgTrace(1, "SChannel::connectionThread- Unable to obtain payload length, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- Unable to obtain payload length, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(1, "SChannel::connectionThread- The channel connection was terminated, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- The channel connection was terminated, Obj = %0X\n", pSChannel);
//printf("bytesReceived = %d, expected = %d\n", bytesReceived, ReqDataPktHdrTemplate.length());
//printf("SChannel::connectionThread- 4The channel connection was terminated, Obj = %08X\n", pSChannel);
//printf("SChannel::connectionThread- 4The channel connection was terminated, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
}
else
{
DbgTrace(1, "SChannel::connectionThread- The channel connection was aborted, Obj = %08X\n", pSChannel);
DbgTrace(1, "SChannel::connectionThread- The channel connection was aborted, Obj = %0X\n", pSChannel);
//printf("Socket error = %d\n", errno);
//printf("SChannel::connectionThread- 5The channel connection was aborted, Obj = %08X\n", pSChannel);
//printf("SChannel::connectionThread- 5The channel connection was aborted, Obj = %0X\n", pSChannel);
doneReceivingData = true;
}
}
@ -486,7 +486,7 @@ SChannel::closeChannel(void)
//=======================================================================--
{
DbgTrace(1, "SChannel::closeChannel- Start, Obj = %08X\n", this);
DbgTrace(1, "SChannel::closeChannel- Start, Obj = %0X\n", this);
// Acquire SChannel mutex
pthread_mutex_lock(&m_mutex);
@ -543,7 +543,7 @@ SChannel::sendReplyData(
unsigned long totalBytesSent = 0;
unsigned long bytesToSend = sizeof(reqDataPktHdr) + serverDataLen;
DbgTrace(1, "SChannel::sendReplyData- Start, Obj = %08X\n", this);
DbgTrace(1, "SChannel::sendReplyData- Start, Obj = %0X\n", this);
// Acquire exclusive access to the channel object
pthread_mutex_lock(&m_mutex);
@ -634,18 +634,18 @@ SChannel::sendReplyData(
}
else
{
DbgTrace(0, "SChannel::sendReplyData- Error building Req Data Pkt Header, Obj = %08X\n", this);
DbgTrace(0, "SChannel::sendReplyData- Error building Req Data Pkt Header, Obj = %0X\n", this);
}
}
else
{
DbgTrace(1, "SChannel::sendReplyData- Channel not connected, state = %08X\n", m_state);
DbgTrace(1, "SChannel::sendReplyData- Channel not connected, state = %0X\n", m_state);
}
// Release exclusive access to the channel object
pthread_mutex_unlock(&m_mutex);
DbgTrace(1, "SChannel::sendReplyData- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "SChannel::sendReplyData- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -678,7 +678,7 @@ SChannel::sendReplyError(
unsigned long totalBytesSent = 0;
unsigned long bytesToSend = sizeof(reqErrorPktHdr);
DbgTrace(1, "SChannel::sendReplyError- Start, Obj = %08X\n", this);
DbgTrace(1, "SChannel::sendReplyError- Start, Obj = %0X\n", this);
// Acquire exclusive access to the channel object
pthread_mutex_lock(&m_mutex);
@ -752,18 +752,18 @@ SChannel::sendReplyError(
}
else
{
DbgTrace(0, "SChannel::sendReplyError- Error building Req Data Pkt Header, Obj = %08X\n", this);
DbgTrace(0, "SChannel::sendReplyError- Error building Req Data Pkt Header, Obj = %0X\n", this);
}
}
else
{
DbgTrace(1, "SChannel::sendReplyError- Channel not connected, state = %08X\n", m_state);
DbgTrace(1, "SChannel::sendReplyError- Channel not connected, state = %0X\n", m_state);
}
// Release exclusive access to the channel object
pthread_mutex_unlock(&m_mutex);
DbgTrace(1, "SChannel::sendReplyError- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "SChannel::sendReplyError- End, retStatus = %0X\n", retStatus);
return retStatus;

View File

@ -178,7 +178,7 @@ ServiceRequest(
// Release server mutex
pthread_mutex_unlock(&serverMutex);
DbgTrace(1, "ServiceRequest- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "ServiceRequest- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -284,7 +284,7 @@ RemoveFromSChannelList(
list<SChannel*>::iterator iter;
bool objectRemoved = false;
DbgTrace(1, "RemoveFromSChannelList- Start, Obj = %08X\n", pSChannel);
DbgTrace(1, "RemoveFromSChannelList- Start, Obj = %0X\n", pSChannel);
// Obtain server mutex
pthread_mutex_lock(&serverMutex);
@ -802,7 +802,7 @@ IpcServerGetRequest(void)
exit:
DbgTrace(1, "IpcServerGetRequest- End, requestId = %08X\n", requestId);
DbgTrace(1, "IpcServerGetRequest- End, requestId = %0X\n", requestId);
return requestId;
@ -839,7 +839,7 @@ IpcServerGetRequestData(
{
int32_t reqDataLen = 0;
DbgTrace(1, "IpcServerGetRequestData- Start, requestId = %08X\n", requestId);
DbgTrace(1, "IpcServerGetRequestData- Start, requestId = %0X\n", requestId);
// Make sure that the service has been started
if (svcStarted)
@ -873,7 +873,7 @@ IpcServerGetRequestData(
DbgTrace(0, "IpcServerGetRequestData- Service has not been started\n", 0);
}
DbgTrace(1, "IpcServerGetRequestData- End, reqDataLen = %08X\n", reqDataLen);
DbgTrace(1, "IpcServerGetRequestData- End, reqDataLen = %0X\n", reqDataLen);
return reqDataLen;
@ -903,7 +903,7 @@ IpcServerCompleteRequest(
// L2
//=======================================================================--
{
DbgTrace(1, "IpcServerCompleteRequest- Start, requestId = %08X\n", requestId);
DbgTrace(1, "IpcServerCompleteRequest- Start, requestId = %0X\n", requestId);
// Make sure that the service has been started
if (svcStarted)
@ -965,7 +965,7 @@ IpcServerAbortRequest(
// L2
//=======================================================================--
{
DbgTrace(1, "IpcServerAbortRequest- Start, requestId = %08X\n", requestId);
DbgTrace(1, "IpcServerAbortRequest- Start, requestId = %0X\n", requestId);
// Make sure that the service has been started
if (svcStarted)
@ -1047,7 +1047,7 @@ IpcServerStart(void)
(void*)NULL);
if (threadCreateStatus != 0)
{
DbgTrace(0, "IpcServerStart- Unable to create service connections thread, error = %08X\n", threadCreateStatus);
DbgTrace(0, "IpcServerStart- Unable to create service connections thread, error = %0X\n", threadCreateStatus);
retStatus = -1;
}
else
@ -1063,7 +1063,7 @@ IpcServerStart(void)
DbgTrace(0, "IpcServerStart- Either not initialized or the address has not been set\n", 0);
}
DbgTrace(1, "IpcServerStart- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "IpcServerStart- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -1133,7 +1133,7 @@ IpcServerSetUnAddress(
exit:
DbgTrace(1, "IpcServerSetUnAddress- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "IpcServerSetUnAddress- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -1201,7 +1201,7 @@ IpcServerSetInAddress(
exit:
DbgTrace(1, "IpcServerSetInAddress- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "IpcServerSetInAddress- End, retStatus = %0X\n", retStatus);
return retStatus;
@ -1278,7 +1278,7 @@ IpcServerInit(
exit:
DbgTrace(1, "IpcServerInit- End, retStatus = %08X\n", retStatus);
DbgTrace(1, "IpcServerInit- End, retStatus = %0X\n", retStatus);
return retStatus;

View File

@ -79,7 +79,7 @@ ServerReq::ServerReq(
// L2
//=======================================================================--
{
DbgTrace(1, "ServerReq::ServerReq- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerReq::ServerReq- Start, Obj = %0X\n", this);
// Create a SmartSChannel object to keep the SChannel object from
// going away while we process the request.
@ -107,7 +107,7 @@ ServerReq::~ServerReq(void)
// L2
//=======================================================================--
{
DbgTrace(1, "ServerReq::~ServerReq- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerReq::~ServerReq- Start, Obj = %0X\n", this);
// Free any client data that may be hanging around
if (m_pClientData)
@ -140,7 +140,7 @@ ServerReq::getReqData(
// L2
//=======================================================================--
{
DbgTrace(1, "ServerReq::getReqData- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerReq::getReqData- Start, Obj = %0X\n", this);
#if DEBUG
assert(m_signature == SERVER_REQ_SIGNATURE);
@ -149,7 +149,7 @@ ServerReq::getReqData(
// Return pointer to the client data
*ppClientData = m_pClientData;
DbgTrace(1, "ServerReq::getReqData- End, reqDataLen = %08X\n", m_clientDataLength);
DbgTrace(1, "ServerReq::getReqData- End, reqDataLen = %0X\n", m_clientDataLength);
return m_clientDataLength;
}
@ -173,7 +173,7 @@ ServerReq::complete(
{
SChannel *pSChannel = *m_pSmartSChannel;
DbgTrace(1, "ServerReq::complete- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerReq::complete- Start, Obj = %0X\n", this);
#if DEBUG
assert(m_signature == SERVER_REQ_SIGNATURE);
@ -206,7 +206,7 @@ ServerReq::abort(void)
{
SChannel *pSChannel = *m_pSmartSChannel;
DbgTrace(1, "ServerReq::abort- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerReq::abort- Start, Obj = %0X\n", this);
#if DEBUG
assert(m_signature == SERVER_REQ_SIGNATURE);

View File

@ -71,7 +71,7 @@ ServerThread::ServerThread(void) :
// L2
//=======================================================================--
{
DbgTrace(1, "ServerThread::ServerThread- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerThread::ServerThread- Start, Obj = %0X\n", this);
// Initialize the condition
if (pthread_cond_init(&m_condition, NULL) != 0)
@ -104,7 +104,7 @@ ServerThread::~ServerThread(void)
// L2
//=======================================================================--
{
DbgTrace(1, "ServerThread::~ServerThread- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerThread::~ServerThread- Start, Obj = %0X\n", this);
// Cleanup resources allocated for the object
pthread_cond_destroy(&m_condition);
@ -132,7 +132,7 @@ ServerThread::awaken(void)
// L2
//=======================================================================--
{
DbgTrace(1, "ServerThread::awaken- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerThread::awaken- Start, Obj = %0X\n", this);
#if DEBUG
assert(m_signature == SERVER_THREAD_SIGNATURE);
@ -162,7 +162,7 @@ ServerThread::suspend(
// L2
//=======================================================================--
{
DbgTrace(1, "ServerThread::suspend- Start, Obj = %08X\n", this);
DbgTrace(1, "ServerThread::suspend- Start, Obj = %0X\n", this);
#if DEBUG
assert(m_signature == SERVER_THREAD_SIGNATURE);