diff options
Diffstat (limited to 'ot_http.c')
| -rw-r--r-- | ot_http.c | 6 |
1 files changed, 3 insertions, 3 deletions
| @@ -222,7 +222,7 @@ ssize_t http_sendiovecdata(const int64_t sock, struct ot_workstruct *ws, size_t | |||
| 222 | cookie->flag &= ~STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER; | 222 | cookie->flag &= ~STRUCT_HTTP_FLAG_CHUNKED_IN_TRANSFER; |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | fdstate_set_expiry(sock, g_now_seconds + OT_CLIENT_TIMEOUT_SEND); | 225 | fdstate_set_expiry(sock, time_future_seconds(OT_CLIENT_TIMEOUT_SEND)); |
| 226 | http_interest_add(sock, cookie, EVENT_OUT); | 226 | http_interest_add(sock, cookie, EVENT_OUT); |
| 227 | return 0; | 227 | return 0; |
| 228 | } | 228 | } |
| @@ -359,7 +359,7 @@ static ssize_t http_handle_fullscrape(const int64_t sock, struct ot_workstruct * | |||
| 359 | ot_scrape_log this_peer, *new_peer; | 359 | ot_scrape_log this_peer, *new_peer; |
| 360 | int exactmatch; | 360 | int exactmatch; |
| 361 | memcpy(this_peer.ip, cookie->ip, sizeof(ot_ip6)); | 361 | memcpy(this_peer.ip, cookie->ip, sizeof(ot_ip6)); |
| 362 | this_peer.last_fullscrape = g_now_seconds; | 362 | this_peer.last_fullscrape = time_now_seconds(); |
| 363 | pthread_mutex_lock(&g_modest_fullscrape_mutex); | 363 | pthread_mutex_lock(&g_modest_fullscrape_mutex); |
| 364 | new_peer = vector_find_or_insert(&g_modest_fullscrape_timeouts, &this_peer, sizeof(ot_scrape_log), sizeof(ot_ip6), &exactmatch); | 364 | new_peer = vector_find_or_insert(&g_modest_fullscrape_timeouts, &this_peer, sizeof(ot_scrape_log), sizeof(ot_ip6), &exactmatch); |
| 365 | if (!new_peer) { | 365 | if (!new_peer) { |
| @@ -710,7 +710,7 @@ ssize_t http_handle_request(const int64_t sock, struct ot_workstruct *ws) { | |||
| 710 | log->size = ws->request_size; | 710 | log->size = ws->request_size; |
| 711 | log->data = malloc(ws->request_size); | 711 | log->data = malloc(ws->request_size); |
| 712 | log->next = 0; | 712 | log->next = 0; |
| 713 | log->time = g_now_seconds; | 713 | log->time = time_now_seconds(); |
| 714 | memcpy(log->ip, cookie->ip, sizeof(ot_ip6)); | 714 | memcpy(log->ip, cookie->ip, sizeof(ot_ip6)); |
| 715 | if (log->data) { | 715 | if (log->data) { |
| 716 | memcpy(log->data, ws->request, ws->request_size); | 716 | memcpy(log->data, ws->request, ws->request_size); |
