Minor cleanups.
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3672 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
@ -26,7 +26,7 @@ static void _tf_ssb_connections_changed_callback(tf_ssb_t* ssb, tf_ssb_change_t
|
||||
{
|
||||
case k_tf_ssb_change_create:
|
||||
{
|
||||
char key[ID_BASE64_LEN];
|
||||
char key[k_id_base64_len];
|
||||
if (tf_ssb_connection_get_host(connection) &&
|
||||
*tf_ssb_connection_get_host(connection) &&
|
||||
tf_ssb_connection_get_port(connection) &&
|
||||
@ -39,7 +39,7 @@ static void _tf_ssb_connections_changed_callback(tf_ssb_t* ssb, tf_ssb_change_t
|
||||
break;
|
||||
case k_tf_ssb_change_connect:
|
||||
{
|
||||
char key[ID_BASE64_LEN];
|
||||
char key[k_id_base64_len];
|
||||
if (tf_ssb_connection_get_id(connection, key, sizeof(key)))
|
||||
{
|
||||
tf_ssb_connections_set_succeeded(connections, tf_ssb_connection_get_host(connection), tf_ssb_connection_get_port(connection), key);
|
||||
@ -83,10 +83,10 @@ static void _tf_ssb_connections_timer(uv_timer_t* timer)
|
||||
{
|
||||
char host[256];
|
||||
int port;
|
||||
char key[ID_BASE64_LEN];
|
||||
char key[k_id_base64_len];
|
||||
if (_tf_ssb_connections_get_next_connection(connections, host, sizeof(host), &port, key, sizeof(key)))
|
||||
{
|
||||
uint8_t key_bin[ID_BIN_LEN];
|
||||
uint8_t key_bin[k_id_bin_len];
|
||||
if (tf_ssb_id_str_to_bin(key_bin, key))
|
||||
{
|
||||
tf_ssb_connect(connections->ssb, host, port, key_bin);
|
||||
|
Reference in New Issue
Block a user