diary

Text-based journaling program
git clone https://git.in0rdr.ch/diary.git
Log | Files | Refs | README | LICENSE

commit 591e362ecabd57b61c1be93ecaa7be229a121461
parent 85eab05dc2e652bf33949cc7c7331b472bc48d9e
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sun, 16 May 2021 09:21:33 +0200

return if no OAuth code found

Diffstat:
Mcaldav.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/caldav.c b/caldav.c @@ -217,7 +217,11 @@ void caldav_sync(const struct tm* date, WINDOW* header) { close(pfds[1].fd); char* code = extract_oauth_code(http_header); - fprintf(stderr, "CODE: %s\n", code); + if (code == NULL) { + fprintf(stderr, "Found no OAuth code in http header.\n"); + return; + } + fprintf(stderr, "OAuth code: %s\n", code); CURL *curl; CURLcode res;