[tor-commits] [obfsproxy/master] Trivial documentation changes.

nickm at torproject.org nickm at torproject.org
Wed Apr 27 00:17:45 UTC 2011


commit fc248868cf653e33cec3380a8631d4c682d85fd1
Author: George Kadianakis <desnacked at gmail.com>
Date:   Wed Apr 13 19:49:15 2011 +0200

    Trivial documentation changes.
---
 src/protocol.c |    5 +++--
 src/protocol.h |    8 ++++----
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/src/protocol.c b/src/protocol.c
index b95ab11..2195b29 100644
--- a/src/protocol.c
+++ b/src/protocol.c
@@ -25,8 +25,9 @@ set_up_protocol(int protocol) {
 }
 
 /**
-   This function initializes a protocol. It creates a new
-   protocol_t structure and fills it's vtable etc.
+   This function creates a protocol object. It's called once
+   for every connection. It creates a new protocol_t structure
+   and fills it's vtable etc.
    Return the protocol_t if successful, NULL otherwise.
 */
 struct protocol_t *
diff --git a/src/protocol.h b/src/protocol.h
index 7ec430c..dd34585 100644
--- a/src/protocol.h
+++ b/src/protocol.h
@@ -15,16 +15,16 @@ int proto_recv(struct protocol_t *proto, void *source, void *dest);
 
 
 typedef struct protocol_vtable {
-  /* Constructor: creates the protocol; sets up functions etc. */
+  /* Initialization function: Fills in the protocol vtable. */
   int (*init)(struct protocol_t *self);
-  /* Destructor */
+  /* Destructor: Destroys the protocol state.  */
   void (*destroy)(void *state);
 
-  /* does nessesary initiation steps; like build a proto state etc. */
+  /* Constructor: Creates a protocol object. */
   void *(*create)(struct protocol_t *proto_struct,
                   int is_initiator);
 
-  /* does handshake. Supposedly all protocols have a handshake. */
+  /* does handshake. Not all protocols have a handshake. */
   int (*handshake)(void *state,
                    struct evbuffer *buf);
 





More information about the tor-commits mailing list