|
Lines 80-86
Link Here
|
| 80 |
|
80 |
|
| 81 |
if(!process) |
81 |
if(!process) |
| 82 |
{ |
82 |
{ |
| 83 |
TPTP_LOG_WARNING_MSG1( stateData, "Could not find process %d. The model may be missing information", command->info.agent_active.processId); |
83 |
TPTP_LOG_WARNING_MSG1( stateData, "Could not find process %d. The model may be missing information", (int) command->info.agent_active.processId); |
| 84 |
return FALSE; |
84 |
return FALSE; |
| 85 |
} |
85 |
} |
| 86 |
|
86 |
|
|
Lines 114-120
Link Here
|
| 114 |
while ( current != NULL ) |
114 |
while ( current != NULL ) |
| 115 |
{ |
115 |
{ |
| 116 |
ra_command_t *command=current->command; |
116 |
ra_command_t *command=current->command; |
| 117 |
TPTP_LOG_DEBUG_MSG1( stateData, "Processing command: tag=%d", command->tag); |
117 |
TPTP_LOG_DEBUG_MSG1( stateData, "Processing command: tag=%d", (int) command->tag); |
| 118 |
switch(command->tag) |
118 |
switch(command->tag) |
| 119 |
{ |
119 |
{ |
| 120 |
case RA_CUSTOM_COMMAND: |
120 |
case RA_CUSTOM_COMMAND: |
|
Lines 130-136
Link Here
|
| 130 |
processExternalErrorMessage(stateData, command, agent); |
130 |
processExternalErrorMessage(stateData, command, agent); |
| 131 |
break; |
131 |
break; |
| 132 |
default: |
132 |
default: |
| 133 |
TPTP_LOG_WARNING_MSG1( stateData, "Received unexpected commmand from agent: tag=%d", command->tag); |
133 |
TPTP_LOG_WARNING_MSG1( stateData, "Received unexpected commmand from agent: tag=%d", (int) command->tag); |
| 134 |
break; |
134 |
break; |
| 135 |
} |
135 |
} |
| 136 |
current=current->next; |
136 |
current=current->next; |
|
Lines 151-157
Link Here
|
| 151 |
ra_addCommandToMessage(forwardMessage, command); |
151 |
ra_addCommandToMessage(forwardMessage, command); |
| 152 |
|
152 |
|
| 153 |
/* 187443 end */ |
153 |
/* 187443 end */ |
| 154 |
TPTP_LOG_DEBUG_MSG1( stateData, "Forwarding command to client: tag=%d", command->tag); |
154 |
TPTP_LOG_DEBUG_MSG1( stateData, "Forwarding command to client: tag=%d", (int) command->tag); |
| 155 |
|
155 |
|
| 156 |
/* Convert this command into a format the client will recognize */ |
156 |
/* Convert this command into a format the client will recognize */ |
| 157 |
if ( 0 != convertCommandToXML( stateData, agent->agentID, agent->client->clientID, command, &buffer ) ) |
157 |
if ( 0 != convertCommandToXML( stateData, agent->agentID, agent->client->clientID, command, &buffer ) ) |
|
Lines 174-180
Link Here
|
| 174 |
} |
174 |
} |
| 175 |
else |
175 |
else |
| 176 |
{ |
176 |
{ |
| 177 |
TPTP_LOG_WARNING_MSG1( stateData, "Agent with no attached client attempted to send custom command: tag=%d", command->tag); |
177 |
TPTP_LOG_WARNING_MSG1( stateData, "Agent with no attached client attempted to send custom command: tag=%d", (int) command->tag); |
| 178 |
} |
178 |
} |
| 179 |
} |
179 |
} |
| 180 |
|
180 |
|
|
Lines 197-203
Link Here
|
| 197 |
#else |
197 |
#else |
| 198 |
TPTP_LOG_MSG4( stateData, command->info.error_string.severity, "EXTERNAL: %s:%d MESSAGE_ID=%s MESSAGE= %s" |
198 |
TPTP_LOG_MSG4( stateData, command->info.error_string.severity, "EXTERNAL: %s:%d MESSAGE_ID=%s MESSAGE= %s" |
| 199 |
, command->info.error_string.agent.data |
199 |
, command->info.error_string.agent.data |
| 200 |
, command->info.error_string.processId |
200 |
, (int) command->info.error_string.processId |
| 201 |
, command->info.error_string.messageId.data |
201 |
, command->info.error_string.messageId.data |
| 202 |
, command->info.error_string.message.data); |
202 |
, command->info.error_string.message.data); |
| 203 |
#endif |
203 |
#endif |
|
Lines 278-284
Link Here
|
| 278 |
|
278 |
|
| 279 |
message = ra_readMessageFromBuffer( pBuffer, (unsigned long)bytesRead ); |
279 |
message = ra_readMessageFromBuffer( pBuffer, (unsigned long)bytesRead ); |
| 280 |
|
280 |
|
| 281 |
TPTP_LOG_DEBUG_MSG1( stateData, "Processing message of length %d bytes.", message->length ); |
281 |
TPTP_LOG_DEBUG_MSG1( stateData, "Processing message of length %d bytes.", (int) message->length ); |
| 282 |
|
282 |
|
| 283 |
/* Most messages use an agent pointer, so we'll protect the list while we're processing */ |
283 |
/* Most messages use an agent pointer, so we'll protect the list while we're processing */ |
| 284 |
ra_mutexEnter( &actlData->processList->lock ); |
284 |
ra_mutexEnter( &actlData->processList->lock ); |
|
Lines 345-351
Link Here
|
| 345 |
buffer = (unsigned char*)tptp_malloc( TPTP_DEFAULT_BUFFER_LENGTH+1 ); |
345 |
buffer = (unsigned char*)tptp_malloc( TPTP_DEFAULT_BUFFER_LENGTH+1 ); |
| 346 |
if ( buffer == NULL ) |
346 |
if ( buffer == NULL ) |
| 347 |
{ |
347 |
{ |
| 348 |
return TPTP_SYS_NO_MEM; |
348 |
return 0; |
| 349 |
} |
349 |
} |
| 350 |
|
350 |
|
| 351 |
/* initial status before the thread is running */ |
351 |
/* initial status before the thread is running */ |
|
Lines 425-431
Link Here
|
| 425 |
|
425 |
|
| 426 |
cleanPipeUp(pPipe); |
426 |
cleanPipeUp(pPipe); |
| 427 |
|
427 |
|
| 428 |
return ( rc ); |
428 |
return 0; |
| 429 |
} |
429 |
} |
| 430 |
|
430 |
|
| 431 |
|
431 |
|