[mirrorbrain-commits] r8159 - /trunk/mod_mirrorbrain/mod_mirrorbrain.c

From: <poeml_at_mirrorbrain.org>
Date: Sat, 25 Sep 2010 02:25:47 -0000
Author: poeml
Date: Sat Sep 25 04:25:47 2010
New Revision: 8159

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8159&view=rev
Log:
mod_mirrorbrain:
- In torrents, the nodes key should be inserted in lexicographical order. Closing issue #78.

Modified:
    trunk/mod_mirrorbrain/mod_mirrorbrain.c

Modified: trunk/mod_mirrorbrain/mod_mirrorbrain.c
URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain/trunk/mod_mirrorbrain/mod_mirrorbrain.c?rev=8159&r1=8158&r2=8159&view=diff
==============================================================================
--- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original)
+++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Sat Sep 25 04:25:47 2010
_at_@ -2861,6 +2861,18 @@
         /* end of info hash: */
         ap_rputs(             "e", r);
 
+        if (!apr_is_empty_array(scfg->dhtnodes)) {
+
+            ap_rputs(     "5:nodes"
+                              "l", r);
+            for (i = 0; i < scfg->dhtnodes->nelts; i++) {
+                dhtnode_t node = ((dhtnode_t *) scfg->dhtnodes->elts)[i];
+                ap_rprintf(r,     "l" "%d:%s" "i%de" "e", strlen(node.name), node.name, 
+                                                         node.port);
+            }
+            ap_rputs(     "e", r);
+        }
+
         /* Web seeds
          *
          * There's a trick: send this stuff _after_ the sha1 pieces. 
_at_@ -2948,17 +2960,6 @@
             }
         }
 
-        if (!apr_is_empty_array(scfg->dhtnodes)) {
-
-            ap_rputs(     "e"
-                          "5:nodes"
-                              "l", r);
-            for (i = 0; i < scfg->dhtnodes->nelts; i++) {
-                dhtnode_t node = ((dhtnode_t *) scfg->dhtnodes->elts)[i];
-                ap_rprintf(r,     "l" "%d:%s" "i%de" "e", strlen(node.name), node.name, 
-                                                         node.port);
-            }
-        }
         ap_rputs(         "e", r);
 
         ap_rputs(     "e", r);




_______________________________________________
mirrorbrain-commits mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain-commits/

Note: To remove yourself from this list, send a mail with the content
 	unsubscribe
to the address mirrorbrain-commits-request_at_mirrorbrain.org
Received on Sat Sep 25 2010 - 02:25:49 GMT

This archive was generated by hypermail 2.3.0 : Mon Feb 20 2012 - 23:47:04 GMT