summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index f16002f4..ca81cbbc 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -1526,7 +1526,7 @@ void tox_self_get_dht_id(const Tox *tox, uint8_t *dht_id)
1526uint16_t tox_self_get_udp_port(const Tox *tox, TOX_ERR_GET_PORT *error) 1526uint16_t tox_self_get_udp_port(const Tox *tox, TOX_ERR_GET_PORT *error)
1527{ 1527{
1528 const Messenger *m = tox; 1528 const Messenger *m = tox;
1529 uint16_t port = net_htons(m->net->port); 1529 uint16_t port = net_htons(net_port(m->net));
1530 1530
1531 if (port) { 1531 if (port) {
1532 SET_ERROR_PARAMETER(error, TOX_ERR_GET_PORT_OK); 1532 SET_ERROR_PARAMETER(error, TOX_ERR_GET_PORT_OK);