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 /dtls.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 'dtls.c')
| -rw-r--r-- | dtls.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -556,8 +556,8 @@ int dtlsconnect(struct server *server, struct timeval *when, int timeout, char * 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); @@ -591,7 +591,7 @@ int dtlsconnect(struct server *server, struct timeval *when, int timeout, char * } X509_free(cert); debug(DBG_WARN, "dtlsconnect: DTLS connection to %s port %s up", hp->host, hp->port); - server->state = SERVER_STATE_CONNECTED; + server->state = RSP_SERVER_STATE_CONNECTED; gettimeofday(&server->lastconnecttry, NULL); pthread_mutex_unlock(&server->lock); return 1; @@ -603,7 +603,7 @@ int clientradputdtls(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) { |
