Ignore:
Timestamp:
Oct 11, 2013 11:55:36 AM (7 months ago)
Author:
Ken Moore <ken@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
0970223
Parents:
d9f825f
Message:

Fix a bug where a blank DNS can be saved in pc-netmanager.
TRAC: https://trac.pcbsd.org/ticket/688

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-netmanager/src/NetworkManager/networkman.cpp

    r7cc177e rf75599e  
    844844        } 
    845845    } 
    846    
    847      if ( lineDNS1->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineDNS1->text() ) && groupDNS->isChecked()) { 
     846     
     847     if(groupDNS->isChecked()){ 
     848       if( lineDNS1->text() == "..." && lineDNS2->text() == "..." ){ return; } 
     849       if ( lineDNS1->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineDNS1->text() ) ) { 
    848850         textGlobalError->setText(tr("Invalid DNS specified")); 
    849851         return; 
    850      } 
    851      
    852     if ( lineDNS2->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineDNS2->text() ) && groupDNS->isChecked()) { 
     852       } 
     853       if ( lineDNS2->text() != "..."  && ! pcbsd::Utils::validateIPV4(lineDNS2->text() ) ) { 
    853854         textGlobalError->setText(tr("Invalid DNS specified")); 
    854855         return; 
     856       } 
    855857     } 
    856858     
Note: See TracChangeset for help on using the changeset viewer.