Add function to unset the PIN related user callback.
authorChul Lee <chuls.lee@samsung.com>
Tue, 20 Sep 2016 11:23:19 +0000 (20:23 +0900)
committerRandeep Singh <randeep.s@samsung.com>
Fri, 28 Oct 2016 14:23:00 +0000 (14:23 +0000)
Change-Id: I4dc3d01d6d11de187aaddd3f556135d516d32028
Signed-off-by: Chul Lee <chuls.lee@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11987
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Randeep Singh <randeep.s@samsung.com>
(cherry picked from commit 3a92e3476f2009b646d4fc02818e456c74a0e757)
Reviewed-on: https://gerrit.iotivity.org/gerrit/13813

resource/csdk/security/include/pinoxmcommon.h
resource/csdk/security/src/oxmpincommon.c

index f9b9178..0432c38 100644 (file)
@@ -66,6 +66,18 @@ void SetGetPreconfigPinCB(InputPinCallback pinCB);
 #endif //_ENABLE_MULTIPLE_OWNER_
 
 /**
+ * Function to unset the input PIN callback.
+ * NOTE : Do not call this function while PIN based ownership transfer.
+ */
+void UnsetInputPinCB();
+
+/**
+ * Function to unset the PIN generation callback.
+ * NOTE : Do not call this function while PIN based ownership transfer.
+ */
+void UnsetGeneratePinCB();
+
+/**
  * Function to generate random PIN.
  * This function will send generated PIN to user via callback.
  *
index 569b7d1..450d4bf 100644 (file)
@@ -67,6 +67,16 @@ void SetGeneratePinCB(GeneratePinCallback pinCB)
     gGenPinCallback = pinCB;
 }
 
+void UnsetInputPinCB()
+{
+    gInputPinCallback = NULL;
+}
+
+void UnsetGeneratePinCB()
+{
+    gGenPinCallback = NULL;
+}
+
 OCStackResult GeneratePin(char* pinBuffer, size_t bufferSize)
 {
     if(!pinBuffer)