From ba243235ec04af62aee2cfc31bf0f05488e59fe7 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 2 Jan 2019 18:04:58 +0100 Subject: urldata: rename easy_conn to just conn We use "conn" everywhere to be a pointer to the connection. Introduces two functions that "attaches" and "detaches" the connection to and from the transfer. Going forward, we should favour using "data->conn" (since a transfer always only has a single connection or none at all) to "conn->data" (since a connection can have none, one or many transfers associated with it and updating conn->data to be correct is error prone and a frequent reason for internal issues). Closes #3442 --- tests/unit/unit1620.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/unit/unit1620.c b/tests/unit/unit1620.c index a47ff49a4..b8b096521 100644 --- a/tests/unit/unit1620.c +++ b/tests/unit/unit1620.c @@ -48,7 +48,7 @@ UNITTEST_START rc = Curl_open(&empty); fail_unless(rc == CURLE_OK, "Curl_open() failed"); - rc = Curl_connect(empty, &empty->easy_conn, &async, &protocol_connect); + rc = Curl_connect(empty, &async, &protocol_connect); fail_unless(rc == CURLE_URL_MALFORMAT, "Curl_connect() failed to return CURLE_URL_MALFORMAT"); @@ -56,14 +56,14 @@ UNITTEST_START "empty->magic should be equal to CURLEASY_MAGIC_NUMBER"); /* double invoke to ensure no dependency on internal state */ - rc = Curl_connect(empty, &empty->easy_conn, &async, &protocol_connect); + rc = Curl_connect(empty, &async, &protocol_connect); fail_unless(rc == CURLE_URL_MALFORMAT, "Curl_connect() failed to return CURLE_URL_MALFORMAT"); rc = Curl_init_userdefined(empty); fail_unless(rc == CURLE_OK, "Curl_userdefined() failed"); - rc = Curl_init_do(empty, empty->easy_conn); + rc = Curl_init_do(empty, empty->conn); fail_unless(rc == CURLE_OK, "Curl_init_do() failed"); rc = Curl_parse_login_details( @@ -71,7 +71,7 @@ UNITTEST_START fail_unless(rc == CURLE_OK, "Curl_parse_login_details() failed"); - rc = Curl_disconnect(empty, empty->easy_conn, FALSE); + rc = Curl_disconnect(empty, empty->conn, FALSE); fail_unless(rc == CURLE_OK, "Curl_disconnect() with dead_connection set FALSE failed"); -- cgit v1.2.3