- Notifications
You must be signed in to change notification settings - Fork5.2k
Commit16b0c48
committed
oauth: Ensure unused socket registrations are removed
If Curl needs to switch the direction of a socket's registration (e.g.from CURL_POLL_IN to CURL_POLL_OUT), it expects the old registration tobe discarded. For epoll, this happened via EPOLL_CTL_MOD, but forkqueue, the old registration would remain if it was not explicitlyremoved by Curl.Explicitly remove the opposite-direction event during registrations. (Ifthat event doesn't exist, we'll just get an ENOENT, which will beignored by the same code that handles CURL_POLL_REMOVE.) A fewassertions are also added to strengthen the relationship between thenumber of events added, the number of events pulled off the queue, andthe lengths of the kevent arrays.Reviewed-by: Thomas Munro <thomas.munro@gmail.com>Backpatch-through: 18Discussion:https://postgr.es/m/CAOYmi+nDZxJHaWj9_jRSyf8uMToCADAmOfJEggsKW-kY7aUwHA@mail.gmail.com1 parentff181d1 commit16b0c48
1 file changed
+14
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1291 | 1291 | | |
1292 | 1292 | | |
1293 | 1293 | | |
1294 | | - | |
| 1294 | + | |
1295 | 1295 | | |
1296 | 1296 | | |
1297 | 1297 | | |
1298 | 1298 | | |
1299 | 1299 | | |
| 1300 | + | |
| 1301 | + | |
| 1302 | + | |
| 1303 | + | |
| 1304 | + | |
1300 | 1305 | | |
1301 | 1306 | | |
1302 | 1307 | | |
1303 | 1308 | | |
1304 | 1309 | | |
| 1310 | + | |
| 1311 | + | |
1305 | 1312 | | |
1306 | 1313 | | |
1307 | 1314 | | |
1308 | 1315 | | |
1309 | 1316 | | |
| 1317 | + | |
| 1318 | + | |
1310 | 1319 | | |
1311 | 1320 | | |
1312 | 1321 | | |
| |||
1317 | 1326 | | |
1318 | 1327 | | |
1319 | 1328 | | |
1320 | | - | |
1321 | | - | |
1322 | | - | |
1323 | | - | |
1324 | | - | |
1325 | | - | |
1326 | 1329 | | |
1327 | 1330 | | |
1328 | 1331 | | |
| |||
1334 | 1337 | | |
1335 | 1338 | | |
1336 | 1339 | | |
1337 | | - | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
1338 | 1344 | | |
1339 | 1345 | | |
1340 | 1346 | | |
| |||
0 commit comments
Comments
(0)