- I identified several alternatives to pursue
- I identified how to put a new module into the system.
- I experimented with creating a new module
I ran into a strange problem when I tried adding the new module to the system. I tried adding the following line to the ejabberd.cfg file:
{6280, megaphone, []},
When I tried starting up ejabberd I would get the following error:
=ERROR REPORT==== 2012-01-07 07:43:39 ===
C(<0.37.0>:gen_mod:76) : Problem starting the module mod_adhoc for host "ubuntu2"
options: []
exit: {noproc,
{gen_server,call,
[ejabberd_iq_sup,
{start_child,["ubuntu2",mod_adhoc,process_local_iq]},
infinity]}}
=ERROR REPORT==== 2012-01-07 07:43:39 ===
C(<0.37.0>:gen_mod:81) : ejabberd initialization was aborted because a module start failed.
I found this very strange that it was reporting an error for mod_adhoc, when the module that I was trying to get it to use was megaphone.
If I removed the line from the config file then ejabberd would start up, and I was able to get other modules like ejabberd_http to work with the same port number, but not if I included the megaphone module.
After some trial and error, it seems like the problem that was preventing the system from starting up was that I had not defined a function called socket_type/0. For the time being, I am using the same thing that is in ejabberd_http:
socket_type() ->
raw.
Not sure whey the thing doesn't report an error if that function is not defined instead of the behavior that I am seeing, but at least defining the function seems to solve the problem.
Next step is to connect it to ECM and see what happens.
No comments:
Post a Comment