[asterisk-commits] phsultan: branch 1.4 r84902 - /branches/1.4/res/res_jabber.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Sun Oct 7 11:15:40 CDT 2007
Author: phsultan
Date: Sun Oct 7 11:15:39 2007
New Revision: 84902
URL: http://svn.digium.com/view/asterisk?view=rev&rev=84902
Log:
Presence packets from a client who's connected with our Jabber ID are
valid, therefore, those clients must be considered as buddies. The resource
string helps us make the distinction between clients.
Closes issue #10707, reported by yusufmotiwala.
Modified:
branches/1.4/res/res_jabber.c
Modified: branches/1.4/res/res_jabber.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/res/res_jabber.c?view=diff&rev=84902&r1=84901&r2=84902
==============================================================================
--- branches/1.4/res/res_jabber.c (original)
+++ branches/1.4/res/res_jabber.c Sun Oct 7 11:15:39 2007
@@ -1170,8 +1170,12 @@
aji_create_buddy(pak->from->partial, client);
buddy = ASTOBJ_CONTAINER_FIND(&client->buddies, pak->from->partial);
- if (!buddy) {
- ast_log(LOG_NOTICE, "Got presence packet from %s, someone not in our roster!!!!\n", pak->from->partial);
+ if (!buddy && pak->from->partial) {
+ /* allow our jid to be used to log in with another resource */
+ if (!strcmp((const char *)pak->from->partial, (const char *)client->jid->partial))
+ aji_create_buddy(pak->from->partial, client);
+ else
+ ast_log(LOG_NOTICE, "Got presence packet from %s, someone not in our roster!!!!\n", pak->from->partial);
return;
}
type = iks_find_attrib(pak->x, "type");
More information about the asterisk-commits
mailing list