From: Steve Brokenshire Date: Sun, 28 Feb 2016 23:47:15 +0000 (+0000) Subject: Fixed code for checking if a CalDAVConnectionData object is valid. X-Git-Tag: release-0.02~335 X-Git-Url: http://Server1/repobrowser/?a=commitdiff_plain;h=892d9923594c8413446528b19500cf724cd3c0cd;p=xestiacalendar%2F.git Fixed code for checking if a CalDAVConnectionData object is valid. --- diff --git a/source/objects/CalDAV/CalDAV.cpp b/source/objects/CalDAV/CalDAV.cpp index 6a5c70b..0e39c7e 100644 --- a/source/objects/CalDAV/CalDAV.cpp +++ b/source/objects/CalDAV/CalDAV.cpp @@ -32,7 +32,7 @@ bool CalDAVObjectValidSettings(CalDAVConnectionData *ConnData){ // Check the server hostname. Return false // if no value has been set. - if (ConnData->Hostname.size() > 0){ + if (ConnData->Hostname.size() == 0){ return false; @@ -50,16 +50,20 @@ bool CalDAVObjectValidSettings(CalDAVConnectionData *ConnData){ // Check the server username. Return false // if no value has been set. - - if (ConnData->Username.size() > 0){ + + if (ConnData->Username.size() == 0){ + return false; - } - + + } + // Check the server password. Return false // if no value has been set. - - if (ConnData->Password.size() > 0){ + + if (ConnData->Password.size() == 0){ + return false; + } // Cannot check UseSSL: It is either true