Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Perform checks if XML Node(s) have been found or not.
authorSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 29 May 2016 19:07:07 +0000 (20:07 +0100)
committerSteve Brokenshire <sbrokenshire@xestia.co.uk>
Sun, 29 May 2016 19:07:07 +0000 (20:07 +0100)
The addition of this check improves the reliability of Xestia Calendar.

source/objects/CalDAV/CalDAV-XMLProcessing.cpp

index 239afe7..8f39d86 100644 (file)
@@ -49,6 +49,12 @@ string CalDAV::ProcessXMLUserPrincipal(){
                
        }
        
+       if (NodeFound == false){
+       
+               return UserPrincipalURI;
+
+       }
+       
        // Look for response.
 
        if (NodeFound == false){ return UserPrincipalURI; } else { NodeFound = false; }
@@ -113,6 +119,12 @@ string CalDAV::ProcessXMLCalendarHome(){
                
        }
        
+       if (NodeFound == false){
+       
+               return CalendarHomeURI;
+
+       }
+       
        // Look for response.
 
        if (NodeFound == false){ return CalendarHomeURI; } else { NodeFound = false; }
@@ -182,6 +194,12 @@ CalDAVCalendarList CalDAV::ProcessXMLCalendarList(){
                
        }
        
+       if (NodeFound == false){
+       
+               return CalendarList;
+
+       }
+       
        for (NodeResponse = NodeSeek->children;
                NodeResponse != nullptr;
                NodeResponse = NodeResponse->next)
@@ -399,6 +417,12 @@ string CalDAV::ProcessXMLEntryETag(){
                
        }
        
+       if (NodeFound == false){
+       
+               return EntryETag;
+
+       }
+       
        // Look for response.
        
        if (NodeFound == false){ return EntryETag; } else { NodeFound = false; }
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy