conncache: don't assume curl_off_t increment wrap-around
No binary (build failed)
—
(log yok)
| @@ -274,7 +274,7 @@ void Curl_cpool_xfer_init(struct Curl_easy *data) | |
| CPOOL_LOCK(cpool, data); | |
| /* the identifier inside the connection cache */ | |
| data->id = cpool->next_easy_id++; | |
| - | if(cpool->next_easy_id <= 0) |
| + | if(cpool->next_easy_id == CURL_OFF_T_MAX) |
| cpool->next_easy_id = 0; | |
| data->state.lastconnect_id = -1; | |
| @@ -1216,9 +1216,9 @@ struct Curl_easy { | |
| /* once an easy handle is tied to a connection pool a non-negative number to | |
| distinguish this transfer from other using the same pool. For easier | |
| - | tracking in log output. This may wrap around after LONG_MAX to 0 again, |
| - | so it has no uniqueness guarantee for large processings. Note: it has no |
| - | uniqueness either IFF more than one connection pool is used by the |
| + | tracking in log output. This may wrap around after CURL_OFF_T_MAX to 0 |
| + | again, so it has no uniqueness guarantee for large processings. Note: it |
| + | has no uniqueness either IFF more than one connection pool is used by the |
| libcurl application. */ | |
| curl_off_t id; | |
| uint32_t master_mid; /* if set, this transfer belongs to a master */ | |