summaryrefslogtreecommitdiff
path: root/toxcore/DHT.c
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2013-09-17 20:06:33 -0400
committerirungentoo <irungentoo@gmail.com>2013-09-17 20:06:33 -0400
commit7c5b98397a85394add318cf897eb5b78703e55ea (patch)
tree3a30952c38c4a52e726467723b59c58c681a7d2f /toxcore/DHT.c
parent9ce1828facc5e344d9de7bc6900bd378de99a425 (diff)
parent5a83c1296cee5b0bfaae564896f56d78ae265fbc (diff)
Merge branch 'group-chat'
Diffstat (limited to 'toxcore/DHT.c')
-rw-r--r--toxcore/DHT.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/toxcore/DHT.c b/toxcore/DHT.c
index f38ce3a5..84c00c70 100644
--- a/toxcore/DHT.c
+++ b/toxcore/DHT.c
@@ -1579,6 +1579,7 @@ void DHT_save(DHT *dht, uint8_t *data)
1579 len = num * sizeof(Client_data); 1579 len = num * sizeof(Client_data);
1580 type = DHT_STATE_TYPE_CLIENTS; 1580 type = DHT_STATE_TYPE_CLIENTS;
1581 data = z_state_save_subheader(data, len, type); 1581 data = z_state_save_subheader(data, len, type);
1582
1582 if (num) { 1583 if (num) {
1583 Client_data *clients = (Client_data *)data; 1584 Client_data *clients = (Client_data *)data;
1584 1585
@@ -1586,6 +1587,7 @@ void DHT_save(DHT *dht, uint8_t *data)
1586 if (dht->close_clientlist[i].timestamp != 0) 1587 if (dht->close_clientlist[i].timestamp != 0)
1587 memcpy(&clients[num++], &dht->close_clientlist[i], sizeof(Client_data)); 1588 memcpy(&clients[num++], &dht->close_clientlist[i], sizeof(Client_data));
1588 } 1589 }
1590
1589 data += len; 1591 data += len;
1590} 1592}
1591 1593