icalcomponent *get_freebusy_for_user(char *who) {
long nLines;
char buf[SIZ];
- StrBuf *serialized_fb = NULL;
+ StrBuf *serialized_fb = NewStrBuf();
icalcomponent *fb = NULL;
serv_printf("ICAL freebusy|%s", who);
serv_getln(buf, sizeof buf);
if (buf[0] == '1') {
- serialized_fb = read_server_text(&nLines);
+ read_server_text(serialized_fb, &nLines);
}
if (serialized_fb == NULL) {
/* If event 1 ends before event 2 starts, we're in the clear. */
if (icaltime_compare(t1end, t2start) <= 0) return(0);
- // lprintf(9, "first passed\n");
+ /* lprintf(9, "first passed\n"); */
/* If event 2 ends before event 1 starts, we're also ok. */
if (icaltime_compare(t2end, t1start) <= 0) return(0);
- // lprintf(9, "second passed\n");
+ /* lprintf(9, "second passed\n"); */
/* Otherwise, they overlap. */
return(1);