diff options
author | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-03-13 21:27:29 +0000 |
---|---|---|
committer | Robert James Kaes <rjkaes@users.sourceforge.net> | 2003-03-13 21:27:29 +0000 |
commit | 056bbf84bdf87b95b9da9599db237a3392a5fe62 (patch) | |
tree | 321580099d038eed35084f20b9aac6205fcbce70 /src/conns.c | |
parent | a830af509760d99d6ea2d30e8a848795ad97e2cc (diff) |
# Added variables to keep track of the variables to be substituted in
.html files displayed to the client [Steven Young]
Diffstat (limited to 'src/conns.c')
-rw-r--r-- | src/conns.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/conns.c b/src/conns.c index 013b681..74590b1 100644 --- a/src/conns.c +++ b/src/conns.c @@ -1,4 +1,4 @@ -/* $Id: conns.c,v 1.13 2002-11-13 17:47:40 rjkaes Exp $ +/* $Id: conns.c,v 1.14 2003-03-13 21:27:29 rjkaes Exp $ * * Create and free the connection structure. One day there could be * other connection related tasks put here, but for now the header @@ -59,6 +59,8 @@ initialize_conn(int client_fd, const char* ipaddr, const char* string_addr) connptr->request_line = NULL; /* These store any error strings */ + connptr->error_variables = NULL; + connptr->error_variable_count = 0; connptr->error_string = NULL; connptr->error_number = -1; @@ -110,6 +112,18 @@ destroy_conn(struct conn_s *connptr) if (connptr->request_line) safefree(connptr->request_line); + if (connptr->error_variables) { + int i; + + for(i = 0; connptr->error_variables[i]; i++) { + safefree(connptr->error_variables[i]->error_key); + safefree(connptr->error_variables[i]->error_val); + safefree(connptr->error_variables[i]); + } + + safefree(connptr->error_variables); + } + if (connptr->error_string) safefree(connptr->error_string); |