Permalink
Browse files

Fix wrongly handled absence of candidates

Accoding to json-glib documentation: https://developer.gnome.org/json-glib/stable/JsonReader.html

"If reader is not currently on an object, or if the member_name is not defined in the object, the JsonReader will be put in an error state until json_reader_end_member() is called. This means that if used conditionally, json_reader_end_member() must be called on both code paths."

Closes #665.
  • Loading branch information...
danielOBS authored and superdump committed Dec 21, 2016
1 parent 3a22666 commit 4d89381a7562e5270d506124542da7fb068c0769
Showing with 1 addition and 1 deletion.
  1. +1 −1 tests/test_client.c
View
@@ -583,8 +583,8 @@ static void handle_offer(JsonReader *reader)
g_object_unref(remote_candidate);
json_reader_end_element(reader);
}
json_reader_end_member(reader); /* candidates */
}
json_reader_end_member(reader); /* candidates */
json_reader_end_member(reader); /* ice */
json_reader_end_element(reader);

0 comments on commit 4d89381

Please sign in to comment.