X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=KernelLand%2FModules%2FInterfaces%2FUDI%2Fudi_lib%2Fimc.c;fp=KernelLand%2FModules%2FInterfaces%2FUDI%2Fudi_lib%2Fimc.c;h=2f9f3fe6d83b9039669ae431be556a3ea54af991;hb=c0f20e1d9a03ae5026b345748d1e30b7dc142596;hp=cd15e0709f0323bc3ba5a5aacd1ccccc02f4aedb;hpb=a07af753a21de9deade5e9694863c0daedfafe3f;p=tpg%2Facess2.git diff --git a/KernelLand/Modules/Interfaces/UDI/udi_lib/imc.c b/KernelLand/Modules/Interfaces/UDI/udi_lib/imc.c index cd15e070..2f9f3fe6 100644 --- a/KernelLand/Modules/Interfaces/UDI/udi_lib/imc.c +++ b/KernelLand/Modules/Interfaces/UDI/udi_lib/imc.c @@ -2,8 +2,11 @@ * \file imc.c * \author John Hodge (thePowersGang) */ +#define DEBUG 1 #include #include +//#include "internal/channels.h" +#include "../udi_internal.h" // === EXPORTS === EXPORT(udi_channel_anchor); @@ -60,7 +63,19 @@ void udi_channel_close(udi_channel_t channel) void udi_channel_event_ind(udi_channel_event_cb_t *cb) { - udi_channel_event_complete(cb, UDI_OK); + LOG("cb=%p{...}", cb); + const struct { + udi_channel_event_ind_op_t *channel_event_ind_op; + } *ops = UDI_int_ChannelPrepForCall( UDI_GCB(cb), NULL, 0 ); + if(!ops) { + Log_Warning("UDI", "udi_channel_event_ind on wrong channel type"); + return ; + } + + // UDI_int_MakeDeferredCb( UDI_GCB(cb), ops->channel_event_ind_op ); + + UDI_int_ChannelReleaseFromCall( UDI_GCB(cb) ); + ops->channel_event_ind_op(cb); } void udi_channel_event_complete(udi_channel_event_cb_t *cb, udi_status_t status)