X-Git-Url: https://git.toastfreeware.priv.at/gregoa/bti.git/blobdiff_plain/e45e53c72f65e6e173ae1d624dd683fe0deefc61..03e07fdb619f5708c5d015ec080f4d777b405603:/bti.c diff --git a/bti.c b/bti.c index 4b31cd5..17a2a93 100644 --- a/bti.c +++ b/bti.c @@ -284,8 +284,8 @@ static CURL *curl_init(void) } /* The final place data is sent to the screen/pty/tty */ -bti_output_line(struct session *session, xmlChar *user, xmlChar *id, - xmlChar *created, xmlChar *text) +void bti_output_line(struct session *session, xmlChar *user, xmlChar *id, + xmlChar *created, xmlChar *text) { if (session->verbose) printf("[%s] {%s} (%.16s) %s\n", user, id, created, text); @@ -724,6 +724,11 @@ static int send_request(struct session *session) free(req_url); } + if (!reply) { + fprintf(stderr, "Error retrieving from URL (%s)\n", endpoint); + return 1; + } + if ((session->action != ACTION_UPDATE) && (session->action != ACTION_RETWEET)) parse_timeline(reply, session);