[JDEV] RE: JUD having problems loading global.xdb file upon server resta rt...

CROSSWHITE,JOHN (Non-HP-Corvallis,ex1) john_crosswhite at non.hp.com
Wed Aug 7 15:31:46 CDT 2002


 

Oh and please respond to my address, I am not subscribed to your list...
yet.

 

John

 

-----Original Message-----
From: CROSSWHITE,JOHN (Non-HP-Corvallis,ex1) 
Sent: Wednesday, August 07, 2002 1:31 PM
To: 'jdev at jabber.org'
Subject: JUD having problems loading global.xdb file upon server restart...

 

Hello everyone.  I'm running jabber1.4.2 and jud0.4 on redhat 7.2.

 

Here is the behavior I'm experiencing:

 

Start jabberd.

Start a client and connect.

Register with the jud.

Perform a search and my jud entry can be found.

Restart server.

Start a client and connect.

Perform a search and my jud entry cannot be found.

 

If I reregister, the ./spool/jud/global.xdb file is updated correctly
without being overwritten.  However, if I perform a search, I can only find
users that have registered since the last server restart.  Even though their
entries are still in the global.xdb file.

 

So, I went digging into the code.  I think the culprit may be xdb_get and I
wanted to see what you guys thought.  In the file xdb.c find the function
xdb_get.  It would appear that this function ALWAYS returns null.  And this
may be the reason why the information in global.xdb isn't being loaded
correctly.

 

Here is a copy of what I think the offending code is:

 

    /* return the xmlnode inside <xdb>...</xdb> */

    for(x = xmlnode_get_firstchild(newx.data); x != NULL &&
xmlnode_get_type(x) != NTYPE_TAG; x = xmlnode_get_nextsibling(x));

 

    /* there were no children (results) to the xdb request, free the packet
*/

    if(x == NULL)

        xmlnode_free(newx.data);

 

    return x;

 

The for loop will always ensure that x is NULL after it has run.  Therefore,
the return x statement is always going to return NULL.  Am I incorrect in my
interpretation?  Wouldn't this break loading of the global.xdb file?

 

Thanks for any information you might be able to provide.  I've been banging
my head against this for a few days now.

 

John Crosswhite

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.jabber.org/jdev/attachments/20020807/47bf8246/attachment-0002.htm>


More information about the JDev mailing list