diff --git a/src/tox-weechat-tox.c b/src/tox-weechat-tox.c index 4dd370c..39e662e 100644 --- a/src/tox-weechat-tox.c +++ b/src/tox-weechat-tox.c @@ -210,12 +210,14 @@ tox_weechat_status_message_callback(Tox *tox, tox_weechat_chat_refresh_timer_callback, chat); } -void +int tox_weechat_bootstrap(char *address, uint16_t port, char *public_key) { uint8_t *binary_key = tox_weechat_hex2bin(public_key); - tox_bootstrap_from_address(tox, address, htons(port), binary_key); + int result = tox_bootstrap_from_address(tox, address, htons(port), binary_key); free(binary_key); + + return result; } void diff --git a/src/tox-weechat-tox.h b/src/tox-weechat-tox.h index 45255ac..1d39e32 100644 --- a/src/tox-weechat-tox.h +++ b/src/tox-weechat-tox.h @@ -11,7 +11,7 @@ void tox_weechat_tox_init(); /** * Bootstrap DHT using an inet address, port and a Tox address. */ -void tox_weechat_bootstrap(char *address, uint16_t port, char *public_key); +int tox_weechat_bootstrap(char *address, uint16_t port, char *public_key); /** * Dump Tox to file and de-initialize.