Commit 55a8e96d authored by venaas's avatar venaas Committed by venaas
Browse files

fixed minor bugs

git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@25 e88ac4ed-0b26-0410-9574-a7f39faa03bf
parent c32535c9
......@@ -270,6 +270,7 @@ void tlsconnect(struct server *server, struct timeval *when, char *text) {
time_t elapsed;
unsigned long error;
printf("tlsconnect called from %s\n", text);
pthread_mutex_lock(&server->lock);
if (when && memcmp(&server->lastconnecttry, when, sizeof(struct timeval))) {
/* already reconnected, nothing to do */
......@@ -998,11 +999,13 @@ void getconfig(const char *serverfile, const char *clientfile) {
int *count;
if (serverfile) {
printf("opening file %s for reading\n", serverfile);
f = fopen(serverfile, "r");
if (!f)
errx("getconfig failed to open %s for reading", serverfile);
count = &server_count;
} else {
printf("opening file %s for reading\n", clientfile);
f = fopen(clientfile, "r");
if (!f)
errx("getconfig failed to open %s for reading", clientfile);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment