Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
144f91487f |
No files matched your search
@@ -1,12 +1,3 @@
|
|||||||
2002-04-26 Robert James Kaes <rjkaes@flarenet.com>
|
|
||||||
|
|
||||||
* src/log.c (send_stored_logs): Check the return value of
|
|
||||||
hashmap_first() since it could be -1, indicating an empty hashmap.
|
|
||||||
|
|
||||||
* src/reqs.c (process_client_headers):
|
|
||||||
(process_server_headers): Test the return value of hashmap_first()
|
|
||||||
since the hashmap could be empty (returning a -1 via hashmap_first.)
|
|
||||||
|
|
||||||
2002-04-25 Robert James Kaes <rjkaes@flarenet.com>
|
2002-04-25 Robert James Kaes <rjkaes@flarenet.com>
|
||||||
|
|
||||||
* src/reqs.c (remove_connection_headers): Handle both the
|
* src/reqs.c (remove_connection_headers): Handle both the
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
dnl $Id: configure.ac,v 2.22 2002-04-26 16:59:44 rjkaes Exp $
|
dnl $Id: configure.ac,v 2.21 2002-04-25 19:00:03 rjkaes Exp $
|
||||||
|
|
||||||
dnl Devlopers, please strive to achieve this order:
|
dnl Devlopers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@@ -14,7 +14,7 @@ dnl 8. System services
|
|||||||
dnl
|
dnl
|
||||||
dnl Read the Autoconf manual for details.
|
dnl Read the Autoconf manual for details.
|
||||||
|
|
||||||
AC_INIT([tinyproxy], [1.5.0rc6], [rjkaes@users.sourceforge.net])
|
AC_INIT([tinyproxy], [1.5.0rc5], [rjkaes@users.sourceforge.net])
|
||||||
AC_CONFIG_SRCDIR([src/tinyproxy.c])
|
AC_CONFIG_SRCDIR([src/tinyproxy.c])
|
||||||
AC_PREREQ(2.52)
|
AC_PREREQ(2.52)
|
||||||
|
|
||||||
|
|||||||
+2
-3
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: hashmap.c,v 1.7 2002-04-26 16:51:29 rjkaes Exp $
|
/* $Id: hashmap.c,v 1.6 2002-04-25 18:55:56 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* A hashmap implementation. The keys are case-insensitive NULL terminated
|
* A hashmap implementation. The keys are case-insensitive NULL terminated
|
||||||
* strings, and the data is arbitrary lumps of data. Copies of both the
|
* strings, and the data is arbitrary lumps of data. Copies of both the
|
||||||
@@ -248,6 +248,7 @@ hashmap_insert(hashmap_t map, const char *key,
|
|||||||
ptr->len = len;
|
ptr->len = len;
|
||||||
|
|
||||||
map->end_iterator++;
|
map->end_iterator++;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -259,8 +260,6 @@ hashmap_insert(hashmap_t map, const char *key,
|
|||||||
hashmap_iter
|
hashmap_iter
|
||||||
hashmap_first(hashmap_t map)
|
hashmap_first(hashmap_t map)
|
||||||
{
|
{
|
||||||
assert(map != NULL);
|
|
||||||
|
|
||||||
if (!map)
|
if (!map)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: log.c,v 1.19 2002-04-26 16:50:55 rjkaes Exp $
|
/* $Id: log.c,v 1.18 2002-04-25 18:56:43 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* Logs the various messages which tinyproxy produces to either a log file or
|
* Logs the various messages which tinyproxy produces to either a log file or
|
||||||
* the syslog daemon. Not much to it...
|
* the syslog daemon. Not much to it...
|
||||||
@@ -159,14 +159,13 @@ send_stored_logs(void)
|
|||||||
char *level;
|
char *level;
|
||||||
char *string;
|
char *string;
|
||||||
|
|
||||||
iter = hashmap_first(log_message_storage);
|
for (iter = hashmap_first(log_message_storage);
|
||||||
if (iter >= 0) {
|
iter != hashmap_is_end(log_message_storage, iter);
|
||||||
for ( ; iter != hashmap_is_end(log_message_storage, iter); ++iter) {
|
++iter) {
|
||||||
hashmap_return_entry(log_message_storage,
|
hashmap_return_entry(log_message_storage,
|
||||||
iter,
|
iter,
|
||||||
&string,
|
&string,
|
||||||
(void **)&level);
|
(void **)&level);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hashmap_delete(log_message_storage);
|
hashmap_delete(log_message_storage);
|
||||||
|
|||||||
+22
-24
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: reqs.c,v 1.68 2002-04-26 16:43:20 rjkaes Exp $
|
/* $Id: reqs.c,v 1.67 2002-04-25 19:20:56 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* This is where all the work in tinyproxy is actually done. Incoming
|
* This is where all the work in tinyproxy is actually done. Incoming
|
||||||
* connections have a new thread created for them. The thread then
|
* connections have a new thread created for them. The thread then
|
||||||
@@ -769,19 +769,18 @@ process_client_headers(struct conn_s *connptr)
|
|||||||
/*
|
/*
|
||||||
* Output all the remaining headers to the remote machine.
|
* Output all the remaining headers to the remote machine.
|
||||||
*/
|
*/
|
||||||
iter = hashmap_first(hashofheaders);
|
for (iter = hashmap_first(hashofheaders);
|
||||||
if (iter >= 0) {
|
!hashmap_is_end(hashofheaders, iter);
|
||||||
for ( ; !hashmap_is_end(hashofheaders, iter); ++iter) {
|
++iter) {
|
||||||
hashmap_return_entry(hashofheaders,
|
hashmap_return_entry(hashofheaders,
|
||||||
iter,
|
iter,
|
||||||
&data,
|
&data,
|
||||||
(void**)&header);
|
(void**)&header);
|
||||||
|
|
||||||
if (!is_anonymous_enabled() || anonymous_search(data) <= 0) {
|
if (!is_anonymous_enabled() || anonymous_search(data) <= 0) {
|
||||||
write_message(connptr->server_fd,
|
write_message(connptr->server_fd,
|
||||||
"%s: %s\r\n",
|
"%s: %s\r\n",
|
||||||
data, header);
|
data, header);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -880,18 +879,17 @@ process_server_headers(struct conn_s *connptr)
|
|||||||
/*
|
/*
|
||||||
* Okay, output all the remaining headers to the client.
|
* Okay, output all the remaining headers to the client.
|
||||||
*/
|
*/
|
||||||
iter = hashmap_first(hashofheaders);
|
for (iter = hashmap_first(hashofheaders);
|
||||||
if (iter >= 0) {
|
!hashmap_is_end(hashofheaders, iter);
|
||||||
for ( ; !hashmap_is_end(hashofheaders, iter); ++iter) {
|
++iter) {
|
||||||
hashmap_return_entry(hashofheaders,
|
hashmap_return_entry(hashofheaders,
|
||||||
iter,
|
iter,
|
||||||
&data,
|
&data,
|
||||||
(void **)&header);
|
(void **)&header);
|
||||||
|
|
||||||
write_message(connptr->client_fd,
|
write_message(connptr->client_fd,
|
||||||
"%s: %s\r\n",
|
"%s: %s\r\n",
|
||||||
data, header);
|
data, header);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
hashmap_delete(hashofheaders);
|
hashmap_delete(hashofheaders);
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user