diff options
author | asmodai <asmodai@FreeBSD.org> | 2002-04-07 17:41:33 +0000 |
---|---|---|
committer | asmodai <asmodai@FreeBSD.org> | 2002-04-07 17:41:33 +0000 |
commit | ffbac76a7eb23c6b7769dc83e7a0b2b8129f9eb6 (patch) | |
tree | 39685a09e9c37084f3a37af4a51348ef447f8885 /release/picobsd/tinyware | |
parent | b88a08173b4b2ed7f1190fe958f1a20bf9e71aa9 (diff) | |
download | FreeBSD-src-ffbac76a7eb23c6b7769dc83e7a0b2b8129f9eb6.zip FreeBSD-src-ffbac76a7eb23c6b7769dc83e7a0b2b8129f9eb6.tar.gz |
Give functions proper return type, since the default is an integer, where
the author obviously meant a void since he doesn't return any values.
One caveat, http_request has three return()'s, but doesn't do anything
with it. Either the code needs to be rewritten to take care of proper
error handling on that point, or the returns ripped out. I made it void
for now.
Diffstat (limited to 'release/picobsd/tinyware')
-rw-r--r-- | release/picobsd/tinyware/simple_httpd/simple_httpd.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/release/picobsd/tinyware/simple_httpd/simple_httpd.c b/release/picobsd/tinyware/simple_httpd/simple_httpd.c index f02641d..f497c0b 100644 --- a/release/picobsd/tinyware/simple_httpd/simple_httpd.c +++ b/release/picobsd/tinyware/simple_httpd/simple_httpd.c @@ -105,6 +105,7 @@ init_servconnection(void) /* * Wait here until we see an incoming http request */ +void wait_connection(void) { int lg; @@ -121,7 +122,8 @@ wait_connection(void) /* * Print timestamp for HTTP HEAD and GET */ -http_date() +void +http_date(void) { time_t tl; char buff[50]; @@ -135,6 +137,7 @@ http_date() /* * Send data to the open socket */ +void http_output(char *html) { write(con_sock, html, strlen(html)); @@ -146,6 +149,7 @@ http_output(char *html) * Create and write the log information to file * Log file format is one line per entry */ +void log_line(char *req) { char log_buff[256]; @@ -189,6 +193,7 @@ log_line(char *req) * We have a connection. Identify what type of request GET, HEAD, CGI, etc * and do what needs to be done */ +void http_request() { int fd, lg, i; @@ -345,6 +350,7 @@ end_request: * Should satisfy simple httpd needs. For more demanding situations * apache is probably a better (but much larger) choice. */ +int main(int argc, char *argv[]) { extern char *optarg; |