summaryrefslogtreecommitdiff
path: root/src/mod_proxy_core_protocol.c
diff options
context:
space:
mode:
authorstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
committerstbuehler <stbuehler@152afb58-edef-0310-8abb-c4023f1b3aa9>2015-09-18 15:15:18 +0000
commit8b2630a82fbecfd57fa38aebb397a755936690e5 (patch)
treea9cfcd7bb5bea87d63fc8ef81c8456a130a249bc /src/mod_proxy_core_protocol.c
parente57c8295ebe92b58ca3e68fa8ea8f70d4b0b4cee (diff)
downloadlighttpd-master.tar.gz
add README to point to lighttpd-1.4.x as stableHEADmaster
git-svn-id: svn://svn.lighttpd.net/lighttpd/trunk@3041 152afb58-edef-0310-8abb-c4023f1b3aa9
Diffstat (limited to 'src/mod_proxy_core_protocol.c')
-rw-r--r--src/mod_proxy_core_protocol.c66
1 files changed, 0 insertions, 66 deletions
diff --git a/src/mod_proxy_core_protocol.c b/src/mod_proxy_core_protocol.c
deleted file mode 100644
index 66513df5..00000000
--- a/src/mod_proxy_core_protocol.c
+++ /dev/null
@@ -1,66 +0,0 @@
-#include <stdlib.h>
-
-#include "mod_proxy_core.h"
-#include "mod_proxy_core_protocol.h"
-
-static proxy_protocols *protocols = NULL;
-static buffer *protocol_names = NULL;
-
-proxy_protocol *proxy_protocol_init(void) {
- proxy_protocol *protocol;
-
- protocol = calloc(1, sizeof(*protocol));
-
- return protocol;
-}
-
-void proxy_protocol_free(proxy_protocol *protocol) {
- if (!protocol) return;
-
- buffer_free(protocol->name);
-
- free(protocol);
-}
-
-void proxy_protocols_init(void) {
- if(protocols) return;
- protocols = calloc(1, sizeof(*protocols));
- protocol_names = buffer_init();
-}
-
-void proxy_protocols_free(void) {
- if(!protocols) return;
- ARRAY_STATIC_FREE(protocols, proxy_protocol, element, proxy_protocol_free(element));
-
- free(protocols);
- buffer_free(protocol_names);
-}
-
-void proxy_protocols_register(proxy_protocol *protocol) {
- if(!protocols) return;
- ARRAY_STATIC_PREPARE_APPEND(protocols);
-
- protocols->ptr[protocols->used++] = protocol;
-
- /* append protocol name to list of names. */
- if(!buffer_is_empty(protocol_names)) {
- buffer_append_string_len(protocol_names, CONST_STR_LEN(", '"));
- } else {
- buffer_append_string_len(protocol_names, CONST_STR_LEN("'"));
- }
- buffer_append_string(protocol_names, BUF_STR(protocol->name));
- buffer_append_string_len(protocol_names, CONST_STR_LEN("'"));
-}
-
-proxy_protocol *proxy_get_protocol(buffer *name) {
- if(!protocols) return NULL;
-
- FOREACH(protocols, proxy_protocol, element, if(buffer_is_equal(element->name,name)) return element; );
-
- return NULL;
-}
-
-const char *proxy_available_protocols() {
- return BUF_STR(protocol_names);
-}
-