aboutsummaryrefslogtreecommitdiffstats
path: root/ui/cli/tap-rtspstat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/cli/tap-rtspstat.c')
-rw-r--r--ui/cli/tap-rtspstat.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/ui/cli/tap-rtspstat.c b/ui/cli/tap-rtspstat.c
index 1a57e9488b..fbb52fe659 100644
--- a/ui/cli/tap-rtspstat.c
+++ b/ui/cli/tap-rtspstat.c
@@ -1,5 +1,5 @@
/* tap-rtspstat.c
- * tap-rtspstat March 2011
+ * tap-rtspstat March 2011
*
* Stephane GORSE (Orange Labs / France Telecom)
* Copied from Jean-Michel FAYARD's works (HTTP)
@@ -9,17 +9,17 @@
* Wireshark - Network traffic analyzer
* By Gerald Combs <gerald@wireshark.org>
* Copyright 1998 Gerald Combs
- *
+ *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
@@ -71,8 +71,8 @@ rtsp_init_hash( rtspstat_t *sp)
{
int i;
- sp->hash_responses = g_hash_table_new( g_int_hash, g_int_equal);
-
+ sp->hash_responses = g_hash_table_new( g_int_hash, g_int_equal);
+
for (i=0 ; rtsp_status_code_vals[i].strptr ; i++ )
{
gint *key = g_new (gint,1);
@@ -91,7 +91,7 @@ rtsp_draw_hash_requests( gchar *key _U_ , rtsp_request_methode_t *data, gchar *
{
if (data->packets==0)
return;
- printf( format, data->response, data->packets);
+ printf( format, data->response, data->packets);
}
static void
@@ -106,9 +106,9 @@ rtsp_draw_hash_responses( gint * key _U_ , rtsp_response_code_t *data, char * fo
/* " RTSP %3d %-35s %9d packets", */
printf(format, data->response_code, data->name, data->packets );
}
-
-
+
+
/* NOT USED at this moment */
/*
static void
@@ -120,12 +120,12 @@ rtsp_free_hash( gpointer key, gpointer value, gpointer user_data _U_ )
*/
static void
rtsp_reset_hash_responses(gchar *key _U_ , rtsp_response_code_t *data, gpointer ptr _U_ )
-{
+{
data->packets = 0;
}
static void
rtsp_reset_hash_requests(gchar *key _U_ , rtsp_request_methode_t *data, gpointer ptr _U_ )
-{
+{
data->packets = 0;
}
@@ -152,8 +152,8 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
rtsp_response_code_t *sc;
*key=value->response_code;
- sc = (rtsp_response_code_t *)g_hash_table_lookup(
- sp->hash_responses,
+ sc = (rtsp_response_code_t *)g_hash_table_lookup(
+ sp->hash_responses,
key);
if (sc==NULL){
/* non standard status code ; we classify it as others
@@ -178,19 +178,19 @@ rtspstat_packet(void *psp , packet_info *pinfo _U_, epan_dissect_t *edt _U_, con
else{
*key=599;
}
- sc = (rtsp_response_code_t *)g_hash_table_lookup(
- sp->hash_responses,
+ sc = (rtsp_response_code_t *)g_hash_table_lookup(
+ sp->hash_responses,
key);
if (sc==NULL)
return 0;
}
sc->packets++;
- }
+ }
else if (value->request_method){
rtsp_request_methode_t *sc;
- sc = (rtsp_request_methode_t *)g_hash_table_lookup(
- sp->hash_requests,
+ sc = (rtsp_request_methode_t *)g_hash_table_lookup(
+ sp->hash_requests,
value->request_method);
if (sc==NULL){
sc=g_new(rtsp_request_methode_t,1);
@@ -238,13 +238,13 @@ gtk_rtspstat_init(const char *opt_arg,void* userdata _U_)
rtspstat_t *sp;
const char *filter=NULL;
GString *error_string;
-
+
if (!strncmp (opt_arg, "rtsp,stat,", 10)){
filter=opt_arg+10;
} else {
filter=NULL;
}
-
+
sp = (rtspstat_t *)g_malloc( sizeof(rtspstat_t) );
if(filter){
sp->filter=g_strdup(filter);
@@ -254,7 +254,7 @@ gtk_rtspstat_init(const char *opt_arg,void* userdata _U_)
/*g_hash_table_foreach( rtsp_status, (GHFunc)rtsp_reset_hash_responses, NULL);*/
- error_string = register_tap_listener(
+ error_string = register_tap_listener(
"rtsp",
sp,
filter,