diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-18 13:00:48 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-18 13:00:48 -0400 |
commit | ba5d75810493f237edbb7f4f149d61f1ca08e605 (patch) | |
tree | 906dc1a9cfebd1c6bbe8ea8a4f9d4576f6e079da /src/or | |
parent | 326d5c156dce64c115a76427a4dabb0e93a90033 (diff) | |
download | tor-ba5d75810493f237edbb7f4f149d61f1ca08e605.tar.gz tor-ba5d75810493f237edbb7f4f149d61f1ca08e605.zip |
Initial optimistic_client fixes
- Conform to make check-spaces
- Build without warnings from passing size_t to %d
- Use connection_get_inbuf_len(), not buf_datalen (otherwise bufferevents
won't work).
- Don't log that we're using this feature at warn.
Diffstat (limited to 'src/or')
-rw-r--r-- | src/or/connection_edge.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/or/connection_edge.c b/src/or/connection_edge.c index 7551c39439..6f91d1a293 100644 --- a/src/or/connection_edge.c +++ b/src/or/connection_edge.c @@ -165,8 +165,10 @@ connection_edge_process_inbuf(edge_connection_t *conn, int package_partial) return 0; case AP_CONN_STATE_CONNECT_WAIT: log_info(LD_EDGE, - "data from edge while in '%s' state. Sending it anyway. package_partial=%d, buflen=%d", - conn_state_to_string(conn->_base.type, conn->_base.state), package_partial, buf_datalen(TO_CONN(conn)->inbuf)); + "data from edge while in '%s' state. Sending it anyway. " + "package_partial=%d, buflen=%ld", + conn_state_to_string(conn->_base.type, conn->_base.state), + package_partial, connection_get_inbuf_len(TO_CONN(conn))); if (connection_edge_package_raw_inbuf(conn, package_partial, NULL) < 0) { /* (We already sent an end cell if possible) */ connection_mark_for_close(TO_CONN(conn)); @@ -2406,7 +2408,8 @@ connection_ap_handshake_send_begin(edge_connection_t *ap_conn) control_event_stream_status(ap_conn, STREAM_EVENT_SENT_CONNECT, 0); /* If there's queued-up data, send it now */ - log_warn(LD_APP, "Possibly sending queued-up data: %d", buf_datalen(TO_CONN(ap_conn)->inbuf)); + log_info(LD_APP, "Possibly sending queued-up data: %ld", + connection_get_inbuf_len(TO_CONN(ap_conn))); if (connection_edge_package_raw_inbuf(ap_conn, 1, NULL) < 0) { connection_mark_for_close(TO_CONN(ap_conn)); } |