Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > 7d928033b3d8b4d40d8ab11b67a91396 > files > 5

nut-2.6.5-15.mga5.src.rpm

diff -up nut-2.7.1/tools/nut-scanner/nut-scanner.c.pthreadfix nut-2.7.1/tools/nut-scanner/nut-scanner.c
--- nut-2.7.1/tools/nut-scanner/nut-scanner.c.pthreadfix	2014-02-27 11:37:57.045786437 +0100
+++ nut-2.7.1/tools/nut-scanner/nut-scanner.c	2014-02-27 11:39:02.591326696 +0100
@@ -434,22 +434,22 @@
 	}
 
 #ifdef HAVE_PTHREAD
-	if( allow_usb && nutscan_avail_usb ) {
+	if( allow_usb && nutscan_avail_usb && thread[TYPE_USB]) {
 		pthread_join(thread[TYPE_USB],NULL);
 	}
-	if( allow_snmp && nutscan_avail_snmp ) {
+	if( allow_snmp && nutscan_avail_snmp && thread[TYPE_SNMP]) {
 		pthread_join(thread[TYPE_SNMP],NULL);
 	}
-	if( allow_xml && nutscan_avail_xml_http ) {
+	if( allow_xml && nutscan_avail_xml_http && thread[TYPE_XML]) {
 		pthread_join(thread[TYPE_XML],NULL);
 	}
-	if( allow_oldnut && nutscan_avail_nut ) {
+	if( allow_oldnut && nutscan_avail_nut && thread[TYPE_NUT]) {
 		pthread_join(thread[TYPE_NUT],NULL);
 	}
-	if( allow_avahi && nutscan_avail_avahi ) {
+	if( allow_avahi && nutscan_avail_avahi && thread[TYPE_AVAHI]) {
 		pthread_join(thread[TYPE_AVAHI],NULL);
 	}
-	if( allow_ipmi && nutscan_avail_ipmi ) {
+	if( allow_ipmi && nutscan_avail_ipmi && thread[TYPE_IPMI]) {
 		pthread_join(thread[TYPE_IPMI],NULL);
 	}
 #endif /* HAVE_PTHREAD */