{"author":"Christopher Dannemiller","author_email":"cdannemiller@nvidia.com","author_time":1728059519,"commit_time":1735452309,"committer":"Jay Satiro","committer_email":"raysatiro@yahoo.com","hash":"c78044c07e97cb720049579f4fe3cab33a7ea8d3","message":"multi: fix curl_multi_waitfds reporting of fd_count\n\n- Make curl_multi_waitfds consistent with the documentation.\n\nIssue Addressed:\n\n - The documentation of curl_multi_waitfds indicates that users should\n   be able to call curl_multi_waitfds with a NULL ufds. However, before\n   this change, the function would return CURLM_BAD_FUNCTION_ARGUMENT.\n - Additionally, the documentation suggests that users can use this\n   function to determine the number of file descriptors (fds) needed.\n   However, the function would stop counting fds if the supplied fds\n   were exhausted.\n\nChanges Made:\n\n - NULL ufds Handling: curl_multi_waitfds can now accept a NULL ufds if\n   size is also zero.\n - Counting File Descriptors: If curl_multi_waitfds is passed a NULL\n   ufds, or the size of ufds is insufficient, the output parameter\n   fd_count will return the number of fds needed. This value may be\n   higher than actually needed but never lower.\n\nTesting:\n\n - Test 2405 has been updated to cover the usage scenarios described\n   above.\n\nFixes https://github.com/curl/curl/issues/15146\nCloses https://github.com/curl/curl/pull/15155\n","parents":["7d6edf1d8d98b182663eab11779ae2e73d754a7e"],"tree_hash":"c609f7e1279a34cc28736dc7460e9daf39b16def"}