[Bedework-commit] calendarapi r416 - in trunk: calsvc/src/org/bedework/calsvc client/src/org/bedework/client/caldav

svnadmin at bedework.org svnadmin at bedework.org
Wed Sep 19 08:55:37 EDT 2007


Author: douglm
Date: 2007-09-19 08:55:36 -0400 (Wed, 19 Sep 2007)
New Revision: 416

Modified:
   trunk/calsvc/src/org/bedework/calsvc/Scheduling.java
   trunk/client/src/org/bedework/client/caldav/CalDavClient.java
Log:
More scheduling fixes

Modified: trunk/calsvc/src/org/bedework/calsvc/Scheduling.java
===================================================================
--- trunk/calsvc/src/org/bedework/calsvc/Scheduling.java	2007-09-17 20:37:17 UTC (rev 415)
+++ trunk/calsvc/src/org/bedework/calsvc/Scheduling.java	2007-09-19 12:55:36 UTC (rev 416)
@@ -281,10 +281,13 @@
       return sr;
     }
 
+    /* Check that the current user is actually an attendee
+     */
     BwAttendee att = findUserAttendee(ev);
 
     if (att == null) {
-      throw new CalFacadeException(CalFacadeException.schedulingNotAttendee);
+      sr.errorCode = CalFacadeException.schedulingNotAttendee;
+      return sr;
     }
 
     BwCalendar inbox = ev.getCalendar();
@@ -1116,6 +1119,11 @@
         busy++;
       }
 
+      if (type == BwFreeBusyComponent.typeBusyUnavailable) {
+        fbtype = BwFreeBusyComponent.typeBusy;
+        busy++;
+      }
+
       if (type == BwFreeBusyComponent.typeBusyTentative) {
         fbtype = BwFreeBusyComponent.typeBusyTentative;
         tentative++;
@@ -1313,7 +1321,7 @@
         for (ResponseElement re: r.getResponses()) {
           UserInbox ui = uimap.get(re.getRecipient());
 
-          if (ui == null) {
+          if ((ui == null) || (re.getCalData() == null)) {
             ui.status = UserInbox.scheduleUnprocessed;
             continue;
           }

Modified: trunk/client/src/org/bedework/client/caldav/CalDavClient.java
===================================================================
--- trunk/client/src/org/bedework/client/caldav/CalDavClient.java	2007-09-17 20:37:17 UTC (rev 415)
+++ trunk/client/src/org/bedework/client/caldav/CalDavClient.java	2007-09-19 12:55:36 UTC (rev 416)
@@ -191,6 +191,9 @@
 
   private void parseResponse(Response resp) throws CalFacadeException {
     Document doc = parseContent(resp.getCdresp());
+    if (doc == null){
+      throw new CalFacadeException(CalFacadeException.badResponse);
+    }
 
     try {
       Element root = doc.getDocumentElement();
@@ -442,7 +445,7 @@
   protected Document parseContent(DavResp resp) throws CalFacadeException{
     try {
       long len = resp.getContentLength();
-      if (len <= 0) {
+      if (len == 0) {
         return null;
       }
 



More information about the Bedework-commit mailing list