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

From: <poeml_at_mirrorbrain.org>
Date: Sat, 25 Sep 2010 01:53:58 -0000
Author: poeml
Date: Sat Sep 25 03:53:57 2010
New Revision: 8156

URL: http://svn.mirrorbrain.org/viewvc/mirrorbrain?rev=8156&view=rev
Log:
mod_mirrorbrain:
- The MD5 sum in Torrent info hashes must be hex-encoded, not binary. The key
  was named "md5" but should be named "md5sum". Fixing issue #77.

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=8156&r1=8155&r2=8156&view=diff
==============================================================================
--- trunk/mod_mirrorbrain/mod_mirrorbrain.c (original)
+++ trunk/mod_mirrorbrain/mod_mirrorbrain.c Sat Sep 25 03:53:57 2010
_at_@ -2848,10 +2848,8 @@
         for (i = 0; i < hashbag->sha1pieceshex->nelts; i++) {
             ap_rwrite(hex_decode(r, p[i], SHA1_DIGESTSIZE), SHA1_DIGESTSIZE, r);
         }
-        ap_rprintf(r,             "3:md5"
-                                      "%d:", MD5_DIGESTSIZE);
-        ap_rwrite(                    hex_decode(r, hashbag->md5hex, MD5_DIGESTSIZE), 
-                MD5_DIGESTSIZE, r);
+        ap_rprintf(r,             "6:md5sum"
+                                      "%d:%s", MD5_DIGESTSIZE * 2, hashbag->md5hex);
         ap_rprintf(r,             "4:sha1"
                                       "%d:", SHA1_DIGESTSIZE);
         ap_rwrite(                    hex_decode(r, hashbag->sha1hex, SHA1_DIGESTSIZE), 




_______________________________________________
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 - 01:54:01 GMT

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