Re: [evolution-patches] Fix for #56320 and related timezone issues



On Tue, 2004-05-18 at 17:03 +0530, Harish Krishnaswamy wrote:
> hi,
> 
>  This patch addresses the timezone related problems and fixes #56320.
> The conversions between GW date strings to icaltimetype structures are
> now done directly w/o intermediate conversions to time_t structures.
> Also, the default timezone information is now stored in the cache. The
> calendar is not fully loaded at the time of populating the cache and
> Evolution sets the default timezone after the calendar has been loaded
> successfully. Hence the need to store it. In case of first time creation
> / deleted cache, we resort to using UTC as the timezone while sending
> calendar information to evolution.
> 
> Kindly review the same.

> @@ -1248,7 +1248,7 @@ e_gw_item_new_from_soap_parameter (const
>  
>  		} else if (!g_ascii_strcasecmp (name, "created")) {
>  			value = soup_soap_parameter_get_string_value (child);
> -			item->priv->creation_date = e_gw_connection_get_date_from_string
> (value);
> +			e_gw_item_set_creation_date (item,
> e_gw_connection_format_date_string (value));
>
here you are leaking the memory returned by
e_gw_connection_format_date_string.

>  			g_free (value);
>  
>  		} else if (!g_ascii_strcasecmp (name, "distribution")) {
> @@ -1263,12 +1263,12 @@ e_gw_item_new_from_soap_parameter (const
>  
>  		} else if (!g_ascii_strcasecmp (name, "dueDate")) {
>  			value = soup_soap_parameter_get_string_value (child);
> -			item->priv->due_date = e_gw_connection_get_date_from_string (value);
> +			e_gw_item_set_due_date (item, e_gw_connection_format_date_string
> (value));
>
ditto

>  			g_free (value);
>  
>  		} else if (!g_ascii_strcasecmp (name, "endDate")) {
>  			value = soup_soap_parameter_get_string_value (child);
> -			item->priv->end_date = e_gw_connection_get_date_from_string (value);
> +			e_gw_item_set_end_date (item, e_gw_connection_format_date_string
> (value));
>
ditto

>  			g_free (value);
>  
>  		} else if (!g_ascii_strcasecmp (name, "iCalId"))
> @@ -1295,7 +1295,7 @@ e_gw_item_new_from_soap_parameter (const
>  
>  		else if (!g_ascii_strcasecmp (name, "startDate")) {
>  			value = soup_soap_parameter_get_string_value (child);
> -			item->priv->start_date = e_gw_connection_get_date_from_string
> (value);
>
ditto

> +			e_gw_item_set_start_date (item, e_gw_connection_format_date_string
> (value));
>
and ditto

> @@ -626,11 +636,11 @@ e_cal_backend_groupwise_get_timezone (EC
>          return GNOME_Evolution_Calendar_Success;
>  }
>  
> -/* Add_timezone handler for the file backend */
> +/* Add_timezone handler for the groupwise backend */
>  static ECalBackendSyncStatus
>  e_cal_backend_groupwise_add_timezone (ECalBackendSync *backend,
> EDataCal *cal, const char *tzobj)
>  {
> -	return GNOME_Evolution_Calendar_OtherError;
> +	return GNOME_Evolution_Calendar_Success;
>  }
>  
shouldn't this add the timezone to the cache file at least?

cheers




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