diff options
| author | deraadt <> | 2014-05-26 12:11:38 +0000 |
|---|---|---|
| committer | deraadt <> | 2014-05-26 12:11:38 +0000 |
| commit | f4a8cef8ce4f70c6819330f106abb25a99817060 (patch) | |
| tree | db05f90835af29cf1a571f0b30f5a84e36093481 /src/lib/libssl/d1_lib.c | |
| parent | 33d783c1622ba04dd4fa76702755414fdb7ab824 (diff) | |
| download | openbsd-f4a8cef8ce4f70c6819330f106abb25a99817060.tar.gz openbsd-f4a8cef8ce4f70c6819330f106abb25a99817060.tar.bz2 openbsd-f4a8cef8ce4f70c6819330f106abb25a99817060.zip | |
repair some KNF missed by the script; ok jsing
Diffstat (limited to 'src/lib/libssl/d1_lib.c')
| -rw-r--r-- | src/lib/libssl/d1_lib.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/lib/libssl/d1_lib.c b/src/lib/libssl/d1_lib.c index 199653624c..f0b9c1920a 100644 --- a/src/lib/libssl/d1_lib.c +++ b/src/lib/libssl/d1_lib.c | |||
| @@ -314,11 +314,13 @@ dtls1_start_timer(SSL *s) | |||
| 314 | 314 | ||
| 315 | /* Add duration to current time */ | 315 | /* Add duration to current time */ |
| 316 | s->d1->next_timeout.tv_sec += s->d1->timeout_duration; | 316 | s->d1->next_timeout.tv_sec += s->d1->timeout_duration; |
| 317 | BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout)); | 317 | BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, |
| 318 | &(s->d1->next_timeout)); | ||
| 318 | } | 319 | } |
| 319 | 320 | ||
| 320 | struct timeval* | 321 | struct timeval* |
| 321 | dtls1_get_timeout(SSL *s, struct timeval* timeleft) { | 322 | dtls1_get_timeout(SSL *s, struct timeval* timeleft) |
| 323 | { | ||
| 322 | struct timeval timenow; | 324 | struct timeval timenow; |
| 323 | 325 | ||
| 324 | /* If no timeout is set, just return NULL */ | 326 | /* If no timeout is set, just return NULL */ |
| @@ -331,8 +333,8 @@ dtls1_get_timeout(SSL *s, struct timeval* timeleft) { | |||
| 331 | 333 | ||
| 332 | /* If timer already expired, set remaining time to 0 */ | 334 | /* If timer already expired, set remaining time to 0 */ |
| 333 | if (s->d1->next_timeout.tv_sec < timenow.tv_sec || | 335 | if (s->d1->next_timeout.tv_sec < timenow.tv_sec || |
| 334 | (s->d1->next_timeout.tv_sec == timenow.tv_sec && | 336 | (s->d1->next_timeout.tv_sec == timenow.tv_sec && |
| 335 | s->d1->next_timeout.tv_usec <= timenow.tv_usec)) { | 337 | s->d1->next_timeout.tv_usec <= timenow.tv_usec)) { |
| 336 | memset(timeleft, 0, sizeof(struct timeval)); | 338 | memset(timeleft, 0, sizeof(struct timeval)); |
| 337 | return timeleft; | 339 | return timeleft; |
| 338 | } | 340 | } |
| @@ -393,7 +395,8 @@ dtls1_stop_timer(SSL *s) | |||
| 393 | memset(&(s->d1->timeout), 0, sizeof(struct dtls1_timeout_st)); | 395 | memset(&(s->d1->timeout), 0, sizeof(struct dtls1_timeout_st)); |
| 394 | memset(&(s->d1->next_timeout), 0, sizeof(struct timeval)); | 396 | memset(&(s->d1->next_timeout), 0, sizeof(struct timeval)); |
| 395 | s->d1->timeout_duration = 1; | 397 | s->d1->timeout_duration = 1; |
| 396 | BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, &(s->d1->next_timeout)); | 398 | BIO_ctrl(SSL_get_rbio(s), BIO_CTRL_DGRAM_SET_NEXT_TIMEOUT, 0, |
| 399 | &(s->d1->next_timeout)); | ||
| 397 | /* Clear retransmission buffer */ | 400 | /* Clear retransmission buffer */ |
| 398 | dtls1_clear_record_buffer(s); | 401 | dtls1_clear_record_buffer(s); |
| 399 | } | 402 | } |
| @@ -405,7 +408,8 @@ dtls1_check_timeout_num(SSL *s) | |||
| 405 | 408 | ||
| 406 | /* Reduce MTU after 2 unsuccessful retransmissions */ | 409 | /* Reduce MTU after 2 unsuccessful retransmissions */ |
| 407 | if (s->d1->timeout.num_alerts > 2) { | 410 | if (s->d1->timeout.num_alerts > 2) { |
| 408 | s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), BIO_CTRL_DGRAM_GET_FALLBACK_MTU, 0, NULL); | 411 | s->d1->mtu = BIO_ctrl(SSL_get_wbio(s), |
| 412 | BIO_CTRL_DGRAM_GET_FALLBACK_MTU, 0, NULL); | ||
| 409 | 413 | ||
| 410 | } | 414 | } |
| 411 | 415 | ||
