Re: [evolution-patches] patch for implementing cursors for groupwise calendar backend



On Tue, 2004-08-24 at 13:55 +0200, Rodrigo Moya wrote:
> 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.
done 

> > +       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?
this check is not needed 
> > +       g_object_unref (response);
> > +       g_object_unref (msg);
> > +       return status;
> > +       
> > +       
> > +        
> > +}
> > +
> no need for so many blank lines :)
corrected 
> > +       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.

attached updated patch which has just e-gw-* changes 


Thanks,
Siva

Attachment: cursors.diff
Description: Binary data



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