RE: [PATCH] always multi v5
Date: Fri, 18 Jan 2013 22:22:48 +0000
On Fri, 18 Jan 2013, Daniel Stenberg wrote:
> > Excuse me if this is a rather daft question but I was wondering are
> > those functions, along with Curl_pp_easy_statemach() in pingpong.c,
> > still needed now or should we be fixing up the code to use the
> > xxxx_multi_statemach() functions instead?
> It is a fair question! I think perhaps we should consider renaming them
> since they are no longer in fact used for driving any easy interface state
I agree - I think it would be less confusing for anyone reading the code to
know that the easy state machine doesn't exist anymore, but does anyone have
any strong opinion for not doing this?
Additionally, does anyone have any suggestions as to what we should name
these functions? Perhaps:
1) xxx_blocking_statemach() - For example ftp_blocking_statemach() and
2) Curl_pp_blocking_statemach() instead of Curl_pp_easy_statemach()
> They are however still used for a blocking-mode state machine:
> ftp_quit() is the only user of ftp_easy_statemach() since it (still)
> relies on a synchronous function to do the full request and
> response. The other protocols have similar uses.
A quick review of the code reveals that:
* In ftp.c, ftp_quit() is the only user of ftp_easy_statemach()
* In imap.c, imap_logout() is the only user of imap_easy_statemach()
* In pop3.c, pop3_quit() is the only user of pop3_easy_statemach()
* smtp.c calls smtp_easy_statemach() twice - once in smtp_quit() and the
other in smtp_done() - note there is a huge TODO comment in the latter about
* ftp_easy_statemach(), imap_easy_statemach(), pop3_easy_statemach() and
smtp_easy_statemach() are the only users of Curl_pp_blocking_statemach().
I'm happy to do the rename but I would appreciate a bit of guidance as to
whether or not we should 1) Do this at all and 2) Do this for the v7.29
List admin: http://cool.haxx.se/list/listinfo/curl-library
Received on 2013-01-18