Error log for this situation is also added.
[Version] 0.4.48
[Issue Type] Improvement
Change-Id: I6035f5dd3ce04029b39f601a298c942ec97b62f4
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
Name: capi-media-webrtc
Summary: A WebRTC library in Tizen Native API
-Version: 0.4.47
+Version: 0.4.48
Release: 0
Group: Multimedia/API
License: Apache-2.0
RET_VAL_IF(origin_description == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "origin_description is NULL");
RET_VAL_IF(description == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "description is NULL");
- parser = json_parser_new();
- if (!JSON_IS_PARSER(parser))
+ if (!(parser = json_parser_new())) {
+ LOG_ERROR("failed to json_parser_new()");
return WEBRTC_ERROR_INVALID_OPERATION;
+ }
if (!json_parser_load_from_data(parser, origin_description, -1, NULL)) {
LOG_ERROR("unknown description: %s", origin_description);
RET_VAL_IF(sdp == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "sdp is NULL");
RET_VAL_IF(type == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "type is NULL");
- parser = json_parser_new();
- if (!JSON_IS_PARSER(parser))
+ if (!(parser = json_parser_new())) {
+ LOG_ERROR("failed to json_parser_new()");
return WEBRTC_ERROR_INVALID_OPERATION;
+ }
if (!json_parser_load_from_data(parser, description, -1, NULL)) {
LOG_ERROR("unknown description: %s", description);
RET_VAL_IF(candidate == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "candidate is NULL");
RET_VAL_IF(mlineindex == NULL, WEBRTC_ERROR_INVALID_PARAMETER, "mlineindex is NULL");
- parser = json_parser_new();
- if (!JSON_IS_PARSER(parser))
+ if (!(parser = json_parser_new())) {
+ LOG_ERROR("failed to json_parser_new()");
return WEBRTC_ERROR_INVALID_OPERATION;
+ }
if (!json_parser_load_from_data(parser, ice_message, -1, NULL)) {
LOG_ERROR("unknown message: %s", ice_message);
RET_IF(!conn, "conn is NULL");
RET_IF(!text, "text is NULL");
- parser = json_parser_new();
+ if (!(parser = json_parser_new())) {
+ g_printerr("failed to json_parser_new()\n");
+ return;
+ }
if (!json_parser_load_from_data(parser, text, -1, NULL)) {
g_printerr("unknown message [%s]\n", text);
message_for_room = g_strdup_printf ("ROOM_PEER_MSG %d %s", remote_peer_id, message);
soup_websocket_connection_send_text(get_appdata()->signaling_server.public.ws_conn, message_for_room);
g_free(message_for_room);
-}
\ No newline at end of file
+}