From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: From: Mishka Plugnikov Organization: =?koi8-r?b?9fTj?=, =?koi8-r?b?7ef09Q==?="=?koi8-r?b?89TBzsvJzg==?=" To: devel@altlinux.ru Date: Sat, 20 Mar 2004 13:57:55 +0300 User-Agent: KMail/1.5.4 MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200403201355.40342.mike@stankin.ru> Content-Type: Multipart/Mixed; boundary="Boundary-00=_0OCXA7JQL2IBHX4" Subject: [devel] jabber =?koi8-r?b?ySBqYWJiZXItaml0OiDQwdTeIMTM0SDB19TPzcHUyd7F?= =?koi8-r?b?08vPyiDLz87XxdLUwcPJySBpY3Egzs/NxdLP1yDXIM7Jy8kg18zBxMXM2MPF?= =?koi8-r?b?1y4=?= X-BeenThere: devel@altlinux.ru X-Mailman-Version: 2.1.4 Precedence: list Reply-To: ALT Devel discussion list List-Id: ALT Devel discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Mar 2004 10:49:00 -0000 Archived-At: List-Archive: List-Post: --Boundary-00=_0OCXA7JQL2IBHX4 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: base64 Content-Disposition: inline +sTSwdfT1NfVytTFLgrzy8/SxcUg19PFx88g3NTPINDSz9PYwsEgxMzRIM3BztTKzsXSwSBqYWJi ZXIsIO3JyMHJzMEg+sHCwczVxdfBLCDUwcsgy8HLINDB1N4gCtDSxcTOwdrOwd7BxdTT0SDEzNEg amFiYmVyINPF0tfF0sEuCvDB1N4sINDSycvMxdDMo84gyyDQydPYzdUsIM7PINTByy3WxSDEz9PU 1dDFziDQzyDT09nMy8U6IApodHRwOi8vaml0LmphYmJlcnN0dWRpby5vcmcvbW9kX3Jvc3Rlci5j LmRpZmYK8NLJINLFx8nT1NLBw8nJINUg0M/M2NrXwdTFzNEgaWNxINTSwc7T0M/S1MEsIGppdCDX 2dTRx8nXwcXUIGljcSDOz83F0sEuCvMg3NTJzSDQwdTexc0g0sHCz9TBxdQgwdfUz83B1MnexdPL yc8g0NLFz8LSwdrP18HOycUgzs/NwdLP1yDXIM7Jy8kgCtfMwcTFzNjDxdcuCgo= --Boundary-00=_0OCXA7JQL2IBHX4 Content-Type: text/x-diff; charset="koi8-r"; name="mod_roster.c.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="mod_roster.c.diff" # This patch is included in jabberd 1.4.3 and newer --- mod_roster.c Thu Jan 16 14:44:47 2003 +++ mod_roster.c Sun Jan 5 23:40:34 2003 @@ -58,7 +58,7 @@ return ret; } -xmlnode mod_roster_get_item(xmlnode roster, jid id, int *newflag) +xmlnode mod_roster_get_item(xmlnode roster, jid id, char *name, int *newflag) { xmlnode ret; @@ -71,6 +71,8 @@ log_debug("mod_roster","creating"); ret = xmlnode_insert_tag(roster,"item"); xmlnode_put_attrib(ret,"jid",jid_full(id)); + if(name != NULL) + xmlnode_put_attrib(ret,"name",name); xmlnode_put_attrib(ret,"subscription","none"); *newflag = 1; } @@ -172,7 +174,7 @@ newflag = to = from = 0; roster = mod_roster_get(m->user); - item = mod_roster_get_item(roster,m->packet->to, &newflag); + item = mod_roster_get_item(roster,m->packet->to,NULL,&newflag); /* vars */ if(j_strcmp(xmlnode_get_attrib(item,"subscription"),"to") == 0) @@ -302,7 +304,7 @@ if(id == NULL || jid_cmpx(jid_user(m->s->id),id,JID_USER|JID_SERVER) == 0) continue; /* zoom to find the existing item in the current roster, and hide it */ - item = mod_roster_get_item(roster, id, &newflag); + item = mod_roster_get_item(roster, id, NULL, &newflag); xmlnode_hide(item); /* drop you sukkah */ @@ -382,7 +384,7 @@ /* now we can get to work and handle this user's incoming subscription crap */ roster = mod_roster_get(m->user); - item = mod_roster_get_item(roster,m->packet->from, &newflag); + item = mod_roster_get_item(roster,m->packet->from,xmlnode_get_attrib(m->packet->x,"name"),&newflag); reply2 = reply = NULL; jid_set(m->packet->to,NULL,JID_RESOURCE); /* make sure we're only dealing w/ the user id */ --Boundary-00=_0OCXA7JQL2IBHX4--