comment fixes after review.

git-svn-id: file:///svn/unbound/trunk@5036 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2019-01-15 13:42:22 +00:00
parent 0d2efc3f3f
commit ec6f4bab46
4 changed files with 10 additions and 5 deletions

View 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) {

View 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.

View 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) {

View 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);