/**
- * @brief Registers the local message port.
+ * @brief Registers the local message port. @n
+ * If the message port name is already registered, the previous message port id returns and the callback function is changed.
*
* @param [in] local_port the name of the local message port
* @param [in] callback The callback function to be called when a message is received
/**
* @brief Registers the trusted local message port. @n
- * This allows communications only if the applications are signed with the same certificate which is uniquely assigned to the developer.
+ * If the message port name is already registered, the previous message port id returns and the callback function is changed. @n
+ * This allows communications only if the applications are signed with the same certificate which is uniquely assigned to the developer.
*
* @param [in] local_port the name of the local message port
* @param [in] callback The callback function to be called when a message is received
}
else
{
+ _LOGD("MessagePort name is already registered.");
for (map<int, string>::iterator it = __ids.begin(); it != __ids.end(); ++it)
{
if (localPort.compare(it->second) == 0)
}
else
{
- for (map<int, string>::iterator it = __ids.begin(); it != __trustedIds.end(); ++it)
+ _LOGD("MessagePort name is already registered.");
+ for (map<int, string>::iterator it = __trustedIds.begin(); it != __trustedIds.end(); ++it)
{
if (localPort.compare(it->second) == 0)
{