]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
comment fixes after review.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 15 Jan 2019 13:42:22 +0000 (13:42 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Tue, 15 Jan 2019 13:42:22 +0000 (13:42 +0000)
git-svn-id: file:///svn/unbound/trunk@5036 be551aaa-1e26-0410-a405-d3ace91eadb9

services/listen_dnsport.c
services/listen_dnsport.h
services/mesh.c
services/mesh.h

index b931d17b3228de1cc767a408199c606a740accab..711319e16747982fdfb917470b914bde791451ff 100644 (file)
@@ -1818,8 +1818,9 @@ tcp_req_info_send_reply(struct tcp_req_info* req)
                return;
        }
        /* now that the query has been handled, that mesh_reply entry
-        * should be removed, from the tcp_req_info list */
-       /* TODO: find it, need mstate ptr */
+        * should be removed, from the tcp_req_info list,
+        * the mesh state cleanup removes then with region_cleanup and
+        * replies_sent true. */
        /* see if we can send it straight away (we are not doing
         * anything else).  If so, copy to buffer and start */
        if(req->cp->tcp_is_reading && req->cp->tcp_byte_count == 0) {
index 653413bc6cfbff8698e44db9a4bea5f3664e3f5c..07cb64d17919d60e13e1c9a96fff185d793b4351 100644 (file)
@@ -326,11 +326,13 @@ void tcp_req_info_remove_mesh_state(struct tcp_req_info* req,
 
 /**
  * Handle write done of the last result packet
+ * @param req: the tcp req info.
  */
 void tcp_req_info_handle_writedone(struct tcp_req_info* req);
 
 /**
  * Handle read done of a new request from the client
+ * @param req: the tcp req info.
  */
 void tcp_req_info_handle_readdone(struct tcp_req_info* req);
 
@@ -338,7 +340,7 @@ void tcp_req_info_handle_readdone(struct tcp_req_info* req);
  * Add mesh state to the tcp req list of open requests.
  * So the comm_reply can be removed off the mesh reply list when
  * the tcp channel has to be closed (for other reasons then that that
- * request was done, eg. channel closed by client or some format error.
+ * request was done, eg. channel closed by client or some format error).
  * @param req: tcp req info structure.  It keeps track of the simultaneous
  *     requests and results on a tcp (or TLS) channel.
  * @param mesh: mesh area for the state.
index 5ffef7714e617b2e4662cbd2d2d370eb67a8fb82..bee0f76a4ad6fc6c81b90986ae70e83761ea78d6 100644 (file)
@@ -1636,6 +1636,8 @@ void mesh_state_remove_reply(struct mesh_area* mesh, struct mesh_state* m,
 {
        struct mesh_reply* n, *prev = NULL;
        n = m->reply_list;
+       /* when in mesh_cleanup, it sets the reply_list to NULL, so that
+        * there is no accounting twice */
        if(!n) return; /* nothing to remove, also no accounting needed */
        while(n) {
                if(n->query_reply.c == cp) {
index e11c06bf4e013a33010858e8e4c2fd5edfac22c2..6946eb5fa48e0671e1ef10baae12b7e2fa916665 100644 (file)
@@ -635,10 +635,10 @@ void mesh_list_remove(struct mesh_state* m, struct mesh_state** fp,
 
 /**
  * Remove mesh reply entry from the reply entry list.  Searches for
- * the repinfo pointer.
+ * the comm_point pointer.
  * @param mesh: to update the counters.
  * @param m: the mesh state.
- * @param cp: the commpoint to remove from the list.
+ * @param cp: the comm_point to remove from the list.
  */
 void mesh_state_remove_reply(struct mesh_area* mesh, struct mesh_state* m,
        struct comm_point* cp);