diff options
-rw-r--r-- | gtk/http_stat.c | 14 | ||||
-rw-r--r-- | tap-httpstat.c | 13 |
2 files changed, 13 insertions, 14 deletions
diff --git a/gtk/http_stat.c b/gtk/http_stat.c index 5eb30b5132..069ceb285e 100644 --- a/gtk/http_stat.c +++ b/gtk/http_stat.c @@ -1,7 +1,7 @@ /* http_stat.c * http_stat 2003 Jean-Michel FAYARD * - * $Id: http_stat.c,v 1.6 2003/09/26 02:09:44 guy Exp $ + * $Id: http_stat.c,v 1.7 2003/09/29 19:18:44 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -27,6 +27,8 @@ #endif #include <gtk/gtk.h> +#include <string.h> + #include "epan/packet_info.h" #include "epan/epan.h" #include "menu.h" @@ -34,10 +36,9 @@ #include "dlg_utils.h" #include "tap.h" #include "../register.h" +#include "../packet-http.h" #include "../globals.h" #include "compat_macros.h" -#include "../packet-http.h" -#include <string.h> /* used to keep track of the statictics for an entire program interface */ @@ -170,13 +171,13 @@ http_draw_hash_requests( gchar *key _U_ , http_request_methode_t *data, gchar * gtk_label_set( GTK_LABEL(data->widget), string_buff); } } - static void http_draw_hash_responses( gint * key _U_ , http_response_code_t *data, gchar * string_buff) { - if (data==NULL) + if (data==NULL) { g_warning("C'est quoi ce borderl key=%d\n", *key); + } if (data->packets==0) return; /*sprintf(string_buff, "%d packets %d:%s", data->packets, data->response_code, data->name); */ @@ -364,7 +365,6 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) g_free(sp); } - /* When called, this function will create a new instance of gtk_httpstat. */ static void @@ -372,8 +372,8 @@ gtk_httpstat_init(char *optarg) { httpstat_t *sp; char *filter=NULL; - char *title=NULL; GString *error_string; + char *title=NULL; GtkWidget *main_vb, *separator, *informational_fr, *success_fr, *redirection_fr, *client_errors_fr, *server_errors_fr, *request_fr; diff --git a/tap-httpstat.c b/tap-httpstat.c index f4a024cec4..3b2d38d0fe 100644 --- a/tap-httpstat.c +++ b/tap-httpstat.c @@ -1,7 +1,7 @@ /* tap-httpstat.c * tap-httpstat 2003 Jean-Michel FAYARD * - * $Id: tap-httpstat.c,v 1.2 2003/09/02 23:09:10 guy Exp $ + * $Id: tap-httpstat.c,v 1.3 2003/09/29 19:18:43 jmayer Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -27,13 +27,13 @@ #endif #include <stdio.h> +#include <string.h> #include "epan/packet_info.h" #include "epan/value_string.h" #include "tap.h" #include "register.h" #include "packet-http.h" -#include <string.h> /* used to keep track of the statictics for an entire program interface */ @@ -48,7 +48,7 @@ typedef struct _http_stats_t { * which means we captured 3 reply http/1.1 404 Not Found */ typedef struct _http_response_code_t { guint32 packets; /* 3 */ - guint response_code; /* 404 */ + guint response_code; /* 404 */ gchar *name; /* Not Found */ httpstat_t *sp; } http_response_code_t; @@ -144,7 +144,7 @@ http_draw_hash_requests( gchar *key _U_ , http_request_methode_t *data, gchar * static void http_draw_hash_responses( gint * key _U_ , http_response_code_t *data, char * format) { - if (data==NULL){ + if (data==NULL) { g_warning("C'est quoi ce borderl key=%d\n", *key); exit(EXIT_FAILURE); } @@ -198,7 +198,7 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, voi guint *key=g_malloc( sizeof(guint) ); http_response_code_t *sc; - *key=value->response_code ; + *key=value->response_code; sc = g_hash_table_lookup( sp->hash_responses, key); @@ -255,7 +255,6 @@ httpstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, voi } - static void httpstat_draw(void *psp ) { @@ -285,7 +284,7 @@ gtk_httpstat_init(char *optarg) { httpstat_t *sp; char *filter=NULL; - GString *error_string; + GString *error_string; if (!strncmp (optarg, "http,stat,", 10)){ filter=optarg+10; |