[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] bugfix: parse_addr_port() bites us again -- it returns addr...



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	rendservice.c 
Log Message:
bugfix: parse_addr_port() bites us again -- it returns addr in network order.


Index: rendservice.c
===================================================================
RCS file: /home/or/cvsroot/src/or/rendservice.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -d -r1.89 -r1.90
--- rendservice.c	14 Oct 2004 03:18:14 -0000	1.89
+++ rendservice.c	14 Oct 2004 08:45:07 -0000	1.90
@@ -165,13 +165,13 @@
       log_fn(LOG_WARN, "Port out of range");
       return NULL;
     }
-    addr = 0x7F000001u; /* Default to 127.0.0.1 */
+    addr = htonl(0x7F000001u); /* Default to 127.0.0.1 */
   }
 
   result = tor_malloc(sizeof(rend_service_port_config_t));
   result->virtual_port = virtport;
   result->real_port = realport;
-  result->real_address = addr;
+  result->real_address = ntohl(addr);
   return result;
 }