qrt_build_query_target() has the following lines...

    gboolean process_ultra = FALSE;
...
    /*
     * We need to special case processing of queries with TTL=1 so that they
     * get set to ultra peers that support last-hop QRP only if they can
     * provide a reply.  Ultrapeers that don't support last-hop QRP will
     * always get the query.
     */

    process_ultra = (ttl == 1);

    for (sl = node_all_nodes(); sl; sl = g_slist_next(sl)) {
...
        if (is_leaf) {
            /* Leaf node */
            if (rt == NULL)             /* No QRT yet */
                continue;               /* Don't send anything */
        } else {
            /* Ultra node */
            if (!process_ultra)
                continue;
            if (ttl == 0)               /* Message expired here */
                continue;               /* Don't forward to non-leaves */
...

I think the last two translate to,

            if(!(ttl == 1))      /* (ttl != 1) */ 
                continue;
            if(ttl == 0)         /* TTL must be one here? */
                continue;
 
Maybe I am up too late ;-).  I guess the second test never needs to be
made.  However, it doesn't look like we would forward query requests
with a TTL greater than one?  Is this impossible to have a ttl greater
than one?

Sorry if this is obvious.  Something seems a little weird to me.

Regards,
Bill Pringlemeir.




-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
Gtk-gnutella-devel mailing list
Gtk-gnutella-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gtk-gnutella-devel

Reply via email to