Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
mwarning committed Aug 18, 2018
1 parent 37bf75b commit 992498b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/announces.c
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,20 @@ struct value_t *announces_add(const char query[], int port, time_t lifetime)

// Get id from query
#ifdef BOB
// base32 or base64
if (ret == EXIT_FAILURE) {
ret = bob_get_id(id, sizeof(id), query);
}
#endif

#ifdef TLS
// contains dot (.p2p is already removed here) => sha256 hash
if (ret == EXIT_FAILURE) {
ret = tls_client_get_id(id, sizeof(id), query);
}
#endif

// base32 or base64
if (ret == EXIT_FAILURE) {
ret = hex_get_id(id, sizeof(id), query);
}
Expand Down

0 comments on commit 992498b

Please sign in to comment.