Wireshark mailing list archives
Re: wireshark crashes after adding preference code to my
From: Jeff Morriss <jeff.morriss.ws () gmail com>
Date: Wed, 26 Jan 2011 09:34:50 -0500
Yosi Saggi wrote:
HiI wanted to add some options in the preference window for my dissector. This is the code I have added to the “proto_register” function:
[...]
prefs_register_bool_preference(dan_lte_sdk_module, "Dissect_MAC_Payload", "Dissect MAC Layer from Data Payload","In Uplink and Downlink data packets, dissect MAC heaser layer " "Disabling MAC dissection will disable RLC dissection automaticly",&global_dan_lte_sdk_dissect_MAC);prefs_register_bool_preference(dan_lte_sdk_module, "Dissect_RLC_Payload","Dissect RLC Layer from Data Payload","In Uplink and Downlink data packets, dissect RLC heaser layer ",&global_dan_lte_sdk_dissect_RLC);It works fine until I add those two (even one of them) "prefs_register_bool_preference" functions. What did I do wrong?I get a "Runtime Error!" for wireshark.exe Removing those function fixes it back.
From epan/prefs.c:
/*
* Make sure that only lower-case ASCII letters, numbers,
* underscores, and dots appear in the preference name.
*
* Crash if there is, as that's an error in the code;
* you can make the title and description nice strings
* with capitalization, white space, punctuation, etc.,
* but the name can be used on the command line,
* and shouldn't require quoting, shifting, etc.
*/
So change the preference names to use only lower case.
___________________________________________________________________________
Sent via: Wireshark-dev mailing list <wireshark-dev () wireshark org>
Archives: http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
mailto:wireshark-dev-request () wireshark org?subject=unsubscribe
Current thread:
- wireshark crashes after adding preference code to my Yosi Saggi (Jan 26)
- Re: wireshark crashes after adding preference code to my Martin Mathieson (Jan 26)
- Re: wireshark crashes after adding preference codeto my Yosi Saggi (Jan 27)
- Re: wireshark crashes after adding preference codeto my Martin Mathieson (Jan 27)
- Re: wireshark crashes after adding preferencecodeto my Yosi Saggi (Jan 30)
- Re: wireshark crashes after adding preferencecodeto my Martin Mathieson (Jan 30)
- Re: wireshark crashes after adding preferencecodeto my Yosi Saggi (Jan 30)
- Re: wireshark crashes after adding preference codeto my Yosi Saggi (Jan 27)
- Re: wireshark crashes after adding preference code to my Martin Mathieson (Jan 26)
- Re: wireshark crashes after adding preference code to my Yosi Saggi (Jan 26)
- Re: wireshark crashes after adding preference code to my Jeff Morriss (Jan 27)
- Re: wireshark crashes after adding preference code to my Jaap Keuter (Jan 26)
- Re: wireshark crashes after adding preference code to my Jaap Keuter (Jan 26)
