summaryrefslogtreecommitdiffstats
path: root/cgi/cgihttpscriptptr.c
diff options
context:
space:
mode:
authorSam Varshavchik2020-04-06 23:05:23 -0400
committerSam Varshavchik2020-04-06 23:20:09 -0400
commite7b9dfe7c3f940625941ca725d403677c744c671 (patch)
tree13f9dc550e3ba34d0238cf68b7c290ff106670f0 /cgi/cgihttpscriptptr.c
parent80a7d970578c67841992bd3ba609e833767be573 (diff)
downloadcourier-libs-e7b9dfe7c3f940625941ca725d403677c744c671.tar.bz2
Refactor rfc1035_query_udp (1/2).
The struct rfc1035_udp_query_responses collects multiple UDP responses to concurrent UDP queries. rfc1035_udp_query_response_alloc() allocates it. rfc1035_udp_query_response_free() deletes it. Nobody else cares about rfc1035_recv_udp, make it static. The existing rfc1035_recv_udp code gets renamed as rfc1035_recv_one_udp_response, and receives a rfc1035_udp_query_responses pointer, and instead of returning a response, and its buflen, it reads a response, and finds an unanswered query, in rfc1035_udp_query_responses, for which this response is receives, and saves it there: loop over each query, and if it doesn't have its response yet, and the response's serial number matches the query's, store the query there, else throw it away. The replacement rfc1035_recv_udp wrapper rfc1035_udp_query_response_alloc-s, rfc1035_recv_one_udp_response, and fetches the received response out of it. then rfc1035_udp_query_response_free()s.
Diffstat (limited to 'cgi/cgihttpscriptptr.c')
0 files changed, 0 insertions, 0 deletions