refactored client interface (client ot receiveR)

This commit is contained in:
2018-10-10 18:09:14 +02:00
parent e1d570e8ce
commit f69e9d0df4
4 changed files with 151 additions and 318 deletions

View File

@ -501,11 +501,8 @@ int slsReceiverTCPIPInterface::get_last_client_ip() {
if (mySock->differentClients)
ret = FORCE_UPDATE;
// send answer
mySock->SendDataOnly(&ret,sizeof(ret));
mySock->SendDataOnly(mySock->lastClientIP,sizeof(mySock->lastClientIP));
clientInterface->Server_SendResult(ret,mySock->lastClientIP, INET_ADDRSTRLEN);
// return ok/fail
return ret;
}
@ -741,21 +738,13 @@ int slsReceiverTCPIPInterface::send_update() {
int slsReceiverTCPIPInterface::get_id(){
ret = OK;
int64_t retval=-1;
// execute action
#ifdef SLS_RECEIVER_UDP_FUNCTIONS
retval = getReceiverVersion();
#endif
int64_t retval = getReceiverVersion();
if(mySock->differentClients)
ret = FORCE_UPDATE;
// send answer
mySock->SendDataOnly(&ret,sizeof(ret));
mySock->SendDataOnly(&retval,sizeof(retval));
clientInterface->Server_SendResult(ret, &retval, sizeof(retval));
// return ok/fail
return ret;
}