diff options
-rw-r--r-- | dumpcap.c | 51 | ||||
-rw-r--r-- | epan/dissectors/make-dissectors.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-dcerpc.c | 1 | ||||
-rw-r--r-- | epan/dissectors/packet-fc00.c | 16 | ||||
-rw-r--r-- | epan/dissectors/packet-zbee-nwk.c | 1 | ||||
-rw-r--r-- | epan/epan.c | 8 | ||||
-rw-r--r-- | epan/print.c | 1 | ||||
-rw-r--r-- | epan/proto.c | 1 | ||||
-rw-r--r-- | epan/register.c | 1 | ||||
-rw-r--r-- | epan/sequence_analysis.c | 17 | ||||
-rw-r--r-- | epan/tap.c | 1 | ||||
-rw-r--r-- | extcap.c | 1 | ||||
-rw-r--r-- | extcap/ciscodump.c | 1 | ||||
-rw-r--r-- | extcap/sshdump.c | 1 | ||||
-rw-r--r-- | sharkd_session.c | 1 | ||||
-rw-r--r-- | tfshark.c | 3 | ||||
-rw-r--r-- | tshark.c | 7 | ||||
-rw-r--r-- | ui/filter_files.c | 1 | ||||
-rw-r--r-- | ui/make-taps.c | 1 | ||||
-rw-r--r-- | ui/profile.c | 1 | ||||
-rw-r--r-- | ui/qt/compiled_filter_output.cpp | 4 | ||||
-rw-r--r-- | ui/recent.c | 1 |
22 files changed, 0 insertions, 121 deletions
@@ -118,9 +118,6 @@ #endif #endif -/* for g_thread_new */ -#include "wsutil/glib-compat.h" - #ifdef DEBUG_CHILD_DUMPCAP FILE *debug_log; /* for logging debug messages to */ /* a file if DEBUG_CHILD_DUMPCAP */ @@ -2049,9 +2046,6 @@ pcap_pipe_dispatch(loop_data *ld, capture_src *pcap_src, char *errmsg, int errms enum { PD_REC_HDR_READ, PD_DATA_READ, PD_PIPE_EOF, PD_PIPE_ERR, PD_ERR } result; #ifdef _WIN32 -#if !GLIB_CHECK_VERSION(2,31,18) - GTimeVal wait_time; -#endif gpointer q_status; wchar_t *err_str; #endif @@ -2101,13 +2095,7 @@ pcap_pipe_dispatch(loop_data *ld, capture_src *pcap_src, char *errmsg, int errms } #ifdef _WIN32 else { -#if GLIB_CHECK_VERSION(2,31,18) q_status = g_async_queue_timeout_pop(pcap_src->cap_pipe_done_q, PIPE_READ_TIMEOUT); -#else - g_get_current_time(&wait_time); - g_time_val_add(&wait_time, PIPE_READ_TIMEOUT); - q_status = g_async_queue_timed_pop(pcap_src->cap_pipe_done_q, &wait_time); -#endif if (pcap_src->cap_pipe_err == PIPEOF) { result = PD_PIPE_EOF; break; @@ -2163,13 +2151,7 @@ pcap_pipe_dispatch(loop_data *ld, capture_src *pcap_src, char *errmsg, int errms #ifdef _WIN32 else { -#if GLIB_CHECK_VERSION(2,31,18) q_status = g_async_queue_timeout_pop(pcap_src->cap_pipe_done_q, PIPE_READ_TIMEOUT); -#else - g_get_current_time(&wait_time); - g_time_val_add(&wait_time, PIPE_READ_TIMEOUT); - q_status = g_async_queue_timed_pop(pcap_src->cap_pipe_done_q, &wait_time); -#endif /* GLIB_CHECK_VERSION(2,31,18) */ if (pcap_src->cap_pipe_err == PIPEOF) { result = PD_PIPE_EOF; break; @@ -2295,9 +2277,6 @@ pcapng_pipe_dispatch(loop_data *ld, capture_src *pcap_src, char *errmsg, int err enum { PD_REC_HDR_READ, PD_DATA_READ, PD_PIPE_EOF, PD_PIPE_ERR, PD_ERR } result; #ifdef _WIN32 -#if !GLIB_CHECK_VERSION(2,31,18) - GTimeVal wait_time; -#endif gpointer q_status; wchar_t *err_str; #endif @@ -2338,13 +2317,7 @@ pcapng_pipe_dispatch(loop_data *ld, capture_src *pcap_src, char *errmsg, int err } #ifdef _WIN32 else { -#if GLIB_CHECK_VERSION(2,31,18) q_status = g_async_queue_timeout_pop(pcap_src->cap_pipe_done_q, PIPE_READ_TIMEOUT); -#else - g_get_current_time(&wait_time); - g_time_val_add(&wait_time, PIPE_READ_TIMEOUT); - q_status = g_async_queue_timed_pop(pcap_src->cap_pipe_done_q, &wait_time); -#endif if (pcap_src->cap_pipe_err == PIPEOF) { result = PD_PIPE_EOF; break; @@ -2394,13 +2367,7 @@ pcapng_pipe_dispatch(loop_data *ld, capture_src *pcap_src, char *errmsg, int err #ifdef _WIN32 else { -#if GLIB_CHECK_VERSION(2,31,18) q_status = g_async_queue_timeout_pop(pcap_src->cap_pipe_done_q, PIPE_READ_TIMEOUT); -#else - g_get_current_time(&wait_time); - g_time_val_add(&wait_time, PIPE_READ_TIMEOUT); - q_status = g_async_queue_timed_pop(pcap_src->cap_pipe_done_q, &wait_time); -#endif /* GLIB_CHECK_VERSION(2,31,18) */ if (pcap_src->cap_pipe_err == PIPEOF) { result = PD_PIPE_EOF; break; @@ -2617,12 +2584,8 @@ capture_loop_open_input(capture_options *capture_opts, loop_data *ld, pcap_src->cap_pipe_state = STATE_EXPECT_REC_HDR; pcap_src->cap_pipe_err = PIPOK; #ifdef _WIN32 -#if GLIB_CHECK_VERSION(2,31,0) pcap_src->cap_pipe_read_mtx = g_malloc(sizeof(GMutex)); g_mutex_init(pcap_src->cap_pipe_read_mtx); -#else - pcap_src->cap_pipe_read_mtx = g_mutex_new(); -#endif pcap_src->cap_pipe_pending_q = g_async_queue_new(); pcap_src->cap_pipe_done_q = g_async_queue_new(); #endif @@ -3656,18 +3619,9 @@ capture_loop_start(capture_options *capture_opts, gboolean *stats_known, struct /* dispatch incoming packets */ if (use_threads) { pcap_queue_element *queue_element; -#if GLIB_CHECK_VERSION(2,31,18) g_async_queue_lock(pcap_queue); queue_element = (pcap_queue_element *)g_async_queue_timeout_pop_unlocked(pcap_queue, WRITER_THREAD_TIMEOUT); -#else - GTimeVal write_thread_time; - - g_get_current_time(&write_thread_time); - g_time_val_add(&write_thread_time, WRITER_THREAD_TIMEOUT); - g_async_queue_lock(pcap_queue); - queue_element = (pcap_queue_element *)g_async_queue_timed_pop_unlocked(pcap_queue, &write_thread_time); -#endif if (queue_element) { if (queue_element->pcap_src->from_pcapng) { pcap_queue_bytes -= queue_element->u.bh.block_total_length; @@ -4570,11 +4524,6 @@ main(int argc, char *argv[]) /* Initialize the pcaps list */ global_ld.pcaps = g_array_new(FALSE, FALSE, sizeof(capture_src *)); -#if !GLIB_CHECK_VERSION(2,31,0) - /* Initialize the thread system */ - g_thread_init(NULL); -#endif - #ifdef _WIN32 /* Load wpcap if possible. Do this before collecting the run-time version information */ load_wpcap(); diff --git a/epan/dissectors/make-dissectors.c b/epan/dissectors/make-dissectors.c index 90d41bc55d..ab84509611 100644 --- a/epan/dissectors/make-dissectors.c +++ b/epan/dissectors/make-dissectors.c @@ -12,7 +12,6 @@ #include <stdio.h> #include <string.h> #include <glib.h> -#include <wsutil/glib-compat.h> #define ARRAY_RESERVED_SIZE 2048 #define STRING_RESERVED_SIZE (300 * 1024) diff --git a/epan/dissectors/packet-dcerpc.c b/epan/dissectors/packet-dcerpc.c index 11838a3de1..6dad2f89ef 100644 --- a/epan/dissectors/packet-dcerpc.c +++ b/epan/dissectors/packet-dcerpc.c @@ -37,7 +37,6 @@ #include <epan/proto_data.h> #include <wsutil/str_util.h> -#include <wsutil/glib-compat.h> #include "packet-tcp.h" #include "packet-dcerpc.h" #include "packet-dcerpc-nt.h" diff --git a/epan/dissectors/packet-fc00.c b/epan/dissectors/packet-fc00.c index 1b545d1065..ac248cd696 100644 --- a/epan/dissectors/packet-fc00.c +++ b/epan/dissectors/packet-fc00.c @@ -17,7 +17,6 @@ #include <glib.h> -#include <epan/expert.h> #include <epan/packet.h> #include <wsutil/base32.h> @@ -43,7 +42,6 @@ static int hf_fc00_authenticator = -1; static int hf_fc00_temp_publicy_key = -1; static int hf_fc00_payload = -1; -static expert_field ei_fc00_chksum_unsupported = EI_INIT; /* Cjdns constants */ #define SESSION_STATE_OFF 0 @@ -123,7 +121,6 @@ dissect_cryptoauth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da proto_tree_add_item(fc00_tree, hf_fc00_random_nonce, tvb, NONCE_OFF, NONCE_LEN, ENC_NA); -#if GLIB_CHECK_VERSION(2, 36, 0) /* sha512 support was added in glib 2.36 */ if (fc00_tree) { GChecksum *hash = g_checksum_new(G_CHECKSUM_SHA512); @@ -153,9 +150,6 @@ dissect_cryptoauth(tvbuff_t *tvb, packet_info *pinfo, proto_tree *tree, void *da proto_tree_add_ipv6(key_tree, hf_fc00_ip_address, tvb, PUBLIC_KEY_OFF, PUBLIC_KEY_LEN, (ws_in6_addr*)ip_buf); } -#else - proto_tree_add_expert(fc00_tree, pinfo, &ei_fc00_chksum_unsupported, tvb, PUBLIC_KEY_OFF, PUBLIC_KEY_LEN); -#endif proto_tree_add_item(fc00_tree, hf_fc00_authenticator, tvb, POLY_AUTH_OFF, POLY_AUTH_LEN, ENC_NA); @@ -263,27 +257,17 @@ proto_register_fc00(void) } }; - static ei_register_info ei[] = { - { &ei_fc00_chksum_unsupported, - { "fc00.chksum_unsupported", PI_DECRYPTION, PI_NOTE, - "checksum calculation is not supported", - EXPFILL }} - }; - static gint *ett[] = { &ett_fc00, &ett_fc00_auth, &ett_fc00_key }; - expert_module_t *expert_fc00; proto_fc00 = proto_register_protocol("Fc00 CryptoAuth", "Fc00", "fc00"); proto_register_field_array(proto_fc00, hf, array_length(hf)); proto_register_subtree_array(ett, array_length(ett)); - expert_fc00 = expert_register_protocol(proto_fc00); - expert_register_field_array(expert_fc00, ei, array_length(ei)); } void diff --git a/epan/dissectors/packet-zbee-nwk.c b/epan/dissectors/packet-zbee-nwk.c index 710824131b..2092addfb5 100644 --- a/epan/dissectors/packet-zbee-nwk.c +++ b/epan/dissectors/packet-zbee-nwk.c @@ -26,7 +26,6 @@ #include "packet-zbee-nwk.h" #include "packet-zbee-aps.h" /* for ZBEE_APS_CMD_KEY_LENGTH */ #include "packet-zbee-security.h" -#include <wsutil/glib-compat.h> /*************************/ /* Function Declarations */ diff --git a/epan/epan.c b/epan/epan.c index 365ddd29ac..560d1f5413 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -22,7 +22,6 @@ #include <version_info.h> #include <wsutil/report_message.h> -#include <wsutil/glib-compat.h> #include <epan/exceptions.h> @@ -191,13 +190,6 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da * GLib 2.24, multiple invocations are allowed. Check for an earlier * invocation just in case. */ -#if !GLIB_CHECK_VERSION(2,31,0) -# if !GLIB_CHECK_VERSION(2,24,0) - if (!g_thread_get_initialized()) -# endif - g_thread_init(NULL); -#endif - /* initialize memory allocation subsystem */ wmem_init(); diff --git a/epan/print.c b/epan/print.c index 8bc1c45edf..56c4baeae9 100644 --- a/epan/print.c +++ b/epan/print.c @@ -30,7 +30,6 @@ #include <version_info.h> #include <wsutil/utf8_entities.h> #include <ftypes/ftypes-int.h> -#include <wsutil/glib-compat.h> #define PDML_VERSION "0" #define PSML_VERSION "0" diff --git a/epan/proto.c b/epan/proto.c index fc9d6e0798..71fa0901ba 100644 --- a/epan/proto.c +++ b/epan/proto.c @@ -45,7 +45,6 @@ #include <wsutil/ws_printf.h> /* ws_debug_printf/ws_g_warning */ #include <wsutil/crash_info.h> -#include <wsutil/glib-compat.h> /* Ptvcursor limits */ #define SUBTREE_ONCE_ALLOCATION_NUMBER 8 diff --git a/epan/register.c b/epan/register.c index a4f0e09046..683aa0cd27 100644 --- a/epan/register.c +++ b/epan/register.c @@ -12,7 +12,6 @@ #include "ws_attributes.h" #include <glib.h> -#include <wsutil/glib-compat.h> #include "epan/dissectors/dissectors.h" static const char *cur_cb_name = NULL; diff --git a/epan/sequence_analysis.c b/epan/sequence_analysis.c index 28c702292a..28f9adad6d 100644 --- a/epan/sequence_analysis.c +++ b/epan/sequence_analysis.c @@ -228,21 +228,9 @@ sequence_analysis_list_free(seq_analysis_info_t *sainfo) /* free the graph data items */ -#if GLIB_CHECK_VERSION (2, 32, 0) if (sainfo->items != NULL) g_queue_free_full(sainfo->items, sequence_analysis_item_free); sainfo->items = g_queue_new(); -#else - { - GList *list = g_queue_peek_nth_link(sainfo->items, 0); - while (list) - { - sequence_analysis_item_free(list->data); - list = g_list_next(list); - } - g_queue_clear(sainfo->items); - } -#endif if (NULL != sainfo->ht) { g_hash_table_remove_all(sainfo->ht); @@ -368,12 +356,7 @@ static void overwrite (GString *gstr, char *text_to_insert, guint32 p1, guint32 if (len > ins_len) { len = ins_len; } else if (len < ins_len) { -#if GLIB_CHECK_VERSION(2,30,0) ins_str = g_utf8_substring(text_to_insert, 0, len); -#else - gchar *end = g_utf8_offset_to_pointer(text_to_insert, len); - ins_str = g_strndup(text_to_insert, end - text_to_insert); -#endif } if (!ins_str) ins_str = g_strdup(text_to_insert); diff --git a/epan/tap.c b/epan/tap.c index d3ddfeb344..b431498fb0 100644 --- a/epan/tap.c +++ b/epan/tap.c @@ -28,7 +28,6 @@ #include <epan/dfilter/dfilter.h> #include <epan/tap.h> #include <wsutil/ws_printf.h> /* ws_g_warning */ -#include <wsutil/glib-compat.h> static gboolean tapping_is_active=FALSE; @@ -39,7 +39,6 @@ #include "ui/iface_toolbar.h" -#include <wsutil/glib-compat.h> #include <wsutil/file_util.h> #include <wsutil/filesystem.h> #include <wsutil/ws_pipe.h> diff --git a/extcap/ciscodump.c b/extcap/ciscodump.c index 83e54a9b4f..c0ff6bea80 100644 --- a/extcap/ciscodump.c +++ b/extcap/ciscodump.c @@ -16,7 +16,6 @@ #include <wsutil/interface.h> #include <wsutil/strtoi.h> #include <wsutil/filesystem.h> -#include <wsutil/glib-compat.h> #include <extcap/ssh-base.h> #include <writecap/pcapio.h> diff --git a/extcap/sshdump.c b/extcap/sshdump.c index 2217d6f3c7..4ec866ee28 100644 --- a/extcap/sshdump.c +++ b/extcap/sshdump.c @@ -18,7 +18,6 @@ #include <wsutil/file_util.h> #include <wsutil/strtoi.h> #include <wsutil/filesystem.h> -#include <wsutil/glib-compat.h> #include <errno.h> #include <string.h> diff --git a/sharkd_session.c b/sharkd_session.c index 9c06cf6c7a..2c2f9262c9 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -62,7 +62,6 @@ #include <epan/maxmind_db.h> -#include <wsutil/glib-compat.h> #include <wsutil/pint.h> #include <wsutil/strtoi.h> @@ -363,9 +363,6 @@ main(int argc, char *argv[]) #ifdef _WIN32 arg_list_utf_16to8(argc, argv); create_app_running_mutex(); -#if !GLIB_CHECK_VERSION(2,31,0) - g_thread_init(NULL); -#endif #endif /* _WIN32 */ /* @@ -754,9 +754,6 @@ main(int argc, char *argv[]) #ifdef _WIN32 arg_list_utf_16to8(argc, argv); create_app_running_mutex(); -#if !GLIB_CHECK_VERSION(2,31,0) - g_thread_init(NULL); -#endif #endif /* _WIN32 */ /* @@ -2325,12 +2322,8 @@ pipe_input_set_handler(gint source, gpointer user_data, ws_process_id *child_pro pipe_input.input_cb = input_cb; #ifdef _WIN32 -#if GLIB_CHECK_VERSION(2,31,0) pipe_input.callback_running = g_malloc(sizeof(GMutex)); g_mutex_init(pipe_input.callback_running); -#else - pipe_input.callback_running = g_mutex_new(); -#endif /* Tricky to use pipes in win9x, as no concept of wait. NT can do this but that doesn't cover all win32 platforms. GTK can do this but doesn't seem to work over processes. Attempt to do diff --git a/ui/filter_files.c b/ui/filter_files.c index 1a30f2fffe..ffad66b14e 100644 --- a/ui/filter_files.c +++ b/ui/filter_files.c @@ -17,7 +17,6 @@ #include <wsutil/file_util.h> #include <wsutil/filesystem.h> -#include <wsutil/glib-compat.h> #include <wsutil/report_message.h> #include "ui/filter_files.h" diff --git a/ui/make-taps.c b/ui/make-taps.c index e1ad4431c6..a5ff48668c 100644 --- a/ui/make-taps.c +++ b/ui/make-taps.c @@ -12,7 +12,6 @@ #include <stdio.h> #include <string.h> #include <glib.h> -#include <wsutil/glib-compat.h> #define ARRAY_RESERVED_SIZE 128 #define STRING_RESERVED_SIZE (8 * 1024) diff --git a/ui/profile.c b/ui/profile.c index 16fba49857..c870fff811 100644 --- a/ui/profile.c +++ b/ui/profile.c @@ -23,7 +23,6 @@ #include "ui/recent.h" #include <wsutil/file_util.h> -#include <wsutil/glib-compat.h> static GList *current_profiles = NULL; static GList *edited_profiles = NULL; diff --git a/ui/qt/compiled_filter_output.cpp b/ui/qt/compiled_filter_output.cpp index 1e6661b8ca..ba516bcf02 100644 --- a/ui/qt/compiled_filter_output.cpp +++ b/ui/qt/compiled_filter_output.cpp @@ -41,12 +41,8 @@ CompiledFilterOutput::CompiledFilterOutput(QWidget *parent, QStringList &intList close_bt->setDefault(true); interface_list_ = ui->interfaceList; -#if GLIB_CHECK_VERSION(2,31,0) pcap_compile_mtx = g_new(GMutex,1); g_mutex_init(pcap_compile_mtx); -#else - pcap_compile_mtx = g_mutex_new(); -#endif #ifdef HAVE_LIBPCAP compileFilter(); #endif diff --git a/ui/recent.c b/ui/recent.c index 9417d4e922..e3dc0a72be 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -28,7 +28,6 @@ #include "ui/simple_dialog.h" #include <wsutil/file_util.h> -#include <wsutil/glib-compat.h> #define RECENT_KEY_MAIN_TOOLBAR_SHOW "gui.toolbar_main_show" #define RECENT_KEY_FILTER_TOOLBAR_SHOW "gui.filter_toolbar_show" |