mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
const-ified the code, removed Curl_ldap_done()
This commit is contained in:
parent
3d4bb3be22
commit
b1c57788f3
12
lib/ldap.c
12
lib/ldap.c
@ -101,7 +101,7 @@ static void DynaClose(void)
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static void * DynaGetFunction(char *name)
|
static void * DynaGetFunction(const char *name)
|
||||||
{
|
{
|
||||||
void *func = NULL;
|
void *func = NULL;
|
||||||
|
|
||||||
@ -117,15 +117,11 @@ static void * DynaGetFunction(char *name)
|
|||||||
static int WriteProc(void *param, char *text, int len)
|
static int WriteProc(void *param, char *text, int len)
|
||||||
{
|
{
|
||||||
struct UrlData *data = (struct UrlData *)param;
|
struct UrlData *data = (struct UrlData *)param;
|
||||||
|
len = 0; /* prevent compiler warning */
|
||||||
Curl_client_write(data, CLIENTWRITE_BODY, text, 0);
|
Curl_client_write(data, CLIENTWRITE_BODY, text, 0);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
CURLcode Curl_ldap_done(struct connectdata *conn)
|
|
||||||
{
|
|
||||||
return CURLE_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
*/
|
*/
|
||||||
CURLcode Curl_ldap(struct connectdata *conn)
|
CURLcode Curl_ldap(struct connectdata *conn)
|
||||||
@ -194,7 +190,7 @@ CURLcode Curl_ldap(struct connectdata *conn)
|
|||||||
if (ldaptext) {
|
if (ldaptext) {
|
||||||
rc = ldap_entry2text(server, NULL, entryIterator, NULL,
|
rc = ldap_entry2text(server, NULL, entryIterator, NULL,
|
||||||
NULL, NULL, WriteProc, data,
|
NULL, NULL, WriteProc, data,
|
||||||
"", 0, 0);
|
(char *)"", 0, 0);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
failf(data, "LDAP: %s", ldap_err2string(rc));
|
failf(data, "LDAP: %s", ldap_err2string(rc));
|
||||||
status = CURLE_LDAP_SEARCH_FAILED;
|
status = CURLE_LDAP_SEARCH_FAILED;
|
||||||
@ -202,7 +198,7 @@ CURLcode Curl_ldap(struct connectdata *conn)
|
|||||||
} else {
|
} else {
|
||||||
rc = ldap_entry2html(server, NULL, entryIterator, NULL,
|
rc = ldap_entry2html(server, NULL, entryIterator, NULL,
|
||||||
NULL, NULL, WriteProc, data,
|
NULL, NULL, WriteProc, data,
|
||||||
"", 0, 0, NULL, NULL);
|
(char *)"", 0, 0, NULL, NULL);
|
||||||
if (rc != 0) {
|
if (rc != 0) {
|
||||||
failf(data, "LDAP: %s", ldap_err2string(rc));
|
failf(data, "LDAP: %s", ldap_err2string(rc));
|
||||||
status = CURLE_LDAP_SEARCH_FAILED;
|
status = CURLE_LDAP_SEARCH_FAILED;
|
||||||
|
Loading…
Reference in New Issue
Block a user