Commit 5984e508 authored by George Nash's avatar George Nash Committed by Rick Bell

Removed the echoResponce function

The echoResponce function is not actually returning
the data that is expected by the mpm_client resulting
in the client generating a large number of unexpected
pluginReconnect calls.

May have to manually removed the reconnect.db if it
is already making multiple reconnect requests.

Change-Id: Ieb20609e7fdbe64585acd9ade654d3b58ac078e1
Signed-off-by: George Nash's avatarGeorge Nash <george.nash@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/18493Reviewed-by: Larry Sachs's avatarLarry Sachs <larry.j.sachs@intel.com>
Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarRick Bell <richard.s.bell@intel.com>
parent 32e5429b
......@@ -97,12 +97,6 @@ extern "C" DLL_PUBLIC MPMResult pluginStart(MPMPluginCtx *ctx)
return MPM_RESULT_OK;
}
void echoResponse(MPMPipeMessage *message, std::string type)
{
std::string s = type + " response echo";
MPMSendResponse(s.c_str(), s.size(), message->msgType);
}
extern "C" DLL_PUBLIC MPMResult pluginScan(MPMPluginCtx *, MPMPipeMessage *message)
{
printf("***********************************************\n");
......@@ -111,7 +105,6 @@ extern "C" DLL_PUBLIC MPMResult pluginScan(MPMPluginCtx *, MPMPipeMessage *messa
OIC_LOG(INFO, TAG, "Scan called!");
// Send back scan response to the client.
s_upnpConnector->onScan();
echoResponse(message, "SCAN");
return MPM_RESULT_OK;
}
......@@ -132,7 +125,6 @@ extern "C" DLL_PUBLIC MPMResult pluginAdd(MPMPluginCtx *, MPMPipeMessage *messag
s_upnpConnector->onAdd(uri);
echoResponse(message, "ADD");
return MPM_RESULT_OK;
}
......@@ -142,7 +134,7 @@ extern "C" DLL_PUBLIC MPMResult pluginRemove(MPMPluginCtx *, MPMPipeMessage *mes
printf("UPNP pluginRemove\n");
printf("***********************************************\n");
OIC_LOG(INFO, TAG, "Remove called! Remove iotivity resources here based on what the client says");
echoResponse(message, "REMOVE");
// Currently nothing needs to be done beyond what's already done in pluginStop
return MPM_RESULT_OK;
}
......@@ -151,9 +143,9 @@ extern "C" DLL_PUBLIC MPMResult pluginReconnect(MPMPluginCtx *, MPMPipeMessage *
printf("***********************************************\n");
printf("UPNP pluginReconnect\n");
printf("***********************************************\n");
OIC_LOG(INFO, TAG,
"Reconnect called! Reconnect to devices, create resources from the message/cloud/db/file.");
echoResponse(message, "ADD");
OIC_LOG(INFO, TAG, "Reconnect called! Reconnect to devices, create "
"resources from the message/cloud/db/file.");
// TODO implement the pluginReconnect function
return MPM_RESULT_OK;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment