Move "SENT ENCRYPTED" Log2 message

Added message to sendEncrypted function, instesd of having is repeated everywhere.
This commit is contained in:
Gregg 2020-08-01 08:38:44 -05:00
parent 0a07f9666d
commit 4e4108fe1c
1 changed files with 6 additions and 12 deletions

View File

@ -801,8 +801,6 @@ int HAPClient::getAccessoriesURL(){
sendEncrypted(body,(uint8_t *)jBuf.buf,nBytes); sendEncrypted(body,(uint8_t *)jBuf.buf,nBytes);
LOG2("-------- SENT ENCRYPTED! --------\n");
return(1); return(1);
} // getAccessories } // getAccessories
@ -1021,8 +1019,6 @@ int HAPClient::getCharacteristicsURL(char *urlBuf){
sendEncrypted(body,(uint8_t *)jsonBuf,nBytes); // note recasting of jsonBuf into uint8_t* sendEncrypted(body,(uint8_t *)jsonBuf,nBytes); // note recasting of jsonBuf into uint8_t*
LOG2("-------- SENT ENCRYPTED! --------\n");
return(1); return(1);
} }
@ -1065,8 +1061,6 @@ int HAPClient::putCharacteristicsURL(char *json){
sendEncrypted(body,NULL,0); sendEncrypted(body,NULL,0);
LOG2("-------- SENT ENCRYPTED! --------\n");
} else { // multicast respose is required } else { // multicast respose is required
int nBytes=homeSpan.sprintfAttributes(pObj,n,NULL); // get JSON response - includes terminating null (will be recast to uint8_t* below) int nBytes=homeSpan.sprintfAttributes(pObj,n,NULL); // get JSON response - includes terminating null (will be recast to uint8_t* below)
@ -1086,7 +1080,6 @@ int HAPClient::putCharacteristicsURL(char *json){
sendEncrypted(body,(uint8_t *)jsonBuf,nBytes); // note recasting of jsonBuf into uint8_t* sendEncrypted(body,(uint8_t *)jsonBuf,nBytes); // note recasting of jsonBuf into uint8_t*
LOG2("-------- SENT ENCRYPTED! --------\n");
} }
// Create and send Event Notifications if needed // Create and send Event Notifications if needed
@ -1225,7 +1218,6 @@ void HAPClient::tlvRespond(){
LOG2("------------ SENT! --------------\n"); LOG2("------------ SENT! --------------\n");
} else { } else {
sendEncrypted(body,tlvData,nBytes); sendEncrypted(body,tlvData,nBytes);
LOG2("-------- SENT ENCRYPTED! --------\n");
} }
} // tlvRespond } // tlvRespond
@ -1306,6 +1298,8 @@ void HAPClient::sendEncrypted(char *body, uint8_t *dataBuf, int dataLen){
client.write(httpBuf,count); // transmit all encrypted frames to Client client.write(httpBuf,count); // transmit all encrypted frames to Client
LOG2("-------- SENT ENCRYPTED! --------\n");
} // sendEncrypted } // sendEncrypted
///////////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////////