Skip to content

Commit

Permalink
errorcode -> csr (#8522)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinh0 authored Jul 21, 2021
1 parent 62083da commit af1cc26
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ open class GenericChipDeviceListener : ChipDeviceController.CompletionListener {
// No op
}

override fun onOpCSRGenerationComplete(errorCode: ByteArray) {
override fun onOpCSRGenerationComplete(csr: ByteArray) {
// No op
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -135,8 +135,8 @@ class DeviceProvisioningFragment : Fragment() {
}
}

override fun onOpCSRGenerationComplete(errorCode: ByteArray) {
Log.d(TAG,String(errorCode))
override fun onOpCSRGenerationComplete(csr: ByteArray) {
Log.d(TAG, String(csr))
}

override fun onPairingDeleted(code: Int) {
Expand Down
6 changes: 3 additions & 3 deletions src/controller/java/AndroidDeviceControllerWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,11 @@ AndroidDeviceControllerWrapper::GenerateNodeOperationalCertificate(const Optiona

onNOCGenerated->mCall(onNOCGenerated->mContext, ByteSpan(noc.Get(), nocLen));

jbyteArray argument;
jbyteArray javaCsr;
JniReferences::GetInstance().GetEnvForCurrentThread()->ExceptionClear();
JniReferences::GetInstance().N2J_ByteArray(JniReferences::GetInstance().GetEnvForCurrentThread(), csr.data(), csr.size(),
argument);
JniReferences::GetInstance().GetEnvForCurrentThread()->CallVoidMethod(mJavaObjectRef, method, argument);
javaCsr);
JniReferences::GetInstance().GetEnvForCurrentThread()->CallVoidMethod(mJavaObjectRef, method, javaCsr);
return generateCert;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ public void onPairingComplete(int errorCode) {
}
}

public void onOpCSRGenerationComplete(byte[] errorCode) {
public void onOpCSRGenerationComplete(byte[] csr) {
if (completionListener != null) {
completionListener.onOpCSRGenerationComplete(errorCode);
completionListener.onOpCSRGenerationComplete(csr);
}
}

Expand Down Expand Up @@ -287,6 +287,6 @@ public interface CompletionListener {
void onError(Throwable error);

/** Notifies the Commissioner when the OpCSR for the Comissionee is generated. */
void onOpCSRGenerationComplete(byte[] errorCode);
void onOpCSRGenerationComplete(byte[] csr);
}
}

0 comments on commit af1cc26

Please sign in to comment.