Skip to content

Commit

Permalink
added comment to a line that could become a bug in the future
Browse files Browse the repository at this point in the history
  • Loading branch information
Gregory Mullen (grayhatter) committed Sep 5, 2016
1 parent df5ac62 commit daab88d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion toxcore/Messenger.c
Original file line number Diff line number Diff line change
Expand Up @@ -838,7 +838,7 @@ void m_callback_log(Messenger *m, logger_cb *function, void *userdata)
void m_callback_friendrequest(Messenger *m, void (*function)(Messenger *m, const uint8_t *, const uint8_t *, size_t,
void *))
{
callback_friendrequest(&(m->fr), function, m);
callback_friendrequest(&(m->fr), (void (*)(void *, const uint8_t *, const uint8_t *, size_t, void *))function, m);
}

/* Set the function that will be executed when a message from a friend is received. */
Expand Down
3 changes: 3 additions & 0 deletions toxcore/net_crypto.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,6 +1756,9 @@ static int handle_new_connection_handshake(Net_Crypto *c, IP_Port source, const
Crypto_Connection *conn = get_crypto_connection(c, crypt_connection_id);

if (public_key_cmp(n_c.dht_public_key, conn->dht_public_key) != 0) {
/* TODO: we're connected to our own DHT pubkey, in no world is this okay
* at the minimum an assert should be here. Ideally toxcore should exit()
* -- Grayhatter */
connection_kill(c, crypt_connection_id, userdata);
} else {
int ret = -1;
Expand Down

0 comments on commit daab88d

Please sign in to comment.