fixed minor bugs
authorvenaas <venaas>
Thu, 4 Jan 2007 14:02:05 +0000 (14:02 +0000)
committervenaas <venaas@e88ac4ed-0b26-0410-9574-a7f39faa03bf>
Thu, 4 Jan 2007 14:02:05 +0000 (14:02 +0000)
git-svn-id: https://svn.testnett.uninett.no/radsecproxy/trunk@26 e88ac4ed-0b26-0410-9574-a7f39faa03bf

radsecproxy.c

index f5237a1..faaac55 100644 (file)
@@ -285,7 +285,6 @@ void tlsconnect(struct server *server, struct timeval *when, char *text) {
        printf("tlsconnect: trying to open TLS connection to %s port %s\n", server->host, server->port);
        gettimeofday(&now, NULL);
        elapsed = now.tv_sec - server->lastconnecttry.tv_sec;
-       memcpy(&server->lastconnecttry, &now, sizeof(struct timeval));
        if (server->connectionok) {
            server->connectionok = 0;
            sleep(10);
@@ -308,6 +307,7 @@ void tlsconnect(struct server *server, struct timeval *when, char *text) {
            err("tlsconnect: TLS: %s", ERR_error_string(error, NULL));
     }
     printf("tlsconnect: TLS connection to %s port %s up\n", server->host, server->port);
+    gettimeofday(&server->lastconnecttry, NULL);
     pthread_mutex_unlock(&server->lock);
 }