(no commit message)
[prss.git] / src / ttrss_ws.c
index 0aed58d..ac6ee06 100644 (file)
@@ -103,6 +103,8 @@ static const char *ws_reply_get_error(struct json_object *content)
 {
        struct json_object *jerror;
 
+       log_debug("ws_reply_get_error");
+
        if (json_object_get_type(content) != json_type_object)
                return NULL;
 
@@ -131,8 +133,11 @@ execute(struct http_session *sess, struct json_object *rq, char **err)
                        str = ws_reply_get_error(content);
 
                        if (str) {
-                               *err = strdup(str);
+                               log_debug("execute() err=%s", str);
                                content = NULL;
+                               
+                               if (err)
+                                       *err = strdup(str);
                        } else {
                                json_object_get(content);
                        }
@@ -141,6 +146,8 @@ execute(struct http_session *sess, struct json_object *rq, char **err)
                json_object_put(rp);
        }
 
+       log_debug("execute() done");
+
        return content;
 }