[JDEV] JUD having problems loading global.xdb file upon server restart.. .

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


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/7f4d38a5/attachment-0002.htm>


More information about the JDev mailing list