diff options
author | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-09-06 13:24:45 +0000 |
---|---|---|
committer | sahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7> | 2002-09-06 13:24:45 +0000 |
commit | a6065704b9fbe3f893df8ca79fa6e1f35fbd4609 (patch) | |
tree | 6687b9086e382ef9cc678d31babd9fd823ea8b05 /gtk2 | |
parent | c1eebbf1be6d52ace08cc45e596d15f37af836f5 (diff) |
Moved two other functions from gtk2-rpc[stat|progs].c into main.c so it
will be easier to reuse these functions on non-threaded gtk1-ethereal.
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@6196 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'gtk2')
-rw-r--r-- | gtk2/gtk2-rpcprogs.c | 4 | ||||
-rw-r--r-- | gtk2/gtk2-rpcstat.c | 4 | ||||
-rw-r--r-- | gtk2/main.c | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/gtk2/gtk2-rpcprogs.c b/gtk2/gtk2-rpcprogs.c index 6dc70704af..5ffba10004 100644 --- a/gtk2/gtk2-rpcprogs.c +++ b/gtk2/gtk2-rpcprogs.c @@ -1,7 +1,7 @@ /* gtk2-rpcprogs.c * rpcprogs 2002 Ronnie Sahlberg * - * $Id: gtk2-rpcprogs.c,v 1.1 2002/09/06 10:14:14 sahlberg Exp $ + * $Id: gtk2-rpcprogs.c,v 1.2 2002/09/06 13:24:45 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -239,7 +239,6 @@ rpcprogs_draw(void *dummy _U_) guint32 td; #endif - gdk_threads_enter(); for(rp=prog_list,i=1;rp;rp=rp->next,i++){ /* scale it to units of 10us.*/ /* for long captures with a large tot time, this can overflow on 32bit */ @@ -270,7 +269,6 @@ rpcprogs_draw(void *dummy _U_) gtk_label_set_text(GTK_LABEL(rp->wavg), rp->savg); } - gdk_threads_leave(); } /* since the gtk2 implementation of tap is multithreaded we must protect diff --git a/gtk2/gtk2-rpcstat.c b/gtk2/gtk2-rpcstat.c index 9f0ba3f687..837b4b903e 100644 --- a/gtk2/gtk2-rpcstat.c +++ b/gtk2/gtk2-rpcstat.c @@ -1,7 +1,7 @@ /* gtk2-rpcstat.c * rpcstat 2002 Ronnie Sahlberg * - * $Id: gtk2-rpcstat.c,v 1.4 2002/09/06 08:58:20 sahlberg Exp $ + * $Id: gtk2-rpcstat.c,v 1.5 2002/09/06 13:24:45 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -162,7 +162,6 @@ rpcstat_draw(rpcstat_t *rs) guint32 td; #endif - gdk_threads_enter(); for(i=0;i<rs->num_procedures;i++){ /* scale it to units of 10us.*/ /* for long captures with a large tot time, this can overflow on 32bit */ @@ -187,7 +186,6 @@ rpcstat_draw(rpcstat_t *rs) gtk_label_set_text(GTK_LABEL(rs->procedures[i].wavg), rs->procedures[i].savg); } - gdk_threads_leave(); } diff --git a/gtk2/main.c b/gtk2/main.c index 1e0318d04b..d912eb4ee7 100644 --- a/gtk2/main.c +++ b/gtk2/main.c @@ -1,6 +1,6 @@ /* main.c * - * $Id: main.c,v 1.6 2002/09/06 10:13:17 sahlberg Exp $ + * $Id: main.c,v 1.7 2002/09/06 13:24:45 sahlberg Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@ethereal.com> @@ -1211,7 +1211,9 @@ update_thread(gpointer data _U_) struct timeval tv1, tv2; gettimeofday(&tv1, NULL); g_static_mutex_lock(&update_thread_mutex); + gdk_threads_enter(); draw_tap_listeners(FALSE); + gdk_threads_leave(); g_static_mutex_unlock(&update_thread_mutex); do{ g_thread_yield(); |