diff options
| author | Fabian Mauchle <fabian.mauchle@switch.ch> | 2017-03-03 11:04:56 +0100 |
|---|---|---|
| committer | Fabian Mauchle <fabian.mauchle@switch.ch> | 2017-03-16 11:17:48 +0100 |
| commit | 85d3999d58aafa0127f45070c49fd23be2d03423 (patch) | |
| tree | 3bfff60e07402e9f0ac16f2f8f157a8d1d17ad3b /tls.c | |
| parent | ec469f65cdda1a668d105763a7d788fb23b42261 (diff) | |
- fix wrong comparison of server->state
- move enum to top
- prefix enum with rsp_ / RSP_
Conflicts:
radsecproxy.c
Diffstat (limited to 'tls.c')
| -rw-r--r-- | tls.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -111,8 +111,8 @@ int tlsconnect(struct server *server, struct timeval *when, int timeout, char *t pthread_mutex_unlock(&server->lock); return 0; } - if (server->state == SERVER_STATE_CONNECTED) { - server->state = SERVER_STATE_RECONNECTING; + if (server->state == RSP_SERVER_STATE_CONNECTED) { + server->state = RSP_SERVER_STATE_RECONNECTING; sleep(2); } else if (elapsed < 1) sleep(2); @@ -155,7 +155,7 @@ int tlsconnect(struct server *server, struct timeval *when, int timeout, char *t X509_free(cert); } debug(DBG_WARN, "tlsconnect: TLS connection to %s up", server->conf->name); - server->state = SERVER_STATE_CONNECTED; + server->state = RSP_SERVER_STATE_CONNECTED; gettimeofday(&server->lastconnecttry, NULL); pthread_mutex_unlock(&server->lock); return 1; @@ -251,7 +251,7 @@ int clientradputtls(struct server *server, unsigned char *rad) { unsigned long error; struct clsrvconf *conf = server->conf; - if (!server->state == SERVER_STATE_CONNECTED) + if (server->state != RSP_SERVER_STATE_CONNECTED) return 0; len = RADLEN(rad); if ((cnt = SSL_write(server->ssl, rad, len)) <= 0) { |
