mirror of
https://github.com/openziti/desktop-edge-win.git
synced 2026-10-23 12:46:00 +00:00
use the posture set map
newer versions of the c-sdk are swapping to a posture set map instead of an array.
This commit is contained in:
+18
-6
@@ -416,12 +416,11 @@ func serviceCB(ziti_ctx C.ziti_context, service *C.ziti_service, status C.int, z
|
||||
timeout := -1
|
||||
timeoutRemaining := -1
|
||||
|
||||
//find all posture checks sets...
|
||||
for setIdx := 0; true; setIdx++ {
|
||||
pqs := C.posture_query_set_get(service.posture_query_set, C.int(setIdx))
|
||||
if unsafe.Pointer(pqs) == C.NULL {
|
||||
break
|
||||
}
|
||||
it := C.model_map_iterator(&service.posture_query_map)
|
||||
for unsafe.Pointer(it) != C.NULL {
|
||||
ptr := C.model_map_it_value(it)
|
||||
|
||||
pqs := (*C.ziti_posture_query_set)(unsafe.Pointer(ptr))
|
||||
|
||||
if C.GoString(pqs.policy_type) == "Bind" {
|
||||
log.Tracef("Posture Query set returned a Bind policy: %s [ignored]", C.GoString(pqs.policy_id))
|
||||
@@ -483,6 +482,19 @@ func serviceCB(ziti_ctx C.ziti_context, service *C.ziti_service, status C.int, z
|
||||
postureChecks = append(postureChecks, pc)
|
||||
}
|
||||
}
|
||||
|
||||
it = C.model_map_it_next(it)
|
||||
}
|
||||
|
||||
|
||||
//find all posture checks sets...
|
||||
for setIdx := 0; true; setIdx++ {
|
||||
pqs := C.posture_query_set_get(service.posture_query_set, C.int(setIdx))
|
||||
if unsafe.Pointer(pqs) == C.NULL {
|
||||
break
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
svc = &dto.Service{
|
||||
|
||||
Reference in New Issue
Block a user