Hello community, here is the log from the commit of package dynamips for openSUSE:Factory checked in at 2014-12-01 14:01:27 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/dynamips (Old) and /work/SRC/openSUSE:Factory/.dynamips.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "dynamips" Changes: -------- --- /work/SRC/openSUSE:Factory/dynamips/dynamips.changes 2014-09-26 11:21:36.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.dynamips.new/dynamips.changes 2014-12-01 14:01:49.000000000 +0100 @@ -1,0 +2,6 @@ +Sun Nov 30 13:35:30 UTC 2014 - andrea@opensuse.org + +- added dynamips-0.2.14_fix_hanging_ethsw_add_nio.patch + to fix upstream bug 59 https://github.com/GNS3/dynamips/issues/59 + +------------------------------------------------------------------- New: ---- dynamips-0.2.14_fix_hanging_ethsw_add_nio.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ dynamips.spec ++++++ --- /var/tmp/diff_new_pack.ZtA5JU/_old 2014-12-01 14:01:50.000000000 +0100 +++ /var/tmp/diff_new_pack.ZtA5JU/_new 2014-12-01 14:01:50.000000000 +0100 @@ -20,11 +20,11 @@ Version: 0.2.14 Release: 0 BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: cmake BuildRequires: dos2unix BuildRequires: libelf-devel BuildRequires: libpcap-devel BuildRequires: libuuid-devel -BuildRequires: cmake Url: http://www.gns3.net %ifarch x86_64 %if %{undefined fedora} @@ -33,6 +33,7 @@ %endif %endif Source: %{name}-%{version}.tar.gz +Patch0: dynamips-0.2.14_fix_hanging_ethsw_add_nio.patch Summary: Cisco router Emulator License: GPL-2.0+ Group: System/Emulators/Other @@ -48,6 +49,7 @@ %prep %setup -q +%patch0 -p1 %build mkdir build ++++++ dynamips-0.2.14_fix_hanging_ethsw_add_nio.patch ++++++ diff -uNr 0ld-dynamips-0.2.14/common/eth_switch.c dynamips-0.2.14/common/eth_switch.c --- 0ld-dynamips-0.2.14/common/eth_switch.c 2014-11-30 15:11:02.417554374 +0100 +++ dynamips-0.2.14/common/eth_switch.c 2014-11-30 15:11:22.916554628 +0100 @@ -359,9 +359,10 @@ static int ethsw_recv_pkt(netio_desc_t *nio,u_char *pkt,ssize_t pkt_len, ethsw_table_t *t) { - ETHSW_LOCK(t); - ethsw_receive(t,nio,pkt,pkt_len); - ETHSW_UNLOCK(t); + if (ETHSW_TRYLOCK(t) == 0) { + ethsw_receive(t,nio,pkt,pkt_len); + ETHSW_UNLOCK(t); + } return(0); } diff -uNr 0ld-dynamips-0.2.14/common/eth_switch.h dynamips-0.2.14/common/eth_switch.h --- 0ld-dynamips-0.2.14/common/eth_switch.h 2014-11-30 15:11:02.417554374 +0100 +++ dynamips-0.2.14/common/eth_switch.h 2014-11-30 15:11:22.916554628 +0100 @@ -74,6 +74,7 @@ #define ETHSW_LOCK(t) pthread_mutex_lock(&(t)->lock) #define ETHSW_UNLOCK(t) pthread_mutex_unlock(&(t)->lock) +#define ETHSW_TRYLOCK(t) pthread_mutex_trylock(&(t)->lock) /* Acquire a reference to an Ethernet switch (increment reference count) */ ethsw_table_t *ethsw_acquire(char *name); -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org