d2d-conv-manager: coding rule ( msf_tizen_client/src/* ) 90/97890/1
authorHongkuk, Son <hongkuk.son@samsung.com>
Tue, 15 Nov 2016 08:29:26 +0000 (17:29 +0900)
committerHongkuk Son <hongkuk.son@samsung.com>
Tue, 15 Nov 2016 08:31:21 +0000 (00:31 -0800)
Signed-off-by: Hongkuk, Son <hongkuk.son@samsung.com>
Change-Id: I480a827ee56fd5ae1b7567d4f91aac30e715f71f

msf_tizen_client/src/MSFDSearchProvider.cpp
msf_tizen_client/src/SearchProvider.cpp [changed mode: 0644->0755]
msf_tizen_client/src/Service.cpp
msf_tizen_client/src/mDNSSearchProvider.cpp [changed mode: 0644->0755]

index d6b822a..f7e16d4 100755 (executable)
@@ -223,10 +223,10 @@ void MSFDSearchProvider::sendDiscovery(void* data)
        socklen_t len = sizeof(dest);
 
        /* set up destination address */
-       memset(&dest,0,sizeof(dest));
-       dest.sin_family=AF_INET;
-       dest.sin_addr.s_addr=inet_addr(MULTICAST_GROUP);
-       dest.sin_port=htons(MULTICAST_PORT);
+       memset(&dest, 0, sizeof(dest));
+       dest.sin_family = AF_INET;
+       dest.sin_addr.s_addr = inet_addr(MULTICAST_GROUP);
+       dest.sin_port = htons(MULTICAST_PORT);
 
        string discovery = "{\"type\":\"discover\"}";
 
@@ -260,7 +260,7 @@ void MSFDSearchProvider::processReceivedMsg(char *buf, int buflen)
        }
 
        Channel::get_ip_port_from_uri(url, &ip, &port);
-       map<string,ttl_info>::iterator itr = aliveMap.find(ip);
+       map<string, ttl_info>::iterator itr = aliveMap.find(ip);
 
        if (state == TYPE_DISCOVER) {
                return;
old mode 100644 (file)
new mode 100755 (executable)
index 7de3810..9d8f3a7
@@ -163,25 +163,25 @@ void SearchProvider::updateAlive(long ttl, string id, int service_type)
 
        if (aliveMap.find(id) == aliveMap.end()) {
        } else {
-               long _ttl=time(0) + ttl;
+               long _ttl = time(0) + ttl;
 
                ttl_info info = aliveMap[id];
 
                info.update_ttl(_ttl, service_type);
-               aliveMap[id]=info;
+               aliveMap[id] = info;
        }
 }
 
 void SearchProvider::reapServices()
 {
-       map<string,ttl_info>::iterator it;
-       it=aliveMap.begin();
-       while(it!=aliveMap.end()) {
-               ttl_info info=it->second;
+       map<string, ttl_info>::iterator it;
+       it = aliveMap.begin();
+       while (it != aliveMap.end()) {
+               ttl_info info = it->second;
                if ( info.is_expired()) {
-                       map<string,ttl_info>::iterator toEraseIter = it;
+                       map<string, ttl_info>::iterator toEraseIter = it;
                        ++it;
-                       Service service=getServiceByIp(toEraseIter->first);
+                       Service service = getServiceByIp(toEraseIter->first);
                        MSF_DBG("reapServices - Remove service : [%s]", service.getId().c_str());
                        aliveMap.erase(toEraseIter->first);
                        Search::removeServiceAndNotify(service);
index 8291b20..f2a6405 100755 (executable)
@@ -351,7 +351,7 @@ int Service::json_parse_service(const char *in, void *ptr)
        }
 
        Service retService = create(serviceval);
-       if ( !dev.getmodel().empty() && atoi(dev.getmodel().substr(0,2).c_str()) >= 16 ) {
+       if (!dev.getmodel().empty() && atoi(dev.getmodel().substr(0, 2).c_str()) >= 16) {
                MSF_DBG("Secure connection support is true");
                retService.SecureConnectionSupport = true;
        }
old mode 100644 (file)
new mode 100755 (executable)
index c522b87..edf5ff6
@@ -135,7 +135,7 @@ void extract_service_info(ServiceInfo &info, string text)
 
 static void dnssd_browse_reply(dnssd_service_state_e service_state, dnssd_service_h remote_service, void *user_data)
 {
-       MSF_DBG("[MSF : API] Debug log Function : [%s] and line [%d] in file [%s]. State : [%d][%d]",__FUNCTION__ ,__LINE__,__FILE__, service_state, DNSSD_SERVICE_STATE_UNAVAILABLE);
+       MSF_DBG("[MSF : API] Debug log Function : [%s] and line [%d] in file [%s]. State : [%d][%d]", __FUNCTION__, __LINE__, __FILE__, service_state, DNSSD_SERVICE_STATE_UNAVAILABLE);
        mDNSSearchProvider* provider = (mDNSSearchProvider*)user_data;
        int rv = 0;
        MSF_DBG("Handler       : %u", remote_service);
@@ -290,7 +290,7 @@ void mDNSSearchProvider::reapServices()
 
 void MDNSServiceCallback::onSuccess(Service service)
 {
-       MSF_DBG("\n [MSF : API] Debug log Function : [%s] and line [%d] in file [%s] \n",__FUNCTION__ ,__LINE__,__FILE__);
+       MSF_DBG("\n [MSF : API] Debug log Function : [%s] and line [%d] in file [%s] \n", __FUNCTION__, __LINE__, __FILE__);
        Search::addService(service);
        string ip = provider->getIP(service.getUri());
        provider->push_in_alivemap(0x00ffffff, ip, MDNS);
@@ -299,6 +299,6 @@ void MDNSServiceCallback::onSuccess(Service service)
 
 void MDNSServiceCallback::onError(Error)
 {
-       MSF_DBG("\n [MSF : API] Debug log Function : [%s] and line [%d] in file [%s] \n",__FUNCTION__ ,__LINE__,__FILE__);
+       MSF_DBG("\n [MSF : API] Debug log Function : [%s] and line [%d] in file [%s] \n", __FUNCTION__, __LINE__, __FILE__);
 }