[JDEV] JIT hackin'

Trejkaz Xaoza trejkaz at xaoza.net
Sat Jan 10 00:06:37 CST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay I've been tracing around the JIT code trying to figure out why it doesn't 
add the contacts from the ICQ server when it connects.  This is where I get 
to.  It seems to exit the while() loop immediately so I guess the list is 
'empty'.  Has anyone else had any success getting this to work?

TX

void WPclient::SignalServerContactEvent(ServerBasedContactEvent* ev) {
    log_debug(ZONE,"Got server based contact list, importing");
    ContactList l = ev->getContactList();
    ContactList::iterator curr = l.begin();
    while (curr != l.end()) {
      contact c = it_contact_get(sesja,(*curr)->getUIN());
      if (c == NULL) {
        /* 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());
        }
        log_debug(ZONE,"Imported UIN %ul", (*curr)->getUIN());
      } else {
(*curr)->getUIN());
        log_debug(ZONE,"Skipped UIN %ul (already in list)", 
(*curr)->getUIN());
      }
      ++curr;
    }
    log_debug(ZONE,"Finished import");
}

- -- 
'Every sufficiently advanced technology is indistinguishable from magic' - 
Arthur C Clarke
'Every sufficiently advanced magic is indistinguishable from technology' - Tom 
Graves

      Email: Trejkaz Xaoza <trejkaz at xaoza.net>
   Web site: http://xaoza.net/trejkaz/
  Jabber ID: trejkaz at jabber.xaoza.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE//5Z0mifzwBMPxxoRAn5dAJ9frgPUkVjFiOhsw1yImvg2PfwKXACgxKHd
yWqUtoeI1bhZAioyxoFISpM=
=mlQB
-----END PGP SIGNATURE-----



More information about the JDev mailing list