]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
move the assert higher up so the error message makes more sense
authorRoger Dingledine <arma@torproject.org>
Sat, 26 Mar 2005 06:27:51 +0000 (06:27 +0000)
committerRoger Dingledine <arma@torproject.org>
Sat, 26 Mar 2005 06:27:51 +0000 (06:27 +0000)
next time.

svn:r3887

src/or/connection_edge.c

index 019cdca0239f5e51eacea223b8d374a50f0f0756..fadb53c268e1f172d635b77cad399f387181ff83 100644 (file)
@@ -1218,11 +1218,11 @@ void connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
                                          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;