~callum/gmsfn

07e6fa0b91df9bb1e4a6d06bac2500b3ef8e5442 — Callum Brown 1 year, 3 months ago 7328149
Update gmni source
5 files changed, 6 insertions(+), 5 deletions(-)

M include/gmni.h
M include/tofu.h
M include/util.h
M src/parser.c
M src/tofu.c
M include/gmni.h => include/gmni.h +1 -1
@@ 1,4 1,4 @@
/* This file is part of gmni. */
/* This file is from gmni. */
#ifndef GEMINI_CLIENT_H
#define GEMINI_CLIENT_H
#include <netdb.h>

M include/tofu.h => include/tofu.h +1 -1
@@ 1,4 1,4 @@
/* This file is part of gmni. */
/* This file is from gmni. */
#ifndef GEMINI_TOFU_H
#define GEMINI_TOFU_H
#include <limits.h>

M include/util.h => include/util.h +1 -1
@@ 1,4 1,4 @@
/* This file is part of gmni. */
/* This file is from gmni. */
#ifndef GEMINI_UTIL_H
#define GEMINI_UTIL_H


M src/parser.c => src/parser.c +1 -1
@@ 47,7 47,7 @@ gemini_parser_next(struct gemini_parser *p, struct gemini_token *tok)
		if (n == -1) {
			return -1;
		} else if (n == 0) {
			eof = 1;
			eof = p->bufln == 0;
			break;
		}
		p->bufln += n;

M src/tofu.c => src/tofu.c +2 -1
@@ 176,13 176,14 @@ gemini_tofu_init(struct gemini_tofu *tofu,
	tofu->cb_data = cb_data;
	SSL_CTX_set_cert_verify_callback(ssl_ctx, verify_callback, tofu);

	tofu->known_hosts = NULL;

	FILE *f = fopen(tofu->known_hosts_path, "r");
	if (!f) {
		return;
	}
	size_t n = 0;
	char *line = NULL;
	tofu->known_hosts = NULL;
	while (getline(&line, &n, f) != -1) {
		struct known_host *host = calloc(1, sizeof(struct known_host));
		char *tok = strtok(line, " ");