Signed-off-by: segwon <segwon.han@samsung.com>
Change-Id: Ib26a8c5d0ca744bcbd30bff0469975f723d54b94
#include <pthread.h>
#include "Service.h"
+#define FRONT_PROTOCOL_SIZE 7 // coap://
+
using namespace std;
std::string conv::util::getBtMacAddress()
if (hostAddress.empty())
return "";
- std::string::size_type pos = hostAddress.find(":", 0);
-
- std::string sub = hostAddress.substr(0, pos);
+ std::string::size_type pos = hostAddress.find(":", FRONT_PROTOCOL_SIZE);
+ std::string sub = hostAddress.substr(FRONT_PROTOCOL_SIZE, pos - FRONT_PROTOCOL_SIZE);
return sub;
}