- curl_easy_setopt(con->get_curl_handle, CURLOPT_URL, con->url);
- //curl_easy_setopt(con->put_curl_handle, CURLOPT_PUT, 1L);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_HEADERFUNCTION, &curl_header_function);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_WRITEHEADER, con);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_READFUNCTION, send_curl_read_callback);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_READDATA, con);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_WRITEFUNCTION, send_curl_write_callback);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_WRITEDATA, con);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_TIMEOUT, (long) timeout.value);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_PRIVATE, con);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_CONNECTTIMEOUT, HTTP_CONNECT_TIMEOUT);
- curl_easy_setopt(con->get_curl_handle, CURLOPT_BUFFERSIZE, GNUNET_SERVER_MAX_MESSAGE_SIZE);
-
- mret = curl_multi_add_handle(plugin->multi_handle, con->get_curl_handle);
- if (mret != CURLM_OK)
- {
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- _("%s failed at %s:%d: `%s'\n"),
- "curl_multi_add_handle", __FILE__, __LINE__,
- curl_multi_strerror (mret));
- return -1;
- }
-
- if (con->get_msgtok != NULL)
- con->get_msgtok = GNUNET_SERVER_mst_create (&curl_write_mst_cb, con);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_URL, ps->url);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_HEADERFUNCTION, &curl_header_function);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_WRITEHEADER, ps);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_READFUNCTION, send_curl_read_callback);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_READDATA, ps);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_WRITEFUNCTION, send_curl_write_callback);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_WRITEDATA, ps);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_TIMEOUT, (long) timeout.value);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_PRIVATE, ps);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_CONNECTTIMEOUT, HTTP_CONNECT_TIMEOUT);
+ curl_easy_setopt(ps->recv_endpoint, CURLOPT_BUFFERSIZE, GNUNET_SERVER_MAX_MESSAGE_SIZE);
+
+ mret = curl_multi_add_handle(plugin->multi_handle, ps->recv_endpoint);
+ if (mret != CURLM_OK)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ _("%s failed at %s:%d: `%s'\n"),
+ "curl_multi_add_handle", __FILE__, __LINE__,
+ curl_multi_strerror (mret));
+ return -1;
+ }