From afdc05148233ab533451d430c9ea61fae42a8327 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Sun, 13 Sep 2009 17:29:19 +0000 Subject: [PATCH] Network preflet : Wrongly forces to input a gateway and a DNS server * While adding IPv4 basic validation, I overseen the possibility to leave those fields blank. Now, those fields can be left blank if you wish. Fixing ticket #4487. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@33119 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/network/EthernetSettingsView.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/preferences/network/EthernetSettingsView.cpp b/src/preferences/network/EthernetSettingsView.cpp index a8bac00c7c..912ab721a5 100644 --- a/src/preferences/network/EthernetSettingsView.cpp +++ b/src/preferences/network/EthernetSettingsView.cpp @@ -558,8 +558,10 @@ EthernetSettingsView::MessageReceived(BMessage* message) case kMsgApply: if (_ValidateControl(fIPTextControl) && _ValidateControl(fNetMaskTextControl) - && _ValidateControl(fGatewayTextControl) - && _ValidateControl(fPrimaryDNSTextControl) + && (strlen(fGatewayTextControl->Text()) == 0 + || _ValidateControl(fGatewayTextControl)) + && (strlen(fPrimaryDNSTextControl->Text()) == 0 + || _ValidateControl(fPrimaryDNSTextControl)) && (strlen(fSecondaryDNSTextControl->Text()) == 0 || _ValidateControl(fSecondaryDNSTextControl))) _SaveConfiguration();