Uncommented debugging

This commit is contained in:
MarkRivers
2003-09-02 05:11:18 +00:00
parent c16848290a
commit 637f7d1bc4
+16 -26
View File
@@ -363,16 +363,12 @@ STATIC RTN_STATUS send_mess(int card, const char *com, char c)
p = strtok_r(NULL, ";", &tok_save)) {
strcpy(buff, p);
strcat(buff, OUTPUT_TERMINATOR);
/*
Debug(2, "%.2f : send_mess: sending message to card %d, message=%s\n",
tickGet()/60., card, buff);
*/
Debug(2, "send_mess: sending message to card %d, message=%s\n",
card, buff);
cntrl->serialInfo->serialIOSendRecv(buff, strlen(buff), response,
BUFF_SIZE, INPUT_TERMINATOR, SERIAL_TIMEOUT);
/*
Debug(2, "%.2f : send_mess: card %d, response=%s\n",
tickGet()/60., card, response);
*/
Debug(2, "send_mess: card %d, response=%s\n",
card, response);
}
return(OK);
@@ -414,21 +410,19 @@ STATIC int recv_mess(int card, char *com, int flag)
/* The response from the PM304 is terminated with CR/LF. Remove these */
if (len < 2) com[0] = '\0'; else com[len-2] = '\0';
/*
if (len > 0) {
Debug(2, "%.2f : recv_mess: card %d, flag=%d, message = \"%s\"\n",
tickGet()/60., card, flag, com);
Debug(2, "recv_mess: card %d, flag=%d, message = \"%s\"\n",
card, flag, com);
}
if (len == 0) {
if (flag != FLUSH) {
Debug(1, "%.2f: recv_mess: card %d read ERROR: no response\n",
tickGet()/60., card);
Debug(1, "recv_mess: card %d read ERROR: no response\n",
card);
} else {
Debug(3, "%.2f: recv_mess: card %d flush returned no characters\n",
tickGet()/60., card);
Debug(3, "recv_mess: card %d flush returned no characters\n",
card);
}
}
*/
/* The PM600 always echoes the command sent to it, before sending the response. It is terminated
with a carriage return. So we need to delete all characters up to and including the first
carriage return */
@@ -482,26 +476,22 @@ STATIC int send_recv_mess(int card, const char *out, char *response)
p = strtok_r(NULL, ";", &tok_save)) {
strcpy(buff, p);
strcat(buff, OUTPUT_TERMINATOR);
/*
Debug(2, "%.2f : send_recv_mess: sending message to card %d, message=%s\n",
tickGet()/60., card, buff);
*/
Debug(2, "send_recv_mess: sending message to card %d, message=%s\n",
card, buff);
len = cntrl->serialInfo->serialIOSendRecv(buff, strlen(buff),
response, BUFF_SIZE, INPUT_TERMINATOR, SERIAL_TIMEOUT);
}
/* The response from the PM304 is terminated with CR/LF. Remove these */
if (len < 2) response[0] = '\0'; else response[len-2] = '\0';
/*
if (len > 0) {
Debug(2, "%.2f : send_recv_mess: card %d, response = \"%s\"\n",
tickGet()/60., card, response);
Debug(2, "send_recv_mess: card %d, response = \"%s\"\n",
card, response);
}
if (len == 0) {
Debug(1, "%.2f: send_recv_mess: card %d ERROR: no response\n",
tickGet()/60., card);
Debug(1, "send_recv_mess: card %d ERROR: no response\n",
card);
}
*/
/* The PM600 always echoes the command sent to it, before sending the response. It is terminated
with a carriage return. So we need to delete all characters up to and including the first
carriage return */