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

[or-cvs] move the assert higher up so the error message makes more s...



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

Modified Files:
	connection_edge.c 
Log Message:
move the assert higher up so the error message makes more sense
next time.


Index: connection_edge.c
===================================================================
RCS file: /home2/or/cvsroot/tor/src/or/connection_edge.c,v
retrieving revision 1.306
retrieving revision 1.307
diff -u -d -r1.306 -r1.307
--- connection_edge.c	24 Mar 2005 01:11:28 -0000	1.306
+++ connection_edge.c	26 Mar 2005 06:27:51 -0000	1.307
@@ -1218,11 +1218,11 @@
                                          size_t replylen,
                                          socks5_reply_status_t status) {
   char buf[256];
+  tor_assert(conn->socks_request); /* make sure it's an AP stream */
 
   control_event_stream_status(conn,
      status==SOCKS5_SUCCEEDED ? STREAM_EVENT_SUCCEEDED : STREAM_EVENT_FAILED);
 
-  tor_assert(conn->socks_request);
   if (conn->socks_request->has_finished) {
     log_fn(LOG_WARN, "Harmless bug: duplicate calls to connection_ap_handshake_socks_reply.");
     return;