Newman, Adam wrote:
The comments for the smtp app state that the smtp_send_request should
be created somewhere safe for interrupt context. Is this at all
related to the above unsafe-ness
Yes. That is, if I understood you correctly. You should use
smtp_send_mail_int (see below) when not calling from tcip_thread.
or a seperate issue? I'm not certain when an object that never gets
deleted would ever be unsafe for interrupt context but that probably
just reflects my level of knowledge on the topic.
Yes, it is.
I did try creating each smtp_send_request object using a heap_malloc
but it still crashes in tcp_input.
You did not do that from within tcpip_thread, did you?
Is this an issue folks are familiar with i.e. is there a silver bullet?
Yes: obey lwIP's threading requirements!!!
Or, is it better (and safer) to avoid tcp_connect directly from the
application
If you mean 'application thread' by 'application', then: yes!
and write my own smtp implementation using lwip_connect?
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
_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users