summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Schütz <schuetzm@gmx.net>2014-06-13 22:18:18 +0200
committerMarc Schütz <schuetzm@gmx.net>2014-06-13 22:18:18 +0200
commit5a34595f58d0739d60d363c7f6557665e85eeb18 (patch)
treecf882ae8377eed74fb48817a9ed18d90774a4e1a
parent6d7a4d3746c679a1f78547ef02b5ca5fba3aab5e (diff)
Const correctness in toxcore/onion_client.c
-rw-r--r--toxcore/onion_client.c2
-rw-r--r--toxcore/onion_client.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/toxcore/onion_client.c b/toxcore/onion_client.c
index 1fe54d85..630882cc 100644
--- a/toxcore/onion_client.c
+++ b/toxcore/onion_client.c
@@ -530,7 +530,7 @@ static int handle_fakeid_announce(void *object, const uint8_t *source_pubkey, co
530 * return the number of packets sent on success 530 * return the number of packets sent on success
531 * return -1 on failure. 531 * return -1 on failure.
532 */ 532 */
533int send_onion_data(Onion_Client *onion_c, int friend_num, uint8_t *data, uint32_t length) 533int send_onion_data(const Onion_Client *onion_c, int friend_num, const uint8_t *data, uint32_t length)
534{ 534{
535 if ((uint32_t)friend_num >= onion_c->num_friends) 535 if ((uint32_t)friend_num >= onion_c->num_friends)
536 return -1; 536 return -1;
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h
index df7be2ef..a74783f6 100644
--- a/toxcore/onion_client.h
+++ b/toxcore/onion_client.h
@@ -212,7 +212,7 @@ uint64_t onion_getfriend_DHT_pubkey(Onion_Client *onion_c, int friend_num, uint8
212 * return the number of packets sent on success 212 * return the number of packets sent on success
213 * return -1 on failure. 213 * return -1 on failure.
214 */ 214 */
215int send_onion_data(Onion_Client *onion_c, int friend_num, uint8_t *data, uint32_t length); 215int send_onion_data(const Onion_Client *onion_c, int friend_num, const uint8_t *data, uint32_t length);
216 216
217/* Function to call when onion data packet with contents beginning with byte is received. */ 217/* Function to call when onion data packet with contents beginning with byte is received. */
218void oniondata_registerhandler(Onion_Client *onion_c, uint8_t byte, oniondata_handler_callback cb, void *object); 218void oniondata_registerhandler(Onion_Client *onion_c, uint8_t byte, oniondata_handler_callback cb, void *object);