Sophie

Sophie

distrib > Fedora > 18 > x86_64 > by-pkgid > 0d094ff106f9b2cac6764c0d8767b290 > files > 6

nut-2.6.5-9.fc18.src.rpm

diff -up nut-2.6.5/tools/nut-scanner/nut-scanner.c.pthreadfix nut-2.6.5/tools/nut-scanner/nut-scanner.c
--- nut-2.6.5/tools/nut-scanner/nut-scanner.c.pthreadfix	2012-09-06 13:25:03.856936357 +0200
+++ nut-2.6.5/tools/nut-scanner/nut-scanner.c	2012-09-06 13:25:03.881936493 +0200
@@ -434,22 +434,22 @@ display_help:
 	}
 
 #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 */