Expose dataset registration for dependent model startup boundaries
This commit is contained in:
1 parent
42808450b5
commit
e7ae4025e2
2 files changed
+7
No files matched your search
@@ -624,6 +624,11 @@ int merkle_sync_register(struct UTUN_INSTANCE* inst, uint8_t dataset, const stru
|
||||
return 0;
|
||||
}
|
||||
|
||||
int merkle_sync_registered(struct UTUN_INSTANCE* inst, uint8_t dataset) {
|
||||
struct merkle_sync* ms = inst ? inst->msync : NULL;
|
||||
return ms && ms->datasets[dataset].ops;
|
||||
}
|
||||
|
||||
void merkle_sync_destroy(struct UTUN_INSTANCE* inst) {
|
||||
struct merkle_sync* ms = inst ? inst->msync : NULL;
|
||||
if (!ms) return;
|
||||
|
||||
@@ -68,6 +68,8 @@ int merkle_sync_init(struct UTUN_INSTANCE* inst, uint8_t svc_id,
|
||||
* ops/data_ctx живут до уничтожения движка. Каждый набор имеет свой Merkle-корень. */
|
||||
int merkle_sync_register(struct UTUN_INSTANCE* inst, uint8_t dataset,
|
||||
const struct merkle_sync_data_ops* ops, void* data_ctx);
|
||||
/* 1 — модель зарегистрирована, 0 — движок/модель ещё не созданы либо уже освобождены. */
|
||||
int merkle_sync_registered(struct UTUN_INSTANCE* inst, uint8_t dataset);
|
||||
/* Отменить сессии без done callbacks, снять обработчики и освободить движок. */
|
||||
void merkle_sync_destroy(struct UTUN_INSTANCE* inst);
|
||||
|
||||
|
||||
Reference in new issue
Block a user