1
/*****************************************************************************
1
/***************************************************************************
3
3
* Project ___| | | | _ \| |
4
4
* / __| | | | |_) | |
5
5
* | (__| |_| | _ <| |___
6
6
* \___|\___/|_| \_\_____|
8
* Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
10
* In order to be useful for every potential user, curl and libcurl are
11
* dual-licensed under the MPL and the MIT/X-derivate licenses.
8
* Copyright (C) 1998 - 2004, Daniel Stenberg, <daniel@haxx.se>, et al.
10
* This software is licensed as described in the file COPYING, which
11
* you should have received as part of this distribution. The terms
12
* are also available at http://curl.haxx.se/docs/copyright.html.
13
14
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
14
15
* copies of the Software, and permit persons to whom the Software is
15
* furnished to do so, under the terms of the MPL or the MIT/X-derivate
16
* licenses. You may pick one of these licenses.
16
* furnished to do so, under the terms of the COPYING file.
18
18
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19
19
* KIND, either express or implied.
21
* $Id: dict.c,v 1.20 2001/12/11 13:13:01 bagder Exp $
22
*****************************************************************************/
21
* $Id: dict.c,v 1.34 2004/03/09 22:52:50 bagder Exp $
22
***************************************************************************/
92
90
CURLcode result=CURLE_OK;
93
91
struct SessionHandle *data=conn->data;
92
curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
95
94
char *path = conn->path;
96
long *bytecount = &conn->bytecount;
95
curl_off_t *bytecount = &conn->bytecount;
98
97
if(conn->bits.user_passwd) {
99
98
/* AUTH is missing */
129
128
if ((strategy == NULL) || (*strategy == (char)0)) {
130
129
strategy = (char *)".";
132
if ((nthdef == NULL) || (*nthdef == (char)0)) {
139
result = Curl_sendf(conn->firstsocket, conn,
132
result = Curl_sendf(sockfd, conn,
140
133
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
142
135
"%s " /* database */
152
145
failf(data, "Failed sending DICT request");
154
result = Curl_Transfer(conn, conn->firstsocket, -1, FALSE, bytecount,
147
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
155
148
-1, NULL); /* no upload */
179
172
if ((database == NULL) || (*database == (char)0)) {
180
173
database = (char *)"!";
182
if ((nthdef == NULL) || (*nthdef == (char)0)) {
189
result = Curl_sendf(conn->firstsocket, conn,
176
result = Curl_sendf(sockfd, conn,
190
177
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
192
179
"%s " /* database */
198
185
failf(data, "Failed sending DICT request");
200
result = Curl_Transfer(conn, conn->firstsocket, -1, FALSE, bytecount,
187
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,
201
188
-1, NULL); /* no upload */
215
202
if (ppath[i] == ':')
218
result = Curl_sendf(conn->firstsocket, conn,
205
result = Curl_sendf(sockfd, conn,
219
206
"CLIENT " LIBCURL_NAME " " LIBCURL_VERSION "\n"
221
208
"QUIT\n", ppath);
223
210
failf(data, "Failed sending DICT request");
225
result = Curl_Transfer(conn, conn->firstsocket, -1, FALSE, bytecount,
212
result = Curl_Transfer(conn, FIRSTSOCKET, -1, FALSE, bytecount,