The hashmap API changed, so this function needs to be changed as well.
This commit is contained in:
parent
ce51a74045
commit
d1031e2c8f
22
src/log.c
22
src/log.c
@ -1,4 +1,4 @@
|
|||||||
/* $Id: log.c,v 1.17 2002-04-22 19:34:19 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...
|
||||||
@ -155,19 +155,19 @@ log_message(int level, char *fmt, ...)
|
|||||||
void
|
void
|
||||||
send_stored_logs(void)
|
send_stored_logs(void)
|
||||||
{
|
{
|
||||||
vector_t messages;
|
hashmap_iter iter;
|
||||||
char *level;
|
char *level;
|
||||||
char *string;
|
char *string;
|
||||||
int i;
|
|
||||||
|
for (iter = hashmap_first(log_message_storage);
|
||||||
messages = hashmap_keys(log_message_storage);
|
iter != hashmap_is_end(log_message_storage, iter);
|
||||||
for (i = 0; i < vector_length(messages); i++) {
|
++iter) {
|
||||||
vector_getentry(messages, i, (void **)&string);
|
hashmap_return_entry(log_message_storage,
|
||||||
hashmap_search(log_message_storage, string, (void **)&level);
|
iter,
|
||||||
|
&string,
|
||||||
log_message(atoi(level), string);
|
(void **)&level);
|
||||||
}
|
}
|
||||||
vector_delete(messages);
|
|
||||||
hashmap_delete(log_message_storage);
|
hashmap_delete(log_message_storage);
|
||||||
log_message_storage = NULL;
|
log_message_storage = NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user