cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: [PATCH] Added AUTH NTLM for SMTP

From: Steve Holme <steve_holme_at_hotmail.com>
Date: Tue, 9 Aug 2011 23:01:23 +0100

Hiya,

On Tues, 9 Aug 2011, Yang Tse wrote:

> I have attached my first patch, which implements most of what you
> outlined (and a few other format issues that I found) tiding up the
> existing code in the http_ntlm module.

> Pushed right now by followed by another one to fix some nits.
> TAB characters, lines longer than 79 columns, and trailing blanks.
> cURL Coding Standards at http://curl.haxx.se/dev/contribute.html
> has relevant info.

Great and cheers for the tips. Sorry about the tabs though - at least I can
blame Visual Studio for that as my everyday environment is set up for "keep
tabs" and set to display as "4 characters per tab". I kept having to tidy
them up manually replacing them with two spaces but obviously I missed a few
:(

> Adjusted preprocessor block in now named Curl_http_ntlm_cleanup(),
> and also some preprocessor magic in http_ntlm.h in order to allow les
> usage of #idef's in code using that header. Additionally I removed an
> inclusion of sys/types.h that already was in http_ntlm.c and that is
> not required.

No problem but could you please clarify when a function should be #defined
as blank in a header file vs #ifdef it in a code file? For example:
Curl_input_ntlm() and Curl_output_ntlm() are #ifdef USE_NTLM in http.c but
Curl_http_ntlm_cleanup is #defined as blank when USE_NTLM is not defined. As
such I would have thought it would be better to be consistent, which in my
opinion would causes less confusion when reading the header file - then we
would wrap the call to Curl_http_ntlm_cleanup() in a #ifdef USE_NTLM in
url.c.

> Pull or pull and rebase to keep the good work.

Hopefully I will get some more time tomorrow to rebase and move things out
to curl_ntlm. How long do you want to leave it between submissions?

Kind Regards

Steve

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-08-10