From 50735544c1caee405c3bdf0845bed78522b92f0c Mon Sep 17 00:00:00 2001 From: Andrey Uzunov Date: Sat, 20 Jul 2013 19:21:10 +0000 Subject: mhd2spdy: code formatting done and old code removed --- src/examples/mhd2spdy_structures.c | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'src/examples/mhd2spdy_structures.c') diff --git a/src/examples/mhd2spdy_structures.c b/src/examples/mhd2spdy_structures.c index da29581c..2982b2a4 100644 --- a/src/examples/mhd2spdy_structures.c +++ b/src/examples/mhd2spdy_structures.c @@ -32,7 +32,6 @@ free_uri(struct URI * uri) free(uri->full_uri); free(uri->scheme); free(uri->host_and_port); - //free(uri->host_and_port_for_connecting); free(uri->host); free(uri->path); free(uri->path_and_more); @@ -43,6 +42,7 @@ free_uri(struct URI * uri) } } + int init_parse_uri(regex_t * preg) { @@ -66,7 +66,9 @@ deinit_parse_uri(regex_t * preg) } int -parse_uri(regex_t * preg, char * full_uri, struct URI ** uri) +parse_uri(regex_t * preg, + char * full_uri, + struct URI ** uri) { int ret; char *colon; @@ -94,22 +96,8 @@ parse_uri(regex_t * preg, char * full_uri, struct URI ** uri) if(NULL == colon) { (*uri)->host = strdup((*uri)->host_and_port); - /*if(0 == strcasecmp("http", uri->scheme)) - { - uri->port = 80; - asprintf(&(uri->host_and_port_for_connecting), "%s:80", uri->host_and_port); - } - else if(0 == strcasecmp("https", uri->scheme)) - { - uri->port = 443; - asprintf(&(uri->host_and_port_for_connecting), "%s:443", uri->host_and_port); - } - else - { - PRINT_INFO("no standard scheme!"); - */(*uri)->port = 0; - /*uri->host_and_port_for_connecting = strdup(uri->host_and_port); - }*/ + (*uri)->port = 0; + return 0; } @@ -125,6 +113,7 @@ parse_uri(regex_t * preg, char * full_uri, struct URI ** uri) return 0; } + void free_proxy(struct Proxy *proxy) { @@ -136,6 +125,7 @@ free_proxy(struct Proxy *proxy) free(proxy); } +//TODO remove this void *au_malloc(size_t size) { void *new_memory; -- cgit v1.2.3