[ejabberd] First shot at result set management (XEP-0059)

Eric Cestari eric at ohmforce.com
Tue Nov 25 19:46:26 MSK 2008


Le 25 nov. 08 à 17:12, Badlop a écrit :

> On Mon, Nov 24, 2008 at 1:53 PM, Eric Cestari <eric at ohmforce.com>  
> wrote:
>> https://support.process-one.net/browse/EJAB-807
>> Now the 2€ question is "are there clients supporting XEP-0059 ?"
>
> I couldn't find client implementations, at least according to those  
> pages:
>
> Psi: http://psi-im.org/wiki/Supported_Protocols
>
> Tkabber: http://tkabber.jabber.ru/protocols
>
> Gajim: http://trac.gajim.org/wiki/GajimXEPSupport
>
> Coccinella: http://coccinella.svn.sourceforge.net/viewvc/coccinella/trunk/coccinella/READMEs/README-xmpp
>
> Jabbim: the page doesn't include protocols in development version
> http://dev.jabbim.cz/jabbim/wiki/en/JabbimXEPSupport
>
>> Send in your remarks.
>> I'd feel that the rsm module should be merged with the jlib module.
>
> I didn't review your code at this state, as maybe you still want to
> make more changes when you read all my emal :)
>
> I only performed some cosmetic changes to your code:
> * Moved namespace definition to rsm.hrl, and change related code.
> * Improved code style: fixed indentation and removed unneeded
> blankspaces using emacs.
> * Replaced the deprecated integer/1 with is_integer/1, and list/1 with
> is_list/1
>  (see http://www.erlang.org/doc/man/erlang.html )
>
> The updated patch that I recommend you use to continue your
> development is attached in the ticket.

Thanks. I'll revert and apply the patch.


>
>
>> TODO :
>> I am not too happy with the way I compute the index, so maybe  
>> someone can
>> come up with something better.
>
> Do you mean the function mod_muc:get_vh_rooms/2 may not be efficient/ 
> robust?
> You can add a 'TODO' comment in the code ;)

Yes. The relevant part is here :

H = hd(L2),
{NewIndex, found} = lists:foldl(
		fun(#muc_online_room{name_host=NameHost}, {N, notfound})->
				if NameHost == H#muc_online_room.name_host ->
					{N, found};
				   true ->
					{N+1, notfound}
				end;
		   (_, {N, found})->
		  		{N, found}
		end, {0, notfound}, AllRooms),

That's the best way I could up with to set the index value for the  
first element, Walking and incrementing.

[SNIP]

Thanks for the run down.
All those things will be easily corrected. I'll send a patch tomorrow.
>
> _______________________________________________
> ejabberd mailing list
> ejabberd at jabber.ru
> http://lists.jabber.ru/mailman/listinfo/ejabberd



More information about the ejabberd mailing list