cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: SMTP: multi interface produce wrong error code for unknown recipient

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Tue, 22 May 2012 09:26:38 +0100

Hi Gokhan,

> > I've just ran the easy interface to see if the same thing happens and
> > the function also gets called here as well :)
> >
> > However, the "if(status)" towards the top of the function catches
> > the failures which would indicate that the status code isn't being sent
> > through correctly under the multi interface - is this possible?
>
> Thanks guys for the quick responses, debugging showed that
> smtp_doing was overriding 'status' before sending it to upper layer
> (multi interface). Changing smtp_doing like below fixes the problem.
> I checked FTP and it is exactly doing the same thing.

Out of curiosity do you know what the knock on effect of this is, by not calling smtp_dophase_done() ?

I see from the code that it is already a little ambiguous as to whether smtp_dophase_done() or smtp_disconnect() frees up the domain for example.

Would it not be better to do:

  if(*dophase_done) {
    smtp_dophase_done(conn, FALSE /* not connected */);

    DEBUGF(infof(conn->data, "DO phase is complete\n"));
  }
 
And have smtp_doing() return the result of smtp_multi_statemach() rather than the result of a cleanup function which always returns CURLE_OK?

Just my two pennies worth ;-)

Kind Regards

Steve

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-05-22