soup: Use soup_session_new() to avoid deprecation warning
There are a ton of libsoup/GLib-related "leaks" that we can't whitelist and with leak detective active there is a delay that interestingly doesn't happen with soup_session_sync_new(), so tests failed with a timeout (actually they hung due to the lock in the fetcher manager). On Travis, the curl plugin is used for the tests, so that's not an issue there (and without LD the tests complete quickly and successfully).
This commit is contained in:
@@ -118,7 +118,7 @@ METHOD(fetcher_t, fetch, status_t,
|
||||
soup_message_set_http_version(message, this->version);
|
||||
soup_message_body_set_accumulate(message->response_body, FALSE);
|
||||
g_signal_connect(message, "got-chunk", G_CALLBACK(soup_cb), &data);
|
||||
data.session = soup_session_sync_new();
|
||||
data.session = soup_session_new();
|
||||
g_object_set(G_OBJECT(data.session),
|
||||
SOUP_SESSION_TIMEOUT, (guint)this->timeout, NULL);
|
||||
|
||||
|
||||
@@ -313,14 +313,17 @@ Suite *fetch_http_suite_create()
|
||||
|
||||
tc = tcase_create("GET");
|
||||
tcase_add_loop_test(tc, test_get, 0, countof(gtests));
|
||||
test_case_set_timeout(tc, 10);
|
||||
suite_add_tcase(s, tc);
|
||||
|
||||
tc = tcase_create("POST");
|
||||
tcase_add_loop_test(tc, test_post, 0, countof(ptests));
|
||||
test_case_set_timeout(tc, 10);
|
||||
suite_add_tcase(s, tc);
|
||||
|
||||
tc = tcase_create("response code");
|
||||
tcase_add_loop_test(tc, test_response_code, 0, countof(rtests));
|
||||
test_case_set_timeout(tc, 10);
|
||||
suite_add_tcase(s, tc);
|
||||
|
||||
return s;
|
||||
|
||||
@@ -557,12 +557,15 @@ static char *whitelist[] = {
|
||||
/* libcurl */
|
||||
"Curl_client_write",
|
||||
/* libsoup */
|
||||
"soup_add_timeout",
|
||||
"soup_headers_parse_response",
|
||||
"soup_message_headers_append",
|
||||
"soup_message_headers_clear",
|
||||
"soup_message_headers_get_list",
|
||||
"soup_message_headers_get_one",
|
||||
"soup_session_abort",
|
||||
"soup_session_get_type",
|
||||
"soup_session_remove_feature",
|
||||
/* libldap */
|
||||
"ldap_int_initialize",
|
||||
/* ClearSilver */
|
||||
|
||||
Reference in New Issue
Block a user