Added per-protocol callback static tables, replacing callback ptr storage

in the connectdata structure by a single handler table ptr.
This commit is contained in:
Patrick Monnerat
2007-10-12 13:36:37 +00:00
parent 2741f97a69
commit 07b6e7363d
19 changed files with 713 additions and 410 deletions

View File

@@ -118,7 +118,52 @@ static void _ldap_free_urldesc (LDAPURLDesc *ludp);
#endif
CURLcode Curl_ldap(struct connectdata *conn, bool *done)
static CURLcode Curl_ldap(struct connectdata *conn, bool *done);
/*
* LDAP protocol handler.
*/
const struct Curl_handler Curl_handler_ldap = {
"LDAP", /* scheme */
NULL, /* setup_connection */
Curl_ldap, /* do_it */
NULL, /* done */
NULL, /* do_more */
NULL, /* connect_it */
NULL, /* connecting */
NULL, /* doing */
NULL, /* proto_getsock */
NULL, /* doing_getsock */
NULL, /* disconnect */
PORT_LDAP, /* defport */
PROT_LDAP /* protocol */
};
#ifdef HAVE_LDAP_SSL
/*
* LDAPS protocol handler.
*/
const struct Curl_handler Curl_handler_ldaps = {
"LDAPS", /* scheme */
NULL, /* setup_connection */
Curl_ldap, /* do_it */
NULL, /* done */
NULL, /* do_more */
NULL, /* connect_it */
NULL, /* connecting */
NULL, /* doing */
NULL, /* proto_getsock */
NULL, /* doing_getsock */
NULL, /* disconnect */
PORT_LDAPS, /* defport */
PROT_LDAP | PROT_SSL /* protocol */
};
#endif
static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
{
CURLcode status = CURLE_OK;
int rc = 0;