Unverified Commit f3f77483 authored by Javier Guerra's avatar Javier Guerra Committed by GitHub

Merge pull request #14 from openconnectivity/develop

Merge develop into master
parents fbd43907 f6919085
......@@ -56,7 +56,6 @@ git checkout swig
2. Apply all patchs of the OTGC in IoTivity-lite
```
git apply <otgc-linux>/extlibs/patchs/remove_cred_by_credid.patch
git apply <otgc-linux>/extlibs/patchs/fix_oc_api.patch
```
3. Go to the **android** directory.
```
......
iotivity-lite @ 66a2d087
Subproject commit d301b81dc3ce39f477318be219ede1d9ab835940
Subproject commit 66a2d08784903110b7dead5b9a518933a355e1e6
diff --git a/swig/swig_interfaces/oc_api.i b/swig/swig_interfaces/oc_api.i
index e600456c..47ff85cb 100644
--- a/swig/swig_interfaces/oc_api.i
+++ b/swig/swig_interfaces/oc_api.i
@@ -1372,7 +1372,7 @@ bool jni_oc_init_post(const char *uri, oc_endpoint_t *endpoint, const char *quer
OC_DBG("JNI - initPost failed releasing jni_sync_lock");
OC_DBG("JNI: - unlock %s\n", __func__);
}
- return returnValue
+ return returnValue;
}
%}
......@@ -30,7 +30,7 @@ android {
minSdkVersion 21
targetSdkVersion 28
versionCode 13
versionName "2.1.0"
versionName "2.2.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
compileOptions {
......
......@@ -287,9 +287,7 @@ public class CmsRepository {
return Completable.create(emitter -> {
OCUuid di = OCUuidUtil.stringToUuid(deviceId);
OCRole role = new OCRole();
role.setRole(roleId);
role.setAuthority(roleAuthority);
OCRole roles = OCObt.addRoleId(null, roleId, roleAuthority);
OCObtStatusHandler handler = (int status) -> {
if (status >= 0) {
......@@ -300,9 +298,10 @@ public class CmsRepository {
}
};
int ret = OCObt.provisionRoleCertificate(role, di, handler);
int ret = OCObt.provisionRoleCertificate(roles, di, handler);
if (ret < 0) {
emitter.onError(new IOException("Provision role certificate error"));
OCObt.freeRoleId(roles);
}
});
}
......
......@@ -49,8 +49,8 @@ public class DeleteAclUseCase {
public Completable execute(Device device, long aceId) {
return iotivityRepository.getSecureEndpoint(device)
.flatMapCompletable(endpoint ->
pstatRepository.changeDeviceStatus(device.getIpv6SecureHost(), device.getDeviceId(), OcfDosType.OC_DOSTYPE_RFPRO)
.andThen(amsRepository.deleteAcl(device.getIpv6SecureHost(), device.getDeviceId(), aceId))
.andThen(pstatRepository.changeDeviceStatus(device.getIpv6SecureHost(), device.getDeviceId(), OcfDosType.OC_DOSTYPE_RFNOP)));
pstatRepository.changeDeviceStatus(endpoint, device.getDeviceId(), OcfDosType.OC_DOSTYPE_RFPRO)
.andThen(amsRepository.deleteAcl(endpoint, device.getDeviceId(), aceId))
.andThen(pstatRepository.changeDeviceStatus(endpoint, device.getDeviceId(), OcfDosType.OC_DOSTYPE_RFNOP)));
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment