On Thu, 24 Mar 2011, Patricia Muscalu wrote:

+/* SMTP authentication mechanism flags. */
+#define CURL_SMTP_AUTH_LOGIN         0x0001
+#define CURL_SMTP_AUTH_PLAIN         0x0002
+#define CURL_SMTP_AUTH_CRAM_MD5      0x0004
+#define CURL_SMTP_AUTH_DIGEST_MD5    0x0008
+#define CURL_SMTP_AUTH_GSSAPI        0x0010
+#define CURL_SMTP_AUTH_EXTERNAL      0x0020

I'm sending a new patch with the renamed auth flags.

Hi again Patricia,

Now that we're out of the feature freeze we're ready to merge more stuff again and I'm revisiting your patch. I have some issues/questions about it:

1. Wouldn't it make sense to provide a single defined name that selects all types?

2. Also, I'm confused by the code that uses these bits:

+  case CURLOPT_SMTPAUTH:
+  {
+    long auth = va_arg(param, long);
+
+    data->set.smtpauthmask &= auth;
+
+#ifdef CURL_DISABLE_CRYPTO_AUTH
+    data->set.smtpauthmask &= ~CURL_SASL_AUTH_CRAM_MD5;
+#endif
+  }
+  break;

This code assumes that data->set.smtpauthmask is previously set to zero. What if you'd use more than one CURLOPT_SMTPAUTH?

Wouldn't it make more sense to simplify this to instead do:

  data->set.smtpauthmask = (unsigned int)va_arg(param, long);


3. We really want docs for all features, can you look into adding this option to the curl_easy_setopt man page?

4. How about exporting this functionality to the curl tool? It feels like a feature command line users might want and having it there also makes it easier to write tests for it.

--

 / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html

Reply via email to