Re: [evolution-patches] fix for the bug #64062 [calendar]



+                       ECalComponentDateTime s_dt, cache_s_dt;


Kindly align to the naming conventions


+                       if (s_dt.tzid && !cache_s_dt.tzid) 
+                               is_allday = FALSE;
+                               
+                        else if (!s_dt.tzid && cache_s_dt.tzid) 
+                               is_allday = TRUE;
+                               
+                       e_gw_item_set_is_allday_event (item, is_allday);

The computation of item's alldayevent property should be done inside
set_properties_from_cal_component function and the changes computed in
e_gw_item_set_changes function, along with other event properties

 
+                       e_gw_item_set_change (item,
E_GW_ITEM_CHANGE_TYPE_UPDATE, "allDayEvent", &is_allday);

The above code does not check if the value has changed at all and it may
even corrupt the data in the server. If is_allday_event is TRUE in the
cache and has not changed at all but the local variable (uninitialized)
had the value FALSE - you would still be modifying it in the server.

regards,
harish





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]