|
|
4d9fd75 |
Index: newsbeuter-2.9/src/feedhq_api.cpp
|
|
|
4d9fd75 |
===================================================================
|
|
|
4d9fd75 |
--- newsbeuter-2.9.orig/src/feedhq_api.cpp
|
|
|
4d9fd75 |
+++ newsbeuter-2.9/src/feedhq_api.cpp
|
|
|
4d9fd75 |
@@ -132,7 +132,7 @@ std::vector<tagged_feedurl> feedhq_api::
|
|
|
4d9fd75 |
// TODO: parse result
|
|
|
4d9fd75 |
|
|
|
4d9fd75 |
struct json_object * reply = json_tokener_parse(result.c_str());
|
|
|
4d9fd75 |
- if (is_error(reply)) {
|
|
|
4d9fd75 |
+ if (reply == NULL) {
|
|
|
4d9fd75 |
LOG(LOG_ERROR, "feedhq_api::get_subscribed_urls: failed to parse response as JSON.");
|
|
|
4d9fd75 |
return urls;
|
|
|
4d9fd75 |
}
|
|
|
4d9fd75 |
Index: newsbeuter-2.9/src/oldreader_api.cpp
|
|
|
4d9fd75 |
===================================================================
|
|
|
4d9fd75 |
--- newsbeuter-2.9.orig/src/oldreader_api.cpp
|
|
|
4d9fd75 |
+++ newsbeuter-2.9/src/oldreader_api.cpp
|
|
|
4d9fd75 |
@@ -134,7 +134,7 @@ std::vector<tagged_feedurl> oldreader_ap
|
|
|
4d9fd75 |
// TODO: parse result
|
|
|
4d9fd75 |
|
|
|
4d9fd75 |
struct json_object * reply = json_tokener_parse(result.c_str());
|
|
|
4d9fd75 |
- if (is_error(reply)) {
|
|
|
4d9fd75 |
+ if (reply == NULL) {
|
|
|
4d9fd75 |
LOG(LOG_ERROR, "oldreader_api::get_subscribed_urls: failed to parse response as JSON.");
|
|
|
4d9fd75 |
return urls;
|
|
|
4d9fd75 |
}
|
|
|
4d9fd75 |
Index: newsbeuter-2.9/src/ttrss_api.cpp
|
|
|
4d9fd75 |
===================================================================
|
|
|
4d9fd75 |
--- newsbeuter-2.9.orig/src/ttrss_api.cpp
|
|
|
4d9fd75 |
+++ newsbeuter-2.9/src/ttrss_api.cpp
|
|
|
4d9fd75 |
@@ -113,19 +113,19 @@ struct json_object * ttrss_api::run_op(c
|
|
|
4d9fd75 |
LOG(LOG_DEBUG, "ttrss_api::run_op(%s,...): post=%s reply = %s", op.c_str(), req_data.c_str(), result.c_str());
|
|
|
4d9fd75 |
|
|
|
4d9fd75 |
struct json_object * reply = json_tokener_parse(result.c_str());
|
|
|
4d9fd75 |
- if (is_error(reply)) {
|
|
|
4d9fd75 |
+ if (reply == NULL) {
|
|
|
4d9fd75 |
LOG(LOG_ERROR, "ttrss_api::run_op: reply failed to parse: %s", result.c_str());
|
|
|
4d9fd75 |
return NULL;
|
|
|
4d9fd75 |
}
|
|
|
4d9fd75 |
|
|
|
4d9fd75 |
struct json_object * status = json_object_object_get(reply, "status");
|
|
|
4d9fd75 |
- if (is_error(status)) {
|
|
|
4d9fd75 |
+ if (status == NULL) {
|
|
|
4d9fd75 |
LOG(LOG_ERROR, "ttrss_api::run_op: no status code");
|
|
|
4d9fd75 |
return NULL;
|
|
|
4d9fd75 |
}
|
|
|
4d9fd75 |
|
|
|
4d9fd75 |
struct json_object * content = json_object_object_get(reply, "content");
|
|
|
4d9fd75 |
- if (is_error(content)) {
|
|
|
4d9fd75 |
+ if (content == NULL) {
|
|
|
4d9fd75 |
LOG(LOG_ERROR, "ttrss_api::run_op: no content part in answer from server");
|
|
|
4d9fd75 |
return NULL;
|
|
|
4d9fd75 |
}
|