patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8490, SMTP mods to use a data handler...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8490: SMTP mods to use a data handler for BODY

Submitter:  Sergio R. Caprile <scaprile>
Submitted:  Thu 26 Jun 2014 06:56:31 PM UTC
   
 
Category:  Contrib Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  goldsimon Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Mon 16 Feb 2015 10:14:40 PM UTC, comment #6: 

Yes, you are quite right, I've fixed this long ago and somehow forgot to submit it to Savannah.

Sergio R. Caprile <scaprile>
Mon 16 Feb 2015 08:56:12 PM UTC, comment #5: 

Done, thanks for the patch.

I've slightly adapted coding style and fixed what I've thought as a bug: smtp_send_mail_bodycback() allocated s->bodydh as struct smtp_bodydh, not as struct smtp_bodydh_state.

Simon Goldschmidt <goldsimon>
Group administrator
Sat 17 Jan 2015 09:41:24 PM UTC, comment #4: 

The idea sounds nice, I'll have to go to my PC to unzip the files :-)

Simon Goldschmidt <goldsimon>
Group administrator
Fri 11 Jul 2014 04:39:54 PM UTC, comment #3: 

Oops, forgot to free memory for the structure extension... sorry about that (again)

(file #31701)

Sergio R. Caprile <scaprile>
Fri 27 Jun 2014 06:06:31 PM UTC, comment #2: 

either in your .h or in your options file, not in the .c as I wrongfully pasted. Sorry about that

Sergio R. Caprile <scaprile>
Fri 27 Jun 2014 05:16:35 PM UTC, comment #1: 

... and for completeness:

--- b/apps/smtp/smtp.c
+++ b/apps/smtp/smtp.c
@@ -107,6 +107,11 @@
 #define SMTP_SUPPORT_AUTH_LOGIN 1
 #endif

+/** Set this to 1 to enable data handler callback on BODY */
+#ifndef SMTP_BODYDH
+#define SMTP_BODYDH             1
+#endif
+
 /** TCP poll interval. Unit is 0.5 sec. */
 #define SMTP_POLL_INTERVAL      4
 /** TCP poll timeout while sending message body, reset after every


Sergio R. Caprile <scaprile>
Thu 26 Jun 2014 06:56:31 PM UTC, original submission:  

An additional smtp_send_mail_bodycback() function, quite similar to _static, sets up a framework in which a simple user function will be called back at the BODY state (until it returns "I'm done"), in order to generate the body content.
This is useful in low memory conditions, when data to populate the mail body is huge and/or in logs or tables/databases and so mail body needs to be generated at runtime.

Sergio R. Caprile <scaprile>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #31701:  smtp3_v2.zip added by scaprile (3KiB - application/zip - Fix dh struct memory free)
file #31625:  smtp3.zip added by scaprile (3KiB - application/zip - patch file)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by scaprile (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-02-16 goldsimon StatusNone Done
        Assigned toNone goldsimon
        Open/ClosedOpen Closed
    2014-07-11 scaprile Attached File- Added smtp3_v2.zip, #31701
    2014-06-26 scaprile Attached File- Added smtp3.zip, #31625

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code