Find the BitTorrent dissector immediately after registering it, and save
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 9 Jul 2005 00:44:44 +0000 (00:44 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 9 Jul 2005 00:44:44 +0000 (00:44 +0000)
commit7387fe6b603036ef5e12f55ff239f4c47afb8c15
tree3521975098453f46aa762b589956ff9ea3496982
parent7e37aa5f2c424b6d5572a52cfc2918272f02e4b3
Find the BitTorrent dissector immediately after registering it, and save
the handle, rather than finding it every time we need it.

Just make a guint8 array with the BitTorrent magic string length
followed by the string, and use "tvb_memeql()" to test against that - it
handles checking to make sure there's enough data in the tvbuff (if
not, it returns -1 as a "no match" indication) and then checks all of
the first 20 bytes in one operation.

Clean up white space.

git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@14882 f5534014-38df-0310-8fa8-9805f1628bb7
epan/dissectors/packet-bittorrent.c