summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Wu <peter@lekensteyn.nl>2014-07-04 17:46:56 +0200
committerEvan Huus <eapache@gmail.com>2014-07-06 15:47:51 +0000
commitd828b15a826d2b7b091ab5ffbbd64a11ae9aea18 (patch)
treed9f2db43819e5c9254ea0b8466465573d4cd6d25
parent2eae8bb0c332302f2b63839efb9ea628dfea1127 (diff)
downloadwireshark-d828b15a826d2b7b091ab5ffbbd64a11ae9aea18.tar.gz
kismet: fix retval, add modelines
new dissectors return an int, not a boolean... Change-Id: I88e19f7c0dc14da3649d1522ffe936538a867753 Reviewed-on: https://code.wireshark.org/review/2888 Reviewed-by: Evan Huus <eapache@gmail.com>
-rw-r--r--epan/dissectors/packet-kismet.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/epan/dissectors/packet-kismet.c b/epan/dissectors/packet-kismet.c
index 8972b2cd16..99695a58e8 100644
--- a/epan/dissectors/packet-kismet.c
+++ b/epan/dissectors/packet-kismet.c
@@ -50,7 +50,7 @@ static gboolean response_is_continuation(const guchar * data);
void proto_reg_handoff_kismet(void);
void proto_register_kismet(void);
-static gboolean
+static int
dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * data _U_)
{
gboolean is_request;
@@ -84,14 +84,14 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da
/*
* Packet is too short
*/
- return FALSE;
+ return 0;
} else {
for (i = 0; i < 8; ++i) {
/*
* Packet contains non-ASCII data
*/
if (line[i] < 32 || line[i] > 128)
- return FALSE;
+ return 0;
}
}
@@ -134,7 +134,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da
* Put the whole packet into the tree as data.
*/
call_dissector(data_handle, tvb, pinfo, kismet_tree);
- return TRUE;
+ return tvb_captured_length(tvb);
}
if (is_request) {
@@ -257,7 +257,7 @@ dissect_kismet(tvbuff_t * tvb, packet_info * pinfo, proto_tree * tree, void * da
offset = next_offset;
}
- return TRUE;
+ return tvb_captured_length(tvb);
}
static gboolean
@@ -326,3 +326,16 @@ proto_reg_handoff_kismet(void)
dissector_add_uint("tcp.port", global_kismet_tcp_port, kismet_handle);
}
+
+/*
+ * Editor modelines - http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 8
+ * tab-width: 8
+ * indent-tabs-mode: t
+ * End:
+ *
+ * vi: set shiftwidth=8 tabstop=8 noexpandtab:
+ * :indentSize=8:tabSize=8:noTabs=false:
+ */