aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2011-05-19 22:28:28 +0200
committerYang Tse <yangsita@gmail.com>2011-05-19 22:28:28 +0200
commitb57853450802dd3d9a7bce9fb75dc644e912fdad (patch)
tree5175318a7b5a596851fdd41c11bd8a6629a2ba52 /tests
parent5db30a1d8c1250a787a65285499b949b92b0325f (diff)
tests: verify OPEN/CLOSESOCKETFUNCTION
Test 585: Fix opensocket return type, and avoid function name clash.
Diffstat (limited to 'tests')
-rw-r--r--tests/libtest/lib500.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/libtest/lib500.c b/tests/libtest/lib500.c
index 166bb85ab..bca5c2310 100644
--- a/tests/libtest/lib500.c
+++ b/tests/libtest/lib500.c
@@ -27,9 +27,9 @@
int counter;
-static int opensocket(void *clientp,
- curlsocktype purpose,
- struct curl_sockaddr *addr)
+static curl_socket_t tst_opensocket(void *clientp,
+ curlsocktype purpose,
+ struct curl_sockaddr *addr)
{
(void)clientp;
(void)purpose;
@@ -37,7 +37,7 @@ static int opensocket(void *clientp,
return socket(addr->family, addr->socktype, addr->protocol);
}
-static int closesocket(void *clientp, curl_socket_t sock)
+static int tst_closesocket(void *clientp, curl_socket_t sock)
{
(void)clientp;
printf("[CLOSE] counter: %d\n", counter--);
@@ -46,8 +46,8 @@ static int closesocket(void *clientp, curl_socket_t sock)
static void setupcallbacks(CURL *curl)
{
- curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, opensocket);
- curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, closesocket);
+ curl_easy_setopt(curl, CURLOPT_OPENSOCKETFUNCTION, tst_opensocket);
+ curl_easy_setopt(curl, CURLOPT_CLOSESOCKETFUNCTION, tst_closesocket);
counter = 0;
}