Re: [evolution-patches] patch for implementing cursors for groupwise calendar backend
- From: Rodrigo Moya <rodrigo novell com>
- To: Sivaiah Nallagatla <snallagatla novell com>
- Cc: evolution-patches ximian com, Parag Goel <PGOEL novell com>
- Subject: Re: [evolution-patches] patch for implementing cursors for groupwise calendar backend
- Date: Tue, 24 Aug 2004 13:55:07 +0200
On Tue, 2004-08-24 at 12:17 +0530, Sivaiah N wrote:
> Hi,
> It seems getting all the items in a single request is causing some
> problems on server side, so here is the implementation for reading in
> chunks using cursors. We get 100 items at a time now
>
> + status = e_gw_connection_parse_response_status (response);
> + if (status != E_GW_CONNECTION_STATUS_OK) {
> + g_object_unref (response);
> + g_object_unref (msg);
> + return status;
> + }
> + param = soup_soap_response_get_first_parameter_by_name
> (response, "cursor");
> + value = soup_soap_parameter_get_string_value(param);
>
I think you should check if
soup_soap_response_get_first_parameter_by_name returns a valid
parameter.
> + if (cursor > 0)
> + e_gw_message_write_int_parameter (msg, "cursor", NULL,
> cursor);
>
and if cursor <= 0, what happens, no "cursor" argument, so what would
the server do? We probably should just fail if there is no valid cursor,
right?
> + g_object_unref (response);
> + g_object_unref (msg);
> + return status;
> +
> +
> +
> +}
> +
no need for so many blank lines :)
> + e_gw_message_write_int_parameter (msg, "count", NULL, count);
> +
> + e_gw_message_write_footer (msg);
> +
here, as well as in other places, the formatting is wrong.
--
Rodrigo Moya <rodrigo novell com>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]