From: Nick Mathewson Date: Wed, 16 Mar 2011 21:09:32 +0000 (-0400) Subject: Merge remote-tracking branch 'origin/maint-0.2.2' X-Git-Tag: tor-0.2.3.1-alpha~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57b954293e3880f3b39d2f0f0f7710250e8ffc5f;p=thirdparty%2Ftor.git Merge remote-tracking branch 'origin/maint-0.2.2' Trivial Conflicts in src/common/crypto.c src/or/main.h src/or/or.h --- 57b954293e3880f3b39d2f0f0f7710250e8ffc5f diff --cc src/common/crypto.c index 587a83ad8a,ed434a312e..fd0a494e76 --- a/src/common/crypto.c +++ b/src/common/crypto.c @@@ -2684,3 -2709,4 +2709,6 @@@ setup_openssl_threading(void return 0; } #endif + /** @} */ ++ ++ diff --cc src/or/main.h index 49ed5fea55,ed0fb97703..ca3f641cef --- a/src/or/main.h +++ b/src/or/main.h @@@ -24,13 -22,12 +24,15 @@@ void add_connection_to_closeable_list(c int connection_is_on_closeable_list(connection_t *conn); smartlist_t *get_connection_array(void); +uint64_t get_bytes_read(void); +uint64_t get_bytes_written(void); + /** Bitmask for events that we can turn on and off with + * connection_watch_events. */ typedef enum watchable_events { + /* Yes, it is intentional that these match Libevent's EV_READ and EV_WRITE */ - READ_EVENT=0x02, - WRITE_EVENT=0x04 + READ_EVENT=0x02, /**< We want to know when a connection is readable */ + WRITE_EVENT=0x04 /**< We want to know when a connection is writable */ } watchable_events_t; void connection_watch_events(connection_t *conn, watchable_events_t events); int connection_is_reading(connection_t *conn); diff --cc src/or/or.h index 553afbdb7b,e3e01cff55..6d06b85e98 --- a/src/or/or.h +++ b/src/or/or.h @@@ -860,10 -848,14 +860,14 @@@ typedef struct cell_t /** Parsed variable-length onion routing cell. */ typedef struct var_cell_t { + /** Type of the cell: CELL_VERSIONS, etc. */ uint8_t command; + /** Circuit thich received the cell */ circid_t circ_id; - uint16_t payload_len; /**< The actual length of payload. */ + /** Number of bytes actually stored in payload */ + uint16_t payload_len; + /** Payload of this cell */ - uint8_t payload[1]; + uint8_t payload[FLEXIBLE_ARRAY_MEMBER]; } var_cell_t; /** A cell as packed for writing to the network. */