[Devel] rank == PROC_FIFO

Juha Heinanen jh at tutpro.com
Mon Oct 16 14:11:35 CEST 2006


Bogdan-Andrei Iancu writes:

 > I did the changes - each module exports an extra structure describing 
 > the functions to be registered for MI; for each function you can set an 
 > init function - this should solve the problem.
 > 
 > I did the modifications for LCR and DOMAIN module - please test them and 
 > let me know if it works properly.

bogdan,

while implementing mi interface for permissions module i was reading
your domain module mi code and have a question.  in mi_exports

static mi_export_t mi_cmds[] = {
	{ MI_DOMAIN_RELOAD,   mi_domain_reload,   0,  mi_child_init },
	{ MI_DOMAIN_DUMP,     mi_domain_dump,     0,  0 },
	{ 0, 0, 0, 0}
};

when is mi_child_init called?  

what if there is two reload functions like in permissions module:

static mi_export_t mi_cmds[] = {
	{ MI_DOMAIN_RELOAD,   mi_domain_reload,   0,  mi_child_init },
	{ MI_DOMAIN_DUMP,     mi_domain_dump,     0,  0 },
	{ MI_ADDRESS_RELOAD,  mi_address_reload,  0,  mi_child_init },
	{ MI_ADDRESS_DUMP,    mi_address_dump,    0,  0 },
	{ 0, 0, 0, 0}
};

mi_child_init that initializes db, should be called only once, not
twice.

why is mi_child_init associated with individual mi commands and not with
mi process?

looks like i don't understand how this is supposed to work.

-- juha



More information about the Devel mailing list