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>
This commit is contained in:
Peter Wu 2014-07-04 17:46:56 +02:00 committed by Evan Huus
parent 2eae8bb0c3
commit d828b15a82
1 changed files with 18 additions and 5 deletions

View File

@ -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:
*/