Tracking OTM state on client side
[platform/upstream/iotivity.git] / resource / src / OCUtilities.cpp
index 93d61b3..a2dd893 100644 (file)
 //
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-#include <OCApi.h>
-#include <OCUtilities.h>
+#include "OCApi.h"
+
+#include "OCUtilities.h"
 
 #include <boost/algorithm/string.hpp>
+
 #include <sstream>
 #include <iterator>
 #include <algorithm>
@@ -35,8 +37,7 @@ OC::Utilities::QueryParamsKeyVal OC::Utilities::getQueryParams(const std::string
     }
 
     std::vector<std::string> queryparams;
-    boost::split(queryparams, uri, [](const char c){return c=='&';},
-            boost::token_compress_on);
+    boost::split(queryparams, uri, boost::is_any_of(OC_QUERY_SEPARATOR), boost::token_compress_on);
 
     for(std::string& it: queryparams)
     {
@@ -51,9 +52,8 @@ OC::Utilities::QueryParamsKeyVal OC::Utilities::getQueryParams(const std::string
             qp[it.substr(0, index)] = it.substr(index + 1);
         }
     }
-
-    return qp;
-}
+        return qp;
+    }
 
 namespace OC {
 
@@ -94,7 +94,6 @@ OCStackResult result_guard(const OCStackResult r)
     case OC_STACK_PRESENCE_TIMEOUT:
     case OC_STACK_PRESENCE_DO_NOT_HANDLE:
 #endif
-
     break;
  }
 
@@ -102,3 +101,4 @@ OCStackResult result_guard(const OCStackResult r)
 }
 
 } // namespace OC
+