move the assert higher up so the error message makes more sense

next time.


svn:r3887
This commit is contained in:
Roger Dingledine 2005-03-26 06:27:51 +00:00
parent fcfe6d2e8b
commit 4533a46e41

View File

@ -1218,11 +1218,11 @@ void connection_ap_handshake_socks_reply(connection_t *conn, char *reply,
size_t replylen, size_t replylen,
socks5_reply_status_t status) { socks5_reply_status_t status) {
char buf[256]; char buf[256];
tor_assert(conn->socks_request); /* make sure it's an AP stream */
control_event_stream_status(conn, control_event_stream_status(conn,
status==SOCKS5_SUCCEEDED ? STREAM_EVENT_SUCCEEDED : STREAM_EVENT_FAILED); status==SOCKS5_SUCCEEDED ? STREAM_EVENT_SUCCEEDED : STREAM_EVENT_FAILED);
tor_assert(conn->socks_request);
if (conn->socks_request->has_finished) { if (conn->socks_request->has_finished) {
log_fn(LOG_WARN, "Harmless bug: duplicate calls to connection_ap_handshake_socks_reply."); log_fn(LOG_WARN, "Harmless bug: duplicate calls to connection_ap_handshake_socks_reply.");
return; return;