|
|
5cd88c |
--- contrib/halog/halog.c.orig 2014-07-25 01:56:07.000000000 -0500
|
|
|
5cd88c |
+++ contrib/halog/halog.c 2014-07-25 15:24:56.996876765 -0500
|
|
|
5cd88c |
@@ -462,7 +462,7 @@ int convert_date(const char *field)
|
|
|
5cd88c |
{
|
|
|
5cd88c |
unsigned int h, m, s, ms;
|
|
|
5cd88c |
unsigned char c;
|
|
|
5cd88c |
- const char *b, *e;
|
|
|
5cd88c |
+ const char *e;
|
|
|
5cd88c |
|
|
|
5cd88c |
h = m = s = ms = 0;
|
|
|
5cd88c |
e = field;
|
|
|
5cd88c |
@@ -477,7 +477,6 @@ int convert_date(const char *field)
|
|
|
5cd88c |
}
|
|
|
5cd88c |
|
|
|
5cd88c |
/* hour + ':' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -488,7 +487,6 @@ int convert_date(const char *field)
|
|
|
5cd88c |
goto out_err;
|
|
|
5cd88c |
|
|
|
5cd88c |
/* minute + ':' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -499,7 +497,6 @@ int convert_date(const char *field)
|
|
|
5cd88c |
goto out_err;
|
|
|
5cd88c |
|
|
|
5cd88c |
/* second + '.' or ']' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -512,7 +509,6 @@ int convert_date(const char *field)
|
|
|
5cd88c |
/* if there's a '.', we have milliseconds */
|
|
|
5cd88c |
if (c == (unsigned char)('.' - '0')) {
|
|
|
5cd88c |
/* millisecond second + ']' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -535,7 +531,7 @@ int convert_date_to_timestamp(const char
|
|
|
5cd88c |
{
|
|
|
5cd88c |
unsigned int d, mo, y, h, m, s;
|
|
|
5cd88c |
unsigned char c;
|
|
|
5cd88c |
- const char *b, *e;
|
|
|
5cd88c |
+ const char *e;
|
|
|
5cd88c |
time_t rawtime;
|
|
|
5cd88c |
static struct tm * timeinfo;
|
|
|
5cd88c |
static int last_res;
|
|
|
5cd88c |
@@ -622,7 +618,6 @@ int convert_date_to_timestamp(const char
|
|
|
5cd88c |
}
|
|
|
5cd88c |
|
|
|
5cd88c |
/* hour + ':' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -633,7 +628,6 @@ int convert_date_to_timestamp(const char
|
|
|
5cd88c |
goto out_err;
|
|
|
5cd88c |
|
|
|
5cd88c |
/* minute + ':' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -644,7 +638,6 @@ int convert_date_to_timestamp(const char
|
|
|
5cd88c |
goto out_err;
|
|
|
5cd88c |
|
|
|
5cd88c |
/* second + '.' or ']' */
|
|
|
5cd88c |
- b = e;
|
|
|
5cd88c |
while (1) {
|
|
|
5cd88c |
c = *(e++) - '0';
|
|
|
5cd88c |
if (c > 9)
|
|
|
5cd88c |
@@ -686,10 +679,10 @@ void truncated_line(int linenum, const c
|
|
|
5cd88c |
|
|
|
5cd88c |
int main(int argc, char **argv)
|
|
|
5cd88c |
{
|
|
|
5cd88c |
- const char *b, *e, *p, *time_field, *accept_field, *source_field;
|
|
|
5cd88c |
+ const char *b, *p, *time_field, *accept_field, *source_field;
|
|
|
5cd88c |
const char *filter_term_code_name = NULL;
|
|
|
5cd88c |
const char *output_file = NULL;
|
|
|
5cd88c |
- int f, last, err;
|
|
|
5cd88c |
+ int f, last;
|
|
|
5cd88c |
struct timer *t = NULL;
|
|
|
5cd88c |
struct eb32_node *n;
|
|
|
5cd88c |
struct url_stat *ustat = NULL;
|
|
|
5cd88c |
@@ -941,7 +934,7 @@ int main(int argc, char **argv)
|
|
|
5cd88c |
}
|
|
|
5cd88c |
}
|
|
|
5cd88c |
|
|
|
5cd88c |
- e = field_stop(time_field + 1);
|
|
|
5cd88c |
+ field_stop(time_field + 1);
|
|
|
5cd88c |
/* we have field TIME_FIELD in [time_field]..[e-1] */
|
|
|
5cd88c |
p = time_field;
|
|
|
5cd88c |
f = 0;
|
|
|
5cd88c |
@@ -965,17 +958,15 @@ int main(int argc, char **argv)
|
|
|
5cd88c |
}
|
|
|
5cd88c |
}
|
|
|
5cd88c |
|
|
|
5cd88c |
- e = field_stop(time_field + 1);
|
|
|
5cd88c |
+ field_stop(time_field + 1);
|
|
|
5cd88c |
/* we have field TIME_FIELD in [time_field]..[e-1], let's check only the response time */
|
|
|
5cd88c |
|
|
|
5cd88c |
p = time_field;
|
|
|
5cd88c |
- err = 0;
|
|
|
5cd88c |
f = 0;
|
|
|
5cd88c |
while (!SEP(*p)) {
|
|
|
5cd88c |
tps = str2ic(p);
|
|
|
5cd88c |
if (tps < 0) {
|
|
|
5cd88c |
tps = -1;
|
|
|
5cd88c |
- err = 1;
|
|
|
5cd88c |
}
|
|
|
5cd88c |
if (++f == 4)
|
|
|
5cd88c |
break;
|
|
|
5cd88c |
@@ -1701,7 +1692,7 @@ void filter_count_ip(const char *source_
|
|
|
5cd88c |
void filter_graphs(const char *accept_field, const char *time_field, struct timer **tptr)
|
|
|
5cd88c |
{
|
|
|
5cd88c |
struct timer *t2;
|
|
|
5cd88c |
- const char *e, *p;
|
|
|
5cd88c |
+ const char *p;
|
|
|
5cd88c |
int f, err, array[5];
|
|
|
5cd88c |
|
|
|
5cd88c |
if (!time_field) {
|
|
|
5cd88c |
@@ -1712,7 +1703,7 @@ void filter_graphs(const char *accept_fi
|
|
|
5cd88c |
}
|
|
|
5cd88c |
}
|
|
|
5cd88c |
|
|
|
5cd88c |
- e = field_stop(time_field + 1);
|
|
|
5cd88c |
+ field_stop(time_field + 1);
|
|
|
5cd88c |
/* we have field TIME_FIELD in [time_field]..[e-1] */
|
|
|
5cd88c |
|
|
|
5cd88c |
p = time_field;
|