diff options
| author | Sebastien Bacher <seb128@ubuntu.com> | 2022-05-17 15:30:19 +0200 |
|---|---|---|
| committer | Sebastien Bacher <seb128@ubuntu.com> | 2022-05-17 15:30:19 +0200 |
| commit | 1e636d8e5e986b9f2260c36bb87fb499d724085c (patch) | |
| tree | ac613b9372adf622496a7d616050d7e1c09b4fba /src/nm-cloud-setup/nm-http-client.c | |
| parent | f4966e573c855d4667e6c236d8197d9949020e21 (diff) | |
| parent | 1a31bc3c63474ca02c83b02add85ea4e740e5597 (diff) | |
Merge remote-tracking branch 'debian/debian/master' into ubuntu/master
Diffstat (limited to 'src/nm-cloud-setup/nm-http-client.c')
| -rw-r--r-- | src/nm-cloud-setup/nm-http-client.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/nm-cloud-setup/nm-http-client.c b/src/nm-cloud-setup/nm-http-client.c index 2f71cefa..a0053d47 100644 --- a/src/nm-cloud-setup/nm-http-client.c +++ b/src/nm-cloud-setup/nm-http-client.c @@ -305,6 +305,7 @@ nm_http_client_get(NMHttpClient *self, curl_easy_setopt(edata->ehandle, CURLOPT_WRITEFUNCTION, _get_writefunction_cb); curl_easy_setopt(edata->ehandle, CURLOPT_WRITEDATA, edata); curl_easy_setopt(edata->ehandle, CURLOPT_PRIVATE, edata); + curl_easy_setopt(edata->ehandle, CURLOPT_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS); if (http_headers) { for (i = 0; http_headers[i]; ++i) { @@ -679,14 +680,13 @@ _mhandle_socketfunction_cb(CURL *e_handle, condition = 0; if (condition) { - source_socket = nm_g_unix_fd_source_new(fd, - condition, - G_PRIORITY_DEFAULT, - _mhandle_socket_cb, - self, - NULL); - g_source_attach(source_socket, priv->context); - + source_socket = _source_attach(self, + nm_g_unix_fd_source_new(fd, + condition, + G_PRIORITY_DEFAULT, + _mhandle_socket_cb, + self, + NULL)); g_hash_table_insert(priv->source_sockets_hashtable, GINT_TO_POINTER(fd), source_socket); } } |