Fix build by #if 0 out unused de_sgsap_tmsi() function.
[obnox/wireshark/wip.git] / tap-dcerpcstat.c
index 1c4342975e9a02656472f7b7b8b47768deee312b..1ed0ce6eb281ae7183456fbacc74f0a3bf94d85e 100644 (file)
@@ -6,17 +6,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., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
@@ -37,7 +37,6 @@
 #include <epan/tap.h>
 #include <epan/stat_cmd_args.h>
 #include <epan/dissectors/packet-dcerpc.h>
-#include "register.h"
 
 /* used to keep track of statistics for a specific procedure */
 typedef struct _rpc_procedure_t {
@@ -129,7 +128,7 @@ dcerpcstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const
                rp->max.secs=delta.secs;
                rp->max.nsecs=delta.nsecs;
        }
-       
+
        rp->tot.secs += delta.secs;
        rp->tot.nsecs += delta.nsecs;
        if(rp->tot.nsecs>1000000000){
@@ -189,7 +188,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
        int pos=0;
         const char *filter=NULL;
         GString *error_string;
-    
+
        /*
         * XXX - DCE RPC statistics are maintained only by major version,
         * not by major and minor version, so the minor version number is
@@ -249,8 +248,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
        rs->ver=ver;
 
        if(filter){
-               rs->filter=g_malloc(strlen(filter)+1);
-               strcpy(rs->filter, filter);
+               rs->filter=g_strdup(filter);
        } else {
                rs->filter=NULL;
        }
@@ -270,7 +268,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
                                rs->procedures[i].proc=procs[j].name;
                        }
                }
-               rs->procedures[i].num=0;        
+               rs->procedures[i].num=0;
                rs->procedures[i].min.secs=0;
                rs->procedures[i].min.nsecs=0;
                rs->procedures[i].max.secs=0;
@@ -279,7 +277,7 @@ dcerpcstat_init(const char *optarg, void* userdata _U_)
                rs->procedures[i].tot.nsecs=0;
        }
 
-       error_string=register_tap_listener("dcerpc", rs, filter, NULL, dcerpcstat_packet, dcerpcstat_draw);
+       error_string=register_tap_listener("dcerpc", rs, filter, 0, NULL, dcerpcstat_packet, dcerpcstat_draw);
        if(error_string){
                /* error, we failed to attach to the tap. clean up */
                g_free(rs->procedures);