[ejabberd] why is mod_offline.handle_info implemented?

Holger Weiß holger at zedat.fu-berlin.de
Sun Mar 1 22:24:23 MSK 2015

* Gaurav Jain <monkeyfdude at gmail.com> [2015-03-01 10:36]:
> If you could just help me understand (last few questions)
> gen_mod:get_module_proc(To#jid.lserver, ?PROCNAME) !
> * what does get_module_proc do?

It returns the registered name of the mod_offline process for that
virtual host name.

> * The process was sent To#jid.lserver and not From#jid because the
>   offline_message needs to be stored for this To#jid.....right


> * And I assume, in this process there is no state. So it is just a worker
>   process that has a queue of offline_messages to store against their
>   corresponding To#jid.....right?

Mostly, yes.  (It has a state with one or two configuration values, and
there's one mod_offline queue/process per virtual host and ejabberd

> * main mod_offline just hands storage to this process and goes back to
>   receiving more messages from ejabberd itself.

Yes, where "main mod_offline" is the mod_offline functions called by
other processes via hooks.


More information about the ejabberd mailing list