temp workaround for oidc auth dropping issue

Add a method to "kick" the refresh thread and re-post the tokens in the case where the thread is somehow still running & controller pushes out an AUTH_REQUIRED.  This situation happens in a corner case still under investigation where the controller pushes out many copies of the network config repeatedly
This commit is contained in:
Grant Limberg 2022-01-20 09:44:56 -08:00
commit d719137565
No known key found for this signature in database
GPG key ID: 2BA62CCABBB4095A
5 changed files with 47 additions and 4 deletions

View file

@ -218,3 +218,16 @@ pub extern "C" fn zeroidc_network_id_from_state(state: *const c_char) -> *const
let s = CString::new(split[1]).unwrap();
return s.into_raw();
}
#[no_mangle]
pub extern "C" fn zeroidc_kick_refresh_thread(idc: *mut ZeroIDC) {
if idc.is_null() {
println!("idc is null");
return;
}
let idc = unsafe {
&mut *idc
};
idc.kick_refresh_thread();
}