From 879920a2ebaacf33e554ab47e340c34fe2e878d8 Mon Sep 17 00:00:00 2001 From: Mikael Kanstrup Date: Mon, 28 Aug 2017 10:38:31 +0200 Subject: iface_lists: Remove locked field It seems the locked field of interface_t was used to avoid simultaneous updates of interface entries from either multiple threads or most likely the recursive UI update callbacks case later identified. Since 802362e ("Avoid recursive scan_local_interfaces operation") the recursive callback behavior is no longer happening. And as code does not have consistent checks the locked field can anyway hardly protect a multi-threaded case if such a case exists. Remove the unnecessary locked field. Ping-Bug: 13864 Change-Id: Idc393f702b82aa6014dd636572d00f0d67120bf3 Reviewed-on: https://code.wireshark.org/review/23262 Petri-Dish: Peter Wu Tested-by: Petri Dish Buildbot Reviewed-by: Peter Wu --- ui/iface_lists.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'ui/iface_lists.c') diff --git a/ui/iface_lists.c b/ui/iface_lists.c index 97ecb24462..a989317d11 100644 --- a/ui/iface_lists.c +++ b/ui/iface_lists.c @@ -182,7 +182,6 @@ scan_local_interfaces(void (*update_cb)(void)) device.friendly_name = NULL; } device.hidden = FALSE; - device.locked = FALSE; memset(&temp, 0, sizeof(temp)); temp.name = g_strdup(if_info->name); temp.friendly_name = g_strdup(if_info->friendly_name); @@ -381,7 +380,6 @@ scan_local_interfaces(void (*update_cb)(void)) device.last_packets = 0; device.links = NULL; device.local = TRUE; - device.locked = FALSE; device.if_info.name = g_strdup(interface_opts->name); device.if_info.friendly_name = NULL; device.if_info.vendor_description = g_strdup(interface_opts->descr); -- cgit v1.2.3