Commit 07b6e736 authored by Patrick Monnerat's avatar Patrick Monnerat
Browse files

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

in the connectdata structure by a single handler table ptr.
parent 2741f97a
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -6,6 +6,10 @@

                                  Changelog

Patrick M (12 October 2007)
- Added per-protocol callback static tables, replacing callback ptr storage
  in the connectdata structure by a single handler table ptr.

Dan F (11 October 2007)
- Fixed the -l option of runtests.pl

+6 −1
Original line number Diff line number Diff line
@@ -24,6 +24,11 @@
 * $Id$
 ***************************************************************************/
#ifndef CURL_DISABLE_LDAP
CURLcode Curl_ldap(struct connectdata *conn, bool *done);
extern const struct Curl_handler Curl_handler_ldap;

#ifdef HAVE_LDAP_SSL
extern const struct Curl_handler Curl_handler_ldaps;
#endif

#endif
#endif /* __CURL_LDAP_H */
+28 −1
Original line number Diff line number Diff line
@@ -82,6 +82,33 @@
/* The last #include file should be: */
#include "memdebug.h"


/*
 * Forward declarations.
 */

static CURLcode Curl_dict(struct connectdata *conn, bool *done);

/*
 * DICT protocol handler.
 */

const struct Curl_handler Curl_handler_dict = {
  "DICT",                               /* scheme */
  NULL,                                 /* setup_connection */
  Curl_dict,                            /* do_it */
  NULL,                                 /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  PORT_DICT,                            /* defport */
  PROT_DICT                             /* protocol */
};

static char *unescape_word(struct SessionHandle *data, const char *inp)
{
  char *newp;
@@ -115,7 +142,7 @@ static char *unescape_word(struct SessionHandle *data, const char *inp)
  return dictp;
}

CURLcode Curl_dict(struct connectdata *conn, bool *done)
static CURLcode Curl_dict(struct connectdata *conn, bool *done)
{
  char *word;
  char *eword;
+1 −2
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@
 * $Id$
 ***************************************************************************/
#ifndef CURL_DISABLE_DICT
CURLcode Curl_dict(struct connectdata *conn, bool *done);
CURLcode Curl_dict_done(struct connectdata *conn);
extern const struct Curl_handler Curl_handler_dict;
#endif
#endif
+28 −1
Original line number Diff line number Diff line
@@ -89,6 +89,33 @@
/* The last #include file should be: */
#include "memdebug.h"


/*
 * Forward declarations.
 */

static CURLcode Curl_file(struct connectdata *, bool *done);

/*
 * FILE scheme handler.
 */

const struct Curl_handler Curl_handler_file = {
  "FILE",                               /* scheme */
  NULL,                                 /* setup_connection */
  Curl_file,                            /* do_it */
  Curl_file_done,                       /* done */
  NULL,                                 /* do_more */
  NULL,                                 /* connect_it */
  NULL,                                 /* connecting */
  NULL,                                 /* doing */
  NULL,                                 /* proto_getsock */
  NULL,                                 /* doing_getsock */
  NULL,                                 /* disconnect */
  0,                                    /* defport */
  PROT_FILE                             /* protocol */
};

/*
 * Curl_file_connect() gets called from Curl_protocol_connect() to allow us to
 * do protocol-specific actions at connect-time.  We emulate a
@@ -316,7 +343,7 @@ static CURLcode file_upload(struct connectdata *conn)
 * opposed to sockets) we instead perform the whole do-operation in this
 * function.
 */
CURLcode Curl_file(struct connectdata *conn, bool *done)
static CURLcode Curl_file(struct connectdata *conn, bool *done)
{
  /* This implementation ignores the host name in conformance with
     RFC 1738. Only local files (reachable via the standard file system)
Loading