projects
/
privoxy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add test scenario forward-to-socks-proxy
[privoxy.git]
/
client-tags.c
diff --git
a/client-tags.c
b/client-tags.c
index
6ba60f6
..
d8cbb35
100644
(file)
--- a/
client-tags.c
+++ b/
client-tags.c
@@
-43,6
+43,7
@@
#include "miscutil.h"
#include "errlog.h"
#include "parsers.h"
#include "miscutil.h"
#include "errlog.h"
#include "parsers.h"
+#include "urlmatch.h"
struct client_specific_tag
{
struct client_specific_tag
{
@@
-243,7
+244,7
@@
void get_tag_list_for_client(struct list *tag_list,
}
else
{
}
else
{
- log_error(LOG_LEVEL_TAGGING, "Enlisting tag '%s' for client %s",
+ log_error(LOG_LEVEL_TAGGING, "Enlisting tag '%s' for client %s
.
",
enabled_tags->name, client_address);
enlist(tag_list, enabled_tags->name);
}
enabled_tags->name, client_address);
enlist(tag_list, enabled_tags->name);
}
@@
-279,7
+280,7
@@
time_t get_next_tag_timeout_for_client(const char *client_address)
while (enabled_tags != NULL)
{
log_error(LOG_LEVEL_TAGGING,
while (enabled_tags != NULL)
{
log_error(LOG_LEVEL_TAGGING,
- "Evaluating tag '%s' for client %s. End of life %ld",
+ "Evaluating tag '%s' for client %s. End of life %ld
.
",
enabled_tags->name, client_address, enabled_tags->end_of_life);
if (enabled_tags->end_of_life)
{
enabled_tags->name, client_address, enabled_tags->end_of_life);
if (enabled_tags->end_of_life)
{
@@
-565,7
+566,8
@@
jb_err enable_client_specific_tag(struct client_state *csp,
if (client_has_requested_tag(csp->client_address, tag_name))
{
log_error(LOG_LEVEL_TAGGING,
if (client_has_requested_tag(csp->client_address, tag_name))
{
log_error(LOG_LEVEL_TAGGING,
- "Tag '%s' already enabled for client '%s'", tag->name, csp->client_address);
+ "Tag '%s' already enabled for client '%s'.",
+ tag->name, csp->client_address);
}
else
{
}
else
{
@@
-611,12
+613,12
@@
jb_err disable_client_specific_tag(struct client_state *csp, const char *tag_nam
{
remove_tag_for_client(csp->client_address, tag_name);
log_error(LOG_LEVEL_TAGGING,
{
remove_tag_for_client(csp->client_address, tag_name);
log_error(LOG_LEVEL_TAGGING,
- "Tag '%s' disabled for client '%s'", tag->name, csp->client_address);
+ "Tag '%s' disabled for client '%s'
.
", tag->name, csp->client_address);
}
else
{
log_error(LOG_LEVEL_TAGGING,
}
else
{
log_error(LOG_LEVEL_TAGGING,
- "Tag '%s' currently not set for client '%s'",
+ "Tag '%s' currently not set for client '%s'
.
",
tag->name, csp->client_address);
}
tag->name, csp->client_address);
}
@@
-657,9
+659,9
@@
int client_tag_match(const struct pattern_spec *pattern,
for (tag = tags->first; tag != NULL; tag = tag->next)
{
for (tag = tags->first; tag != NULL; tag = tag->next)
{
- if (
0 == regexec(pattern->pattern.tag_regex, tag->str, 0, NULL, 0
))
+ if (
regex_matches(pattern->pattern.tag_regex, tag->str
))
{
{
- log_error(LOG_LEVEL_TAGGING, "
Tag '%s' matches
", tag->str);
+ log_error(LOG_LEVEL_TAGGING, "
Client tag '%s' matches.
", tag->str);
return 1;
}
}
return 1;
}
}