Loading CHANGES +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ Changelog Kamil Dudka (24 Apr 2010) - Fixed test536 in order to not fail with threaded DNS resolver and tweaked comments in certain examples using curl_multi_fdset(). Daniel Stenberg (21 Apr 2010) - The -O option caused curl to crash on windows and DOS due to the tool writing out of boundary memory. Loading docs/examples/fopen.c +5 −3 Original line number Diff line number Diff line Loading @@ -131,7 +131,6 @@ fill_buffer(URL_FILE *file,int want,int waittime) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; struct timeval timeout; int rc; Loading @@ -144,6 +143,7 @@ fill_buffer(URL_FILE *file,int want,int waittime) /* attempt to fill buffer */ do { int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); FD_ZERO(&fdexcep); Loading @@ -156,8 +156,10 @@ fill_buffer(URL_FILE *file,int want,int waittime) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading docs/examples/multi-app.c +5 −3 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ int main(int argc, char **argv) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); Loading @@ -80,8 +80,10 @@ int main(int argc, char **argv) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading docs/examples/multi-debugcallback.c +5 −3 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ int main(int argc, char **argv) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); Loading @@ -154,8 +154,10 @@ int main(int argc, char **argv) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading docs/examples/multi-double.c +5 −3 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ int main(int argc, char **argv) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); Loading @@ -71,8 +71,10 @@ int main(int argc, char **argv) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading Loading
CHANGES +4 −0 Original line number Diff line number Diff line Loading @@ -6,6 +6,10 @@ Changelog Kamil Dudka (24 Apr 2010) - Fixed test536 in order to not fail with threaded DNS resolver and tweaked comments in certain examples using curl_multi_fdset(). Daniel Stenberg (21 Apr 2010) - The -O option caused curl to crash on windows and DOS due to the tool writing out of boundary memory. Loading
docs/examples/fopen.c +5 −3 Original line number Diff line number Diff line Loading @@ -131,7 +131,6 @@ fill_buffer(URL_FILE *file,int want,int waittime) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; struct timeval timeout; int rc; Loading @@ -144,6 +143,7 @@ fill_buffer(URL_FILE *file,int want,int waittime) /* attempt to fill buffer */ do { int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); FD_ZERO(&fdexcep); Loading @@ -156,8 +156,10 @@ fill_buffer(URL_FILE *file,int want,int waittime) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading
docs/examples/multi-app.c +5 −3 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ int main(int argc, char **argv) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); Loading @@ -80,8 +80,10 @@ int main(int argc, char **argv) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading
docs/examples/multi-debugcallback.c +5 −3 Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ int main(int argc, char **argv) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); Loading @@ -154,8 +154,10 @@ int main(int argc, char **argv) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading
docs/examples/multi-double.c +5 −3 Original line number Diff line number Diff line Loading @@ -57,7 +57,7 @@ int main(int argc, char **argv) fd_set fdread; fd_set fdwrite; fd_set fdexcep; int maxfd; int maxfd = -1; FD_ZERO(&fdread); FD_ZERO(&fdwrite); Loading @@ -71,8 +71,10 @@ int main(int argc, char **argv) curl_multi_fdset(multi_handle, &fdread, &fdwrite, &fdexcep, &maxfd); /* In a real-world program you OF COURSE check the return code of the function calls, *and* you make sure that maxfd is bigger than -1 so that the call to select() below makes sense! */ function calls. On success, the value of maxfd is guaranteed to be greater or equal than -1. We call select(maxfd + 1, ...), specially in case of (maxfd == -1), we call select(0, ...), which is basically equal to sleep. */ rc = select(maxfd+1, &fdread, &fdwrite, &fdexcep, &timeout); Loading