Fixed upsets in C Stack that caused breakage in the Arduino Build.
authorJoseph Morrow <joseph.l.morrow@intel.com>
Wed, 1 Oct 2014 21:56:01 +0000 (17:56 -0400)
committerJoseph Morrow <joseph.l.morrow@intel.com>
Wed, 1 Oct 2014 21:56:01 +0000 (17:56 -0400)
Change-Id: I6462963404db66d9c8af7543269d02d5591c718c

csdk/stack/include/ocstack.h
csdk/stack/src/ocstack.c

index 2b87e0b..f13de27 100644 (file)
@@ -116,7 +116,7 @@ typedef enum {
  */
 typedef enum {
     OC_INVALID_ID   = (1 << 0),
-    OC_COAP_ID      = (1 << 1),
+    OC_COAP_ID      = (1 << 1)
 } OCTransportProtocolID;
 
 /**
index 279c46c..53b10a1 100644 (file)
@@ -388,6 +388,8 @@ OCStackResult OCDoResource(OCDoHandle *handle, OCMethod method, const char *requ
     TODO ("Need to form the final query by concatenating require and reference URI's");
     VERIFY_NON_NULL(requiredUri, FATAL, OC_STACK_INVALID_URI);
 
+    uint16_t uriLen = strlen(requiredUri);
+
     switch (method)
     {
         case OC_REST_GET:
@@ -406,8 +408,6 @@ OCStackResult OCDoResource(OCDoHandle *handle, OCMethod method, const char *requ
             goto exit;
     }
 
-    uint16_t uriLen = strlen(requiredUri);
-
     if((result = verifyUriQueryLength(requiredUri, uriLen)) != OC_STACK_OK)
     {
         goto exit;