Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
network:utilities
newsbeuter
newsbeuter-2.9_json-c_is_error.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File newsbeuter-2.9_json-c_is_error.patch of Package newsbeuter
Adapted from: https://github.com/akrennmair/newsbeuter/commit/a21139043efb3b875f3d76cddf6bf90f5cf7642c Index: newsbeuter-2.9/src/feedhq_api.cpp =================================================================== --- newsbeuter-2.9.orig/src/feedhq_api.cpp +++ newsbeuter-2.9/src/feedhq_api.cpp @@ -132,7 +132,7 @@ std::vector<tagged_feedurl> feedhq_api:: // TODO: parse result struct json_object * reply = json_tokener_parse(result.c_str()); - if (is_error(reply)) { + if (reply == NULL) { LOG(LOG_ERROR, "feedhq_api::get_subscribed_urls: failed to parse response as JSON."); return urls; } Index: newsbeuter-2.9/src/oldreader_api.cpp =================================================================== --- newsbeuter-2.9.orig/src/oldreader_api.cpp +++ newsbeuter-2.9/src/oldreader_api.cpp @@ -134,7 +134,7 @@ std::vector<tagged_feedurl> oldreader_ap // TODO: parse result struct json_object * reply = json_tokener_parse(result.c_str()); - if (is_error(reply)) { + if (reply == NULL) { LOG(LOG_ERROR, "oldreader_api::get_subscribed_urls: failed to parse response as JSON."); return urls; } Index: newsbeuter-2.9/src/ttrss_api.cpp =================================================================== --- newsbeuter-2.9.orig/src/ttrss_api.cpp +++ newsbeuter-2.9/src/ttrss_api.cpp @@ -113,19 +113,19 @@ struct json_object * ttrss_api::run_op(c LOG(LOG_DEBUG, "ttrss_api::run_op(%s,...): post=%s reply = %s", op.c_str(), req_data.c_str(), result.c_str()); struct json_object * reply = json_tokener_parse(result.c_str()); - if (is_error(reply)) { + if (reply == NULL) { LOG(LOG_ERROR, "ttrss_api::run_op: reply failed to parse: %s", result.c_str()); return NULL; } struct json_object * status = json_object_object_get(reply, "status"); - if (is_error(status)) { + if (status == NULL) { LOG(LOG_ERROR, "ttrss_api::run_op: no status code"); return NULL; } struct json_object * content = json_object_object_get(reply, "content"); - if (is_error(content)) { + if (content == NULL) { LOG(LOG_ERROR, "ttrss_api::run_op: no content part in answer from server"); return NULL; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor