aboutsummaryrefslogtreecommitdiff
path: root/lib/pop3.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2013-04-12 20:16:57 +0100
committerSteve Holme <steve_holme@hotmail.com>2013-04-12 20:22:10 +0100
commit2da127abb54c6b5fa514f3a92ca5bce5e82d8120 (patch)
tree440d07964175ae2fb5d874f0f3efd0cf1519fb7c /lib/pop3.c
parentbc33f2200d12cc2c79920e85f94da23a27b62502 (diff)
pop3: Moved utility functions to end of pop3.c
Diffstat (limited to 'lib/pop3.c')
-rw-r--r--lib/pop3.c66
1 files changed, 33 insertions, 33 deletions
diff --git a/lib/pop3.c b/lib/pop3.c
index 10975edb9..dadb443d2 100644
--- a/lib/pop3.c
+++ b/lib/pop3.c
@@ -90,8 +90,6 @@
#include "memdebug.h"
/* Local API functions */
-static CURLcode pop3_parse_url_path(struct connectdata *conn);
-static CURLcode pop3_parse_custom_request(struct connectdata *conn);
static CURLcode pop3_regular_transfer(struct connectdata *conn, bool *done);
static CURLcode pop3_do(struct connectdata *conn, bool *done);
static CURLcode pop3_done(struct connectdata *conn, CURLcode status,
@@ -103,6 +101,8 @@ static int pop3_getsock(struct connectdata *conn, curl_socket_t *socks,
int numsocks);
static CURLcode pop3_doing(struct connectdata *conn, bool *dophase_done);
static CURLcode pop3_setup_connection(struct connectdata *conn);
+static CURLcode pop3_parse_url_path(struct connectdata *conn);
+static CURLcode pop3_parse_custom_request(struct connectdata *conn);
/*
* POP3 protocol handler.
@@ -1514,37 +1514,6 @@ static CURLcode pop3_disconnect(struct connectdata *conn,
return CURLE_OK;
}
-/***********************************************************************
- *
- * pop3_parse_url_path()
- *
- * Parse the URL path into separate path components.
- */
-static CURLcode pop3_parse_url_path(struct connectdata *conn)
-{
- /* The POP3 struct is already initialised in pop3_connect() */
- struct SessionHandle *data = conn->data;
- struct POP3 *pop3 = data->state.proto.pop3;
- const char *path = data->state.path;
-
- /* URL decode the path for the message ID */
- return Curl_urldecode(data, path, 0, &pop3->id, NULL, TRUE);
-}
-
-static CURLcode pop3_parse_custom_request(struct connectdata *conn)
-{
- CURLcode result = CURLE_OK;
- struct SessionHandle *data = conn->data;
- struct POP3 *pop3 = data->state.proto.pop3;
- const char *custom = data->set.str[STRING_CUSTOMREQUEST];
-
- /* URL decode the custom request */
- if(custom)
- result = Curl_urldecode(data, custom, 0, &pop3->custom, NULL, TRUE);
-
- return result;
-}
-
/* Call this when the DO phase has completed */
static CURLcode pop3_dophase_done(struct connectdata *conn, bool connected)
{
@@ -1639,6 +1608,37 @@ static CURLcode pop3_setup_connection(struct connectdata *conn)
return CURLE_OK;
}
+/***********************************************************************
+ *
+ * pop3_parse_url_path()
+ *
+ * Parse the URL path into separate path components.
+ */
+static CURLcode pop3_parse_url_path(struct connectdata *conn)
+{
+ /* The POP3 struct is already initialised in pop3_connect() */
+ struct SessionHandle *data = conn->data;
+ struct POP3 *pop3 = data->state.proto.pop3;
+ const char *path = data->state.path;
+
+ /* URL decode the path for the message ID */
+ return Curl_urldecode(data, path, 0, &pop3->id, NULL, TRUE);
+}
+
+static CURLcode pop3_parse_custom_request(struct connectdata *conn)
+{
+ CURLcode result = CURLE_OK;
+ struct SessionHandle *data = conn->data;
+ struct POP3 *pop3 = data->state.proto.pop3;
+ const char *custom = data->set.str[STRING_CUSTOMREQUEST];
+
+ /* URL decode the custom request */
+ if(custom)
+ result = Curl_urldecode(data, custom, 0, &pop3->custom, NULL, TRUE);
+
+ return result;
+}
+
/* This function scans the body after the end-of-body and writes everything
until the end is found */
CURLcode Curl_pop3_write(struct connectdata *conn, char *str, size_t nread)