Date: Sat, 18 Sep 2004 12:19:36 +0300 (EEST) From: RiÄardas Äepas <rch@richard.eu.org> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/71856: net/kphone startup problem with multiple interfaces (patch) Message-ID: <200409180919.i8I9Jaig002105@richard.strangled.net> Resent-Message-ID: <200409180920.i8I9KXih058946@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 71856 >Category: ports >Synopsis: net/kphone startup problem with multiple interfaces (patch) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Sep 18 09:20:33 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Richard Cepas >Release: FreeBSD 5.3-BETA2 i386 >Organization: >Environment: System: FreeBSD richard.strangled.net 5.3-BETA2 FreeBSD 5.3-BETA2 #3: Sun Sep 5 14:30:41 EEST 2004 rch@richard.strangled.net:/usr/local/obj/usr/src/sys/MYKERNEL i386 >Description: Doesn't start in case there are 2 network cards attached. I think getdefaultdev() in dissipate2/siputil.cpp is Linux specific and always returns NULL. The workaround below lets kphone to start even if NULL is received from getdefaultdev(). >How-To-Repeat: Start kphone on box with two NICs. >Fix: --- kphone/dissipate2/siputil.cpp.orig2 Mon Sep 13 17:30:46 2004 +++ kphone/dissipate2/siputil.cpp Mon Sep 13 17:44:52 2004 @@ -164,9 +164,9 @@ dissipate_our_fqdn = strdup( if_addr[0] ); } else { default_ifName = getdefaultdev(); - if( default_ifName != NULL) { + /*if( default_ifName != NULL) {*/ for( i = 0; i < j; i++ ) { - if( strcmp( if_name[i], default_ifName ) == 0 ) { + if( default_ifName != NULL && strcmp( if_name[i], default_ifName ) == 0 ) { QMessageBox mb( "KPhone", "KPhone found more than one interface.\n" "Do you want to use the default interface:\n\n" + @@ -187,7 +187,7 @@ } } for( i = 0; i < j; i++ ) { - if( strcmp( if_name[i], default_ifName ) != 0 ) { + if(default_ifName == NULL || strcmp( if_name[i], default_ifName ) != 0 ) { if( i == j-1 ) { QMessageBox mb( "KPhone", "Do you want to use " + QString(if_name[i]) + " (IP:\"" + QString(if_addr[i]) + "\")", @@ -221,7 +221,7 @@ } } } - } + /*}*/ } } >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200409180919.i8I9Jaig002105>