replace : iotivity -> iotivity-sec
[platform/upstream/iotivity.git] / resource / csdk / routing / src / routingmanager.c
index 2292fda..9f87d2f 100644 (file)
@@ -46,7 +46,7 @@
 /**
  * Unique gateway ID generated before hosting a gateway resource.
  */
-uint32_t g_GatewayID = 0;
+static uint32_t g_GatewayID = 0;
 
 /**
  * Used for assigning unique ID.to endpoint's connected to this gateway
@@ -1171,6 +1171,7 @@ rewriteandexit:
             if(isRequest)
             {
                 CARequestInfo_t *msg = message;
+                msg->info.dataType = CA_REQUEST_DATA;
                 CAResult_t caRes = CASendRequest(&nextHop, msg);
                 if (CA_STATUS_OK != caRes)
                 {
@@ -1190,6 +1191,7 @@ rewriteandexit:
             else
             {
                 CAResponseInfo_t *msg = message;
+                msg->info.dataType = CA_RESPONSE_DATA;
                 CAResult_t caRes = CASendResponse(&nextHop, msg);
                 if (CA_STATUS_OK != caRes)
                 {
@@ -1242,7 +1244,7 @@ OCStackResult RMHandleRequest(CARequestInfo_t *message, const CAEndpoint_t *send
 {
     if (!g_isRMInitialized)
     {
-        OIC_LOG(ERROR, TAG, "RM not initialized");
+        OIC_LOG(INFO, TAG, "RM not initialized");
         *selfDestination = true;
         return OC_STACK_OK;
     }
@@ -1255,7 +1257,7 @@ OCStackResult RMHandleResponse(CAResponseInfo_t *message, const CAEndpoint_t *se
 {
     if (!g_isRMInitialized)
     {
-        OIC_LOG(ERROR, TAG, "RM not initialized");
+        OIC_LOG(INFO, TAG, "RM not initialized");
         *selfDestination = true;
         return OC_STACK_OK;
     }