Группа :: Система/Серверы
Пакет: ejabberd-jit
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: jabber-jit-1.1.6-unhack-attr.patch
--- jit-1.1.6/doc/FAQ.patch-unhack 2003-01-17 14:23:12 +0300
+++ jit-1.1.6/doc/FAQ 2003-07-17 01:15:49 +0400
@@ -14,5 +14,5 @@
3. Auto-import of the ICQ contact lists does not import the contact's nick
- - The Jabber server needs to be patched for this to work, see
- http://jit.jabberstudio.org/mod_roster.c.diff
+ - There is really no good way around this in terms of the standard
+ protocol.
--- jit-1.1.6/jit/jit/wp_client.cpp.patch-unhack 2003-04-29 14:59:24 +0400
+++ jit-1.1.6/jit/jit/wp_client.cpp 2003-07-17 01:15:49 +0400
@@ -530,7 +530,7 @@
/* new contact not yet in our list */
c = it_contact_add(sesja,(*curr)->getUIN());
if(c != NULL)
- it_contact_subscribe(c,(*curr)->getAlias().c_str());
+ it_contact_subscribe(c);
log_debug(ZONE,"Imported UIN %ul", (*curr)->getUIN());
} else
log_debug(ZONE,"Skipped UIN %ul (already in list)", (*curr)->getUIN());
--- jit-1.1.6/jit/jit/icqtransport.c.patch-unhack 2003-04-29 14:34:51 +0400
+++ jit-1.1.6/jit/jit/icqtransport.c 2003-07-17 01:15:49 +0400
@@ -228,13 +228,15 @@
/* JID user part should be case insensitive */
/* convert user part of from JID to lower case */
- if(jp->from->user != NULL)
- for(user = jp->from->user; *user != '\0'; user++)
- if(*user < 128)
- *user = tolower(*user);
- /* Mangle "from" JID, save original attribute for XDB conversion */
- xmlnode_put_attrib(jp->x, "origfrom", xmlnode_get_attrib(jp->x, "from"));
- xmlnode_put_attrib(jp->x, "from", jid_full(jp->from));
+ /* FIXME: Unicode-aware lowercase conversion is needed here */
+ if(jp->from->user != NULL) {
+ for(user = jp->from->user; *user != '\0'; user++) {
+ if(*user < 128) {
+ *user = tolower(*user);
+ }
+ }
+ }
+ xmlnode_put_attrib(jp->x, "from", jid_full(jp->from));
SEM_LOCK(ti->sessions_sem);
s = (session) wpxhash_get(ti->sessions,jid_full(jid_user(jp->from)));
--- jit-1.1.6/jit/jit/contact.c.patch-unhack 2003-07-17 01:15:49 +0400
+++ jit-1.1.6/jit/jit/contact.c 2003-07-17 01:20:31 +0400
@@ -177,7 +177,7 @@
c = it_sms_add(s,user);
log_debug(ZONE,"sms add %s",user);
log_debug(ZONE,"subscribe");
- it_contact_subscribe(c,NULL);
+ it_contact_subscribe(c);
if ((s->ti->own_roster)&&(s->connected)) {
it_save_contacts(s);
@@ -188,7 +188,7 @@
c = it_contact_add(s,uin);
log_debug(ZONE,"contact add");
log_debug(ZONE,"subscribe");
- it_contact_subscribe(c,NULL);
+ it_contact_subscribe(c);
if ((s->ti->own_roster)&&(s->connected)) {
@@ -378,7 +378,7 @@
}
/** Add contact to roster */
-void it_contact_subscribe(contact c,const char * name)
+void it_contact_subscribe(contact c)
{
xmlnode x;
session s = c->s;
@@ -407,20 +407,15 @@
/* Propagate to C++ backend */
AddICQContact(c);
- /* We do not want to request auth on auto-import of contacts */
- if(name == NULL) {
- /* Request auth from ICQ side
- We don't need that for presence but this is the only way to contact
- peers who ignore messages from contacts not on their contact list */
- SendAuthRequest(c,LNG_AUTH_REQUEST);
- }
+ /* Request auth from ICQ side
+ We don't need that for presence but this is the only way to contact
+ peers who ignore messages from contacts not on their contact list */
+ SendAuthRequest(c,LNG_AUTH_REQUEST);
/* Send "subscribed" presence. Fortunately, jabberd will add this
contact to the user's roster if it was not present */
x = jutil_presnew(JPACKET__SUBSCRIBED,jid_full(s->id),NULL);
xmlnode_put_attrib(x,"from",jid_full(it_uin2jid(xmlnode_pool(x),c->uin,s->from->server)));
- if(name != NULL)
- xmlnode_put_attrib(x,"name",it_convert_windows2utf8(xmlnode_pool(x),name));
it_deliver(s->ti,x);
}
--- jit-1.1.6/jit/jit/unknown.c.patch-unhack 2003-04-29 14:19:42 +0400
+++ jit-1.1.6/jit/jit/unknown.c 2003-07-17 01:15:49 +0400
@@ -119,13 +119,6 @@
/* Get auth info from XDB */
reg = xdb_get(ti->xc,it_xdb_id(jp->p,jp->from,jp->to->server),NS_REGISTER);
- if(reg == NULL)
- {
- /* auth data not found, perhaps pre-2003 non-lowercase XDB format */
- it_xdb_convert(ti, xmlnode_get_attrib(jp->x,"origfrom"), jp->from);
- reg = xdb_get(ti->xc,it_xdb_id(jp->p,jp->from,jp->to->server),NS_REGISTER);
- }
-
if (reg == NULL)
{
/* we really should send an error message back here */
--- jit-1.1.6/jit/jit/icqtransport.h.patch-unhack 2003-06-02 14:06:51 +0400
+++ jit-1.1.6/jit/jit/icqtransport.h 2003-07-17 01:15:49 +0400
@@ -305,7 +305,7 @@
//void it_contact_update_addr(contact c, unsigned long ip, unsigned short port, unsigned long real_ip, icqbyte force);
void it_contact_set_status(contact c, icqstatus show,char * status);
void it_contact_send_presence(contact c,char * status) ;
-void it_contact_subscribe(contact c,const char * name);
+void it_contact_subscribe(contact c);
void it_contact_unsubscribe(contact c);
void it_contact_subscribed(contact c, jpacket jp);
void it_contact_flush(contact c);
--- jit-1.1.6/jit/jit/presence.c.patch-unhack 2003-02-28 19:19:21 +0300
+++ jit-1.1.6/jit/jit/presence.c 2003-07-17 01:15:49 +0400
@@ -207,7 +207,7 @@
log_debug(ZONE,"subscribe");
- it_contact_subscribe(c,NULL);
+ it_contact_subscribe(c);
xmlnode_free(jp->x);
break;