From 34128509db514024afd85a714cb9cad1f71d2d82 Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Mon, 23 Jul 2012 08:54:38 +0300 Subject: Minor changes in SMTP and URL code. * include/mailutils/smtp.h (mu_smtp_replcode) (mu_smtp_sget_reply) (mu_smtp_capa_iterator): New protos. * libmailutils/url/dup.c (mu_url_dup): Bugfix. Obtain the name using mu_url_sget_name, which will create it if necessary. * libproto/mailer/Makefile.am (libmu_mailer_la_SOURCES): Add smtp_capa_itr.c * libproto/mailer/smtp_capa_itr.c: New file. * libproto/mailer/smtp_io.c (mu_smtp_response): Fix filling of smtp->flbuf. (mu_smtp_replcode,mu_smtp_sget_reply): New functions. --- libmailutils/url/dup.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libmailutils/url') diff --git a/libmailutils/url/dup.c b/libmailutils/url/dup.c index 141463eca..5b78d5245 100644 --- a/libmailutils/url/dup.c +++ b/libmailutils/url/dup.c @@ -34,11 +34,13 @@ int mu_url_dup (mu_url_t old_url, mu_url_t *new_url) { int rc; + const char *s; mu_url_t url = calloc (1, sizeof (*url)); if (!url) return ENOMEM; - url->name = strdup (old_url->name); + mu_url_sget_name (old_url, &s); + url->name = strdup (s); if (!url->name) { free (url); -- cgit v1.2.1