Fix Windows build breaks
authorDan Mihai <Daniel.Mihai@microsoft.com>
Sat, 20 May 2017 14:06:14 +0000 (07:06 -0700)
committerNathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
Sat, 20 May 2017 21:07:49 +0000 (21:07 +0000)
New build breaks introduced by a79fe554f66c1332d1f1b55743d6d4705d2a7c7f

Change-Id: I85d96c44ad0d6e1faca620837c4be0172db44499
Signed-off-by: Dan Mihai <Daniel.Mihai@microsoft.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20179
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Nathan Heldt-Sheller <nathan.heldt-sheller@intel.com>
resource/csdk/security/provisioning/src/pmutility.c
resource/csdk/security/provisioning/unittest/ocprovisioningmanager.cpp
resource/csdk/security/provisioning/unittest/secureresourceprovider.cpp

index 6224074..e53469e 100644 (file)
@@ -1260,6 +1260,9 @@ OCStackResult PMSingleDeviceDiscoveryInUnicast(unsigned short waittime, const Oi
 }
 
 #ifdef MULTIPLE_OWNER
+
+static const unsigned int IOTIVITY_USECS_PER_MSEC = 1000;
+
 static OCStackApplicationResult MOTDeviceDiscoveryHandler(void *ctx, OCDoHandle UNUSED,
                                 OCClientResponse *clientResponse)
 {
@@ -1479,7 +1482,7 @@ OCStackResult PMMultipleOwnerSingleDeviceDiscovery(unsigned short timeoutSeconds
             }
 
             // Sleep for 100 ms to free up the CPU
-            usleep(100 * USECS_PER_MSEC);
+            usleep(100 * IOTIVITY_USECS_PER_MSEC);
 
             res = OCProcess();
         }
index a7ae14a..1c56b21 100644 (file)
@@ -36,25 +36,33 @@ static OicSecDoxm_t defaultDoxm1 =
     OIC_JUST_WORKS,         /* uint16_t oxmSel */
     SYMMETRIC_PAIR_WISE_KEY,/* OicSecCredType_t sct */
     false,                  /* bool owned */
-    {{0}},            /* OicUuid_t deviceID */
+    {{0}},                  /* OicUuid_t deviceID */
     false,                  /* bool dpc */
-    {{0}},            /* OicUuid_t owner */
-    {{0}}           /* rownerID */
+    {{0}},                  /* OicUuid_t owner */
+#ifdef MULTIPLE_OWNER
+    NULL,                   /* OicSecSubOwner_t* subOwners */
+    NULL,                   /* OicSecMom_t *mom */
+#endif //MULTIPLE_OWNER
+    {{0}}                   /* rownerID */
 };
 
 static OicSecDoxm_t defaultDoxm2 =
 {
     NULL,                   /* OicUrn_t *oxmType */
     0,                      /* size_t oxmTypeLen */
-    &oicSecDoxmRandomPin,  /* uint16_t *oxm */
+    &oicSecDoxmRandomPin,   /* uint16_t *oxm */
     1,                      /* size_t oxmLen */
-    OIC_RANDOM_DEVICE_PIN,         /* uint16_t oxmSel */
+    OIC_RANDOM_DEVICE_PIN,  /* uint16_t oxmSel */
     SYMMETRIC_PAIR_WISE_KEY,/* OicSecCredType_t sct */
     false,                  /* bool owned */
-    {{0}},            /* OicUuid_t deviceID */
+    {{0}},                  /* OicUuid_t deviceID */
     false,                  /* bool dpc */
-    {{0}},            /* OicUuid_t owner */
-    {{0}}           /* rownerID */
+    {{0}},                  /* OicUuid_t owner */
+#ifdef MULTIPLE_OWNER
+    NULL,                   /* OicSecSubOwner_t* subOwners */
+    NULL,                   /* OicSecMom_t *mom */
+#endif //MULTIPLE_OWNER
+    {{0}}                   /* rownerID */
 };
 
 static void provisioningCB (void* UNUSED1, size_t UNUSED2, OCProvisionResult_t *UNUSED3, bool UNUSED4)
index 8bf1435..e34f8fe 100644 (file)
@@ -33,30 +33,38 @@ static OicSecDoxm_t defaultDoxm1 =
 {
     NULL,                   /* OicUrn_t *oxmType */
     0,                      /* size_t oxmTypeLen */
-    &oicSecDoxmJustWorks,  /* uint16_t *oxm */
+    &oicSecDoxmJustWorks,   /* uint16_t *oxm */
     1,                      /* size_t oxmLen */
     OIC_JUST_WORKS,         /* uint16_t oxmSel */
     SYMMETRIC_PAIR_WISE_KEY,/* OicSecCredType_t sct */
     false,                  /* bool owned */
-    {{0}},            /* OicUuid_t deviceID */
+    {{0}},                  /* OicUuid_t deviceID */
     false,                  /* bool dpc */
-    {{0}},            /* OicUuid_t owner */
-    {{0}}           /* rownerID */
+    {{0}},                  /* OicUuid_t owner */
+#ifdef MULTIPLE_OWNER
+    NULL,                   /* OicSecSubOwner_t* subOwners */
+    NULL,                   /* OicSecMom_t *mom */
+#endif //MULTIPLE_OWNER
+    {{0}}                   /* rownerID */
 };
 
 static OicSecDoxm_t defaultDoxm2 =
 {
     NULL,                   /* OicUrn_t *oxmType */
     0,                      /* size_t oxmTypeLen */
-    &oicSecDoxmRandomPin,  /* uint16_t *oxm */
+    &oicSecDoxmRandomPin,   /* uint16_t *oxm */
     1,                      /* size_t oxmLen */
-    OIC_RANDOM_DEVICE_PIN,         /* uint16_t oxmSel */
+    OIC_RANDOM_DEVICE_PIN,  /* uint16_t oxmSel */
     SYMMETRIC_PAIR_WISE_KEY,/* OicSecCredType_t sct */
     false,                  /* bool owned */
-    {{0}},            /* OicUuid_t deviceID */
+    {{0}},                  /* OicUuid_t deviceID */
     false,                  /* bool dpc */
-    {{0}},            /* OicUuid_t owner */
-    {{0}}           /* rownerID */
+    {{0}},                  /* OicUuid_t owner */
+#ifdef MULTIPLE_OWNER
+    NULL,                   /* OicSecSubOwner_t* subOwners */
+    NULL,                   /* OicSecMom_t *mom */
+#endif //MULTIPLE_OWNER
+    {{0}}                   /* rownerID */
 };
 
 static void provisioningCB (void* UNUSED1, size_t UNUSED2, OCProvisionResult_t *UNUSED3, bool UNUSED4)