- switch (action & (EV_READ|EV_WRITE)) {
- case EV_READ:
- rc = curl_multi_socket_action(pool->ch, socket, CURL_CSELECT_IN, &pool->unfinished);
- break;
- case EV_WRITE:
- rc = curl_multi_socket_action(pool->ch, socket, CURL_CSELECT_OUT, &pool->unfinished);
- break;
- case EV_READ|EV_WRITE:
- rc = curl_multi_socket_action(pool->chm socket, CURL_CSELECT_IN|CURL_CSELECT_OUT, &pool->unfinished);
+ switch (action & (EV_READ|EV_WRITE)) {
+ case EV_READ:
+ rc = curl_multi_socket_action(pool->ch, socket, CURL_CSELECT_IN, &pool->unfinished);
+ break;
+ case EV_WRITE:
+ rc = curl_multi_socket_action(pool->ch, socket, CURL_CSELECT_OUT, &pool->unfinished);
+ break;
+ case EV_READ|EV_WRITE:
+ rc = curl_multi_socket_action(pool->ch, socket, CURL_CSELECT_IN|CURL_CSELECT_OUT, &pool->unfinished);
+ break;
+ default:
+ http_error_ex(HE_WARNING, HTTP_E_SOCKET, "Unknown event %d", (int) action);
+ return;
+ }
+#else
+ rc = curl_multi_socket(pool->ch, socket, &pool->unfinished);
+#endif
+ } while (CURLM_CALL_MULTI_PERFORM == rc);
+
+ switch (rc) {
+ case CURLM_BAD_SOCKET:
+#if 0
+ fprintf(stderr, "!!! Bad socket: %d (%d)\n", socket, (int) action);
+#endif
+ case CURLM_OK: