Commit cb325792 authored by Karel Slaný's avatar Karel Slaný Committed by Ondřej Surý

Fixed and deleted some commentaries.

parent ebabbad8
......@@ -473,7 +473,7 @@ static bool subreq_update_cookies(struct qr_task *task, uv_udp_t *handle,
* uv_udp_init(). The uv_udp_getsockname() fails because of the lazy
* socket initialisation.
*
* TODO -- A solution might be opening a separate socket and trying
* @note -- A solution might be opening a separate socket and trying
* to obtain the IP address from it.
*/
struct sockaddr_storage sockaddr = {0, };
......
......@@ -22,7 +22,7 @@
#include "lib/defines.h"
/** Client algorithm identifiers are used as index into this array of pointers. */
/** Client algorithm identifiers are used to index this array of pointers. */
KR_EXPORT
extern const struct knot_cc_alg *const kr_cc_algs[];
......@@ -30,7 +30,7 @@ extern const struct knot_cc_alg *const kr_cc_algs[];
KR_EXPORT
extern const knot_lookup_t kr_cc_alg_names[];
/** Server algorithm identifiers are used as index into this array of pointers. */
/** Server algorithm identifiers are used to index this array of pointers. */
KR_EXPORT
extern const struct knot_sc_alg *const kr_sc_algs[];
......
......@@ -21,10 +21,10 @@
#include "lib/defines.h"
/** FNV-64 client cookie algorithm. */
/** HMAC-SHA256-64 client cookie algorithm. */
KR_EXPORT
extern const struct knot_cc_alg knot_cc_alg_hmac_sha256_64;
/** FNV-64 server cookie algorithm. */
/** HMAC-SHA256-64 server cookie algorithm. */
KR_EXPORT
extern const struct knot_sc_alg knot_sc_alg_hmac_sha256_64;
......@@ -119,9 +119,8 @@ int kr_request_put_cookie(const struct kr_cookie_comp *clnt_comp,
return kr_error(EINVAL);
}
/* Generate client cookie.
* TODO -- generate client cookie from client address, server address
* and secret quantity. */
/* Generate client cookie from client address, server address and
* secret quantity. */
struct knot_cc_input input = {
.clnt_sockaddr = clnt_sa,
.srvr_sockaddr = srvr_sa,
......
......@@ -31,7 +31,7 @@ struct kr_nonce_input {
};
/**
* @brief Writes server cookie nonce balue into given buffer.
* @brief Writes server cookie nonce value into given buffer.
*
* @param buf buffer to write nonce data in wire format into
* @param buf_len on input contains nonce buffer size, on output contains
......
......@@ -530,8 +530,8 @@ int kr_resolve_consume(struct kr_request *request, const struct sockaddr *src, k
#if defined(ENABLE_COOKIES)
if (src && !(qry->flags & QUERY_CACHED)) {
/* Track response source.
* TODO -- Find a more suitable place to put the source address
* into query/response context. */
* @todo -- Find a more suitable place to put the source
* address into query/response context. */
switch (src->sa_family) {
case AF_INET:
qry->rsource.ip4 = *(struct sockaddr_in *) src;
......
......@@ -32,9 +32,6 @@
#define DEBUG_MSG(qry, fmt...) QRDEBUG(qry, "cookies", fmt)
/* TODO -- The context must store sent cookies and server addresses in order
* to make the process more reliable. */
/**
* Obtain address from query/response context if if can be obtained.
* @param qry query context
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment