|
From: | Newman, Adam |
Subject: | Re: [lwip-users] smtp app & tcp_connect vs lwip_connect |
Date: | Sun, 8 Feb 2015 00:09:20 +0000 |
Hi Simon, thanks for your reply.
You wrote: There's no need to do that, just use smtp_send_mail_int() , like this: tcpip_callback(smtp_send_mail_int, your_mail_req) where your_mail_req is a pointer to a struct smtp_send_request. I followed this advice, and also removed the malloc for simplicity... and now the test has run stable for 20 minutes and counting (and my server is flooding with emails) :) I probably should have added a big ATTENTION/EXAMPLE not for this somewhere... I was already using smtp_send_mail_int, and looking again I see there are mentions of tcpip_callback everywhere in the comments. I think what threw me was the code example at the top of smtp.c, because it doesn't mention the use of tcpip_callback when smtp_sent_mail_int is mentioned as the NON_SYS==0 approach. Thanks again for writing this application and for your help! Adam. From: lwip-users-bounces+address@hidden [lwip-users-bounces+address@hidden on behalf of address@hidden address@hidden
Sent: 07 February 2015 20:07 To: Mailing list for lwIP users Subject: Re: [lwip-users] smtp app & tcp_connect vs lwip_connect Newman, Adam wrote:
Yes. That is, if I understood you correctly. You should use smtp_send_mail_int (see below) when not calling from tcip_thread.
Yes, it is.
You did not do that from within tcpip_thread, did you?
Yes: obey lwIP's threading requirements!!!
If you mean 'application thread' by 'application', then: yes!
There's no need to do that, just use smtp_send_mail_int() , like this: tcpip_callback(smtp_send_mail_int, your_mail_req) where your_mail_req is a pointer to a struct smtp_send_request. I probably should have added a big ATTENTION/EXAMPLE not for this somewhere... Simon ----------------------------------------------------------------------------------------------------------------------------
Confidentiality Requirement:
This communication, including any attachment(s), may contain confidential
information and is for the sole use of the intended recipient(s). If you are
not the intended recipient, you are hereby notified that you have received this
communication in error and any unauthorized review, use, disclosure,
dissemination, distribution or copying of it or its contents is strictly
prohibited. If you have received this communication in error, please
notify the sender immediately by telephone or e-mail and destroy all copies of
this communication and any attachments. |
[Prev in Thread] | Current Thread | [Next in Thread] |