forked from cory/tildefriends
A room.attendants left message with no id crashes some other clients. :/
git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4114 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
parent
987b2d539a
commit
3c687dc780
@ -1012,13 +1012,12 @@ static void _tf_ssb_rpc_connections_changed_callback(tf_ssb_t* ssb, tf_ssb_chang
|
|||||||
{
|
{
|
||||||
tf_ssb_remove_blob_want_added_callback(ssb, _tf_ssb_rpc_blob_wants_added_callback, connection);
|
tf_ssb_remove_blob_want_added_callback(ssb, _tf_ssb_rpc_blob_wants_added_callback, connection);
|
||||||
|
|
||||||
JSValue left = JS_NewObject(context);
|
|
||||||
JS_SetPropertyStr(context, left, "type", JS_NewString(context, "left"));
|
|
||||||
char id[k_id_base64_len] = "";
|
char id[k_id_base64_len] = "";
|
||||||
if (tf_ssb_connection_get_id(connection, id, sizeof(id)))
|
if (tf_ssb_connection_get_id(connection, id, sizeof(id)))
|
||||||
{
|
{
|
||||||
|
JSValue left = JS_NewObject(context);
|
||||||
|
JS_SetPropertyStr(context, left, "type", JS_NewString(context, "left"));
|
||||||
JS_SetPropertyStr(context, left, "id", JS_NewString(context, id));
|
JS_SetPropertyStr(context, left, "id", JS_NewString(context, id));
|
||||||
}
|
|
||||||
tf_ssb_connection_t* connections[1024];
|
tf_ssb_connection_t* connections[1024];
|
||||||
int count = tf_ssb_get_connections(ssb, connections, _countof(connections));
|
int count = tf_ssb_get_connections(ssb, connections, _countof(connections));
|
||||||
for (int i = 0; i < count; i++)
|
for (int i = 0; i < count; i++)
|
||||||
@ -1037,6 +1036,7 @@ static void _tf_ssb_rpc_connections_changed_callback(tf_ssb_t* ssb, tf_ssb_chang
|
|||||||
}
|
}
|
||||||
JS_FreeValue(context, left);
|
JS_FreeValue(context, left);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void tf_ssb_rpc_register(tf_ssb_t* ssb)
|
void tf_ssb_rpc_register(tf_ssb_t* ssb)
|
||||||
|
Loading…
Reference in New Issue
Block a user