Tobias Kräntzer | 2 Mar 20:41 2015
Picon

Berlin XMPP Meetup

Hello all,

I created a meetup group to gather the Berlin XMPP community. If you are interested, I would be happy if you join. This first meetup should be an informal round to get to know each other. Place and time yet to be determined.


Cheers,
Tobias

body>
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 2 Mar 01:30 2015
Picon

How to get regular C-style string from jlib

Hi,

All the xml elements returns value is format like

<<"1234567890123111">>

How can I get or convert this value to

"1234567890123111"


Best Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 1 Mar 22:21 2015
Picon

Crash while returning IQ packet from Custom IQ handler.

Hi,

* I have written a custom IQ handler
* That handler receives the IQ packet, sets its type = result and returns back as it output

While testing, custom IQ handler, I get the error mentioned below:

Sequence of events that happened:


* Client sent the below XML to the server.
* Server received it.
* Gives it to the call back function of my custom IQ handler.
* which logs it and make type = result for the IQ packet

* And the server crashes with the result below.

 CRASH REPORT Process <0.473.0> with 0 neighbours exited with reason: {badxml,{xmlel,<<"iq">>,[{<<"from">>,<<"some_id">>},{<<"to">>,<<"some_id">>},{<<"id">>,<<"12345">>},{<<"type">>,<<"result">>}],{xmlel,<<"query">>,[{<<"xmlns">>,<<"test:testing">>}],[{xmlel,<<"sales">>,[],[{xmlel,<<"type">>,[],[{xmlcdata,<<"my_test">>}]},{xmlel,<<"id">>,[],[{xmlcdata,<<"1234567890123111">>}]}]}]}},{function_clause,[{xml,'-element_to_string_nocatch/1-lc$^0/1-0-',[{xmlel,<<"query">>,[{<<"xmlns">>,<<"test...">>}],...}],...},...]}} in xml:element_to_string/1 line 122 in p1_fsm:terminate/8 line 760


<?xml version="1.0" encoding="UTF-8"?> <iq type="set" id="12345"> <query xmlns="test:testing"> <sales> <type>my_test</type> <id>1234567890123111</id> </sales> </query> </iq>


Relevant Code:

start(Host, Opt) ->
IQDisc = gen_mod:get_opt(iqdisc, Opt, fun gen_iq_handler:check_type/1,
one_queue),
gen_iq_handler:add_iq_handler(ejabberd_sm, Host, ?NS_TEST, ?MODULE, process_sm_iq, IQDisc).

stop(Host) ->
gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_TEST),
error_logger:info_msg("Stoping module 'custom_test' ", []).

process_sm_iq(From, To,
#iq{type = Type, sub_el = SubEl} = IQ) ->
error_logger:info_msg("Process_sm_iq request received ~p~n", [IQ]),
IQ#iq{type = result}.

Please provide pointers to help me resolve this issue.


Best Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 1 Mar 10:25 2015
Picon

error: {case_clause,undefined}

While adding a custom iq_handler, I get the following error:

I tried following Badlops' answer at

https://www.ejabberd.im/node/5035

I use git trunk.

options: []
 error: {case_clause,undefined}
[{gen_iq_handler,add_iq_handler,6,[{file,"src/gen_iq_handler.erl"},{line,64}]},
 {mod_iqtest,start,2,[{file,"mod_iqtest.erl"},{line,16}]},
 {gen_mod,start_module,3,[{file,"src/gen_mod.erl"},{line,82}]},
 {lists,foreach,2,[{file,"lists.erl"},{line,1336}]},
 {ejabberd_app,start,2,[{file,"src/ejabberd_app.erl"},{line,67}]},
 {application_master,start_it_old,4,
                     [{file,"application_master.erl"},{line,272}]}]
2015-03-01 01:17:48.596 [critical] <0.37.0> <at> gen_mod:start_module:95 ejabberd initialization was aborted because a module start failed.


Please help me resolve this issue.



Best Regards,



_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 28 Feb 17:06 2015
Picon

why is mod_offline.handle_info implemented?

Hi,

My understand is that when we add event hook, then we specify the function that will be called when the event happens

https://www.process-one.net/en/wiki/ejabberd_events_and_hooks/
  • The Module and Function parameters describe the hook to be called when the event occurs.
But I notice that in mod_offline.erl, handle_info is implemented as well.

* Would you be able to tell why is hadle_info implemented in mod_offline.erl?
* How will this be called?
* And under which situtations?


--------------------------------------------------------------------------------------
handle_info(#offline_msg{us = UserServer} = Msg, State) ->
    #state{host = Host,
           access_max_offline_messages = AccessMaxOfflineMsgs} = State,
    DBType = gen_mod:db_type(Host, ?MODULE),
    Msgs = receive_all(UserServer, [Msg], DBType),
    Len = length(Msgs),
    MaxOfflineMsgs = get_max_user_messages(AccessMaxOfflineMsgs,
                                           UserServer, Host),
    store_offline_msg(Host, UserServer, Msgs, Len, MaxOfflineMsgs, DBType),
    {noreply, State};
--------------------------------------------------------------------------------------

Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 28 Feb 06:00 2015
Picon

jiffy module not loaded

I get this error in logs.

gen_server ..... terminated with reason: {'module could not be loaded',[{jiffy,encode

I am on following ejabbard git: https://github.com/processone/ejabberd.git

I checked there is no jiffy so in priv or anywhere in my ejabberd install directory

I also checked this thread but it did not help me

https://github.com/processone/ejabberd/issues/309


Please help me resolve this issue.

Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Mickaël Rémond | 27 Feb 19:21 2015
Picon

ejabberd documentation site effort

Hello,

We have launched a new documentation site for ejabberd and open the
repository for the website on Github. It means you can now send a pull
request to improve the brand new (and beautiful) ejabberd documentation
site.

You can find more details on my blog post:
https://blog.process-one.net/ejabberd-new-documentation-site-a-community-effort/

The documentation site repository is on Github:
https://github.com/processone/docs.ejabberd.im

You can now star, fork and send PR to contribute to the new ejabberd doc
site.

Enjoy !

--

-- 
Mickaël Rémond
 http://www.process-one.net/
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 27 Feb 18:21 2015
Picon

Which config file to use to set env variables.

I use a library that uses following code:

get_env(K, Def) ->
  case application:get_env(appname, K) of
    {ok, V} -> V;
    _ -> Def
  end.

Could you please tell me which config file I should use to get environment variable via

application:get_env(appname, K) of


Best Regards,

_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 27 Feb 05:03 2015
Picon

How many instances of any module can run at the same time

HI,

Shorter version of my previous question:

How many instances of any module can run at the same time?

Is there a documentation of ejabberd request handling?

Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Kaiduan Xie | 27 Feb 04:37 2015
Picon

XEP-0166 support

Mickael,

Does ejabberd support XEP-0166 for audio/video chat?

Thanks,

/Kaiduan
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd
Gaurav Jain | 27 Feb 04:26 2015
Picon

How does ejabberd high number of requests

Hi,

How does ejabberd handle really high number of requests. For eg.

* I have only instance running.
* There is a module called mod_offline.erl
* It has hook for offline_message_hook.

I am assuming:

* This module gets started by ejabberd_admin when server is started
* Using gen_server callbacks.

-- Is there only a single instance of this module running or are there multiple instances of the module running at the same time
-- If multiple then how many such instances?

I was also curious what needs to be done to write a custom module to be able to handle high number of requests simultaneously.

Could you please provide some pointers?

I am very new to erlang and ejabberd. Please help me understand how does ejabberd take care of high requests.


Best Regards,
_______________________________________________
ejabberd mailing list
ejabberd <at> jabber.ru
http://lists.jabber.ru/mailman/listinfo/ejabberd

Gmane