_PUBLIC_ NTSTATUS dcesrv_interface_bind_allow_connect(struct dcesrv_connection_context *context,
const struct dcesrv_interface *iface);
+_PUBLIC_ void dcesrv_assoc_group_common_destructor(struct dcesrv_assoc_group *assoc_group);
+
_PUBLIC_ NTSTATUS _dcesrv_iface_state_store_assoc(
struct dcesrv_call_state *call,
uint64_t magic,
static int dcesrv_iface_state_destructor(struct dcesrv_iface_state *istate)
{
- DLIST_REMOVE(istate->assoc->iface_states, istate);
+ if (istate->assoc != NULL) {
+ DLIST_REMOVE(istate->assoc->iface_states, istate);
+ istate->assoc = NULL;
+ }
return 0;
}
+void dcesrv_assoc_group_common_destructor(struct dcesrv_assoc_group *assoc_group)
+{
+ struct dcesrv_iface_state *cur = NULL;
+ struct dcesrv_iface_state *next = NULL;
+
+ for (cur = assoc_group->iface_states; cur != NULL; cur = next) {
+ next = cur->next;
+ cur->assoc = NULL;
+ DLIST_REMOVE(assoc_group->iface_states, cur);
+ }
+}
+
static void *dcesrv_iface_state_find(struct dcesrv_assoc_group *assoc,
const struct dcesrv_interface *iface,
const struct dom_sid *owner,