At 12:01 PM 10/2/2004, hammett wrote:
>Hello all!
>
>I invited myself to put my nose in the code just to see how things works.
>Its surprisingly simple, I was expecting thousands of lines. Very neat. Of
>course the HRESULT hr = DoSomething is something that send me back to 3 or 4
>years, when I was a COM programmer working with C++ and ATL. I wonder why i
>thought it was a good idea at the time :-\

I knew that feeling as I took a spaceship back in time to
write the connector code :)

>Well, the CLI module is pretty simple. Just wanna ask you about a few things
>that I don't remember exactly how they work, and if my assumption is correct
>can be a small bug.
>
>- mod_aspdotnet.cpp : Lines 310-321
>
>Two possibilities of execution of _com_raise_error, which I don't rememer if
>it only populate the error info or actually throws a com_error. If its the
>late, then pAppDomainIUnk won't be properly released. Have you considered
>using smart pointers? I used to use CComPtr or something with a similar
>name...

My only distaste for smart pointers is the tighter control over garbage
collection we maintain - httpd runs hundreds or thousands of parallel
child threads, and I simply wanted to keep a tight reign on the lifetime
management.

I've fixed both bugs by releasing the interface before testing the
result of the operations - we are done with them if we succeeded 
or failed...

>- mod_aspdotnet.cpp : Lines 335-346
>
>Same thing with pDefaultDomain

Ack.

>- mod_aspdotnet.cpp : Line 350
>
>I'd use the CComVariant to ensure the VariantClear

One point for all of the above, this was the initialization path
- if they failed mod_aspdotnet does not start.  I've cleaned them
up somewhat, you might want to look at the changes to recommend
any more of them.

I didn't jump to CComVariant yet - I'll explain my reasoning in
another mail once my busy schedule clears up just a bit.

>- mod_aspdotnet.cpp in general...
>
>Personal preference, I'd refactor it to small chunks, methods. Don't know,
>I'm a big fan of intentional programming :-)

One major goal of the project is to factor out the useful bits
into smaller pieces, patches are welcome.

>The rest of the managed code is pretty straighforward, but I'd look at them
>again later today, I need to prepare lunch :-)

I will have further comments, but that's as much as I could 
address today :)

Looking forward to your further comments!

Bill



Reply via email to