From f83afc56908b487f1d0d87d563eabf68c01b411c Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 22 Nov 2005 07:21:07 +0000 Subject: reduced memory usage on SMTP session. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@771 ee746299-78ed-0310-b773-934348b2243d --- libsylph/smtp.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'libsylph/smtp.c') diff --git a/libsylph/smtp.c b/libsylph/smtp.c index 896547b5..2ee725ee 100644 --- a/libsylph/smtp.c +++ b/libsylph/smtp.c @@ -87,7 +87,7 @@ Session *smtp_session_new(void) session->to_list = NULL; session->cur_to = NULL; - session->send_data = NULL; + session->send_data_fp = NULL; session->send_data_len = 0; session->avail_auth_type = 0; @@ -109,7 +109,8 @@ static void smtp_session_destroy(Session *session) g_free(smtp_session->pass); g_free(smtp_session->from); - g_free(smtp_session->send_data); + if (smtp_session->send_data_fp) + fclose(smtp_session->send_data_fp); g_free(smtp_session->error_msg); } @@ -418,7 +419,7 @@ static gint smtp_send_data(SMTPSession *session) { session->state = SMTP_SEND_DATA; - session_send_data(SESSION(session), session->send_data, + session_send_data(SESSION(session), session->send_data_fp, session->send_data_len); return SM_OK; -- cgit v1.2.3