From 892d9923594c8413446528b19500cf724cd3c0cd Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 28 Feb 2016 23:47:15 +0000 Subject: [PATCH] Fixed code for checking if a CalDAVConnectionData object is valid. --- source/objects/CalDAV/CalDAV.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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 -- 2.39.2