[or-cvs] Handle rendezvous relay cells
Nick Mathewson
nickm at seul.org
Sat Apr 3 03:37:13 UTC 2004
Update of /home/or/cvsroot/src/common
In directory moria.mit.edu:/tmp/cvs-serv23523/src/common
Modified Files:
util.h
Log Message:
Handle rendezvous relay cells
Index: util.h
===================================================================
RCS file: /home/or/cvsroot/src/common/util.h,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -d -r1.47 -r1.48
--- util.h 3 Apr 2004 00:58:53 -0000 1.47
+++ util.h 3 Apr 2004 03:37:11 -0000 1.48
@@ -68,15 +68,17 @@
((*(((uint8_t*)(cp))+3)) ) )
#define set_uint16(cp,v) \
do { \
+ uint16_t u16v = (v); \
*(((uint8_t*)(cp))+0) = (v >> 8)&0xff; \
*(((uint8_t*)(cp))+1) = (v >> 0)&0xff; \
} while (0)
-#define set_uint32(cp,v) \
+#define set_uint32(cp,val) \
do { \
- *(((uint8_t*)(cp))+0) = (v >> 24)&0xff; \
- *(((uint8_t*)(cp))+1) = (v >> 16)&0xff; \
- *(((uint8_t*)(cp))+2) = (v >> 8)&0xff; \
- *(((uint8_t*)(cp))+3) = (v >> 0)&0xff; \
+ uint32_t u32v = (v); \
+ *(((uint8_t*)(cp))+0) = s32 >> 24)&0xff; \
+ *(((uint8_t*)(cp))+1) = s32 >> 16)&0xff; \
+ *(((uint8_t*)(cp))+2) = s32 >> 8)&0xff; \
+ *(((uint8_t*)(cp))+3) = s32 >> 0)&0xff; \
} while (0)
#endif
#endif
@@ -197,5 +199,12 @@
#define correct_socket_errno(s) (errno)
#endif
-
#endif
+
+/*
+ Local Variables:
+ mode:c
+ indent-tabs-mode:nil
+ c-basic-offset:2
+ End:
+*/
More information about the tor-commits
mailing list