* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
*/
static int checkForCompletion(CURLM *curl, int *success)
{
- int numMessages;
- CURLMsg *message;
int result = 0;
*success = 0;
- while((message = curl_multi_info_read(curl, &numMessages))) {
+ while(1) {
+ int numMessages;
+ CURLMsg *message = curl_multi_info_read(curl, &numMessages);
+ if(!message)
+ break;
if(message->msg == CURLMSG_DONE) {
result = 1;
if(message->data.result == CURLE_OK)
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
return res;
}
- while((msg = curl_multi_info_read(cm, &Q))) {
+ while(1) {
+ msg = curl_multi_info_read(cm, &Q);
+ if(!msg)
+ break;
if(msg->msg == CURLMSG_DONE) {
int i;
CURL *e = msg->easy_handle;
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
*/
static int checkForCompletion(CURLM *curl, int *success)
{
- int numMessages;
- CURLMsg *message;
int result = 0;
*success = 0;
- while((message = curl_multi_info_read(curl, &numMessages))) {
+ while(1) {
+ int numMessages;
+ CURLMsg *message = curl_multi_info_read(curl, &numMessages);
+ if(!message)
+ break;
if(message->msg == CURLMSG_DONE) {
result = 1;
if(message->data.result == CURLE_OK)