Handle thing (again)

Jeremy Allison jeremy at valinux.com
Tue Mar 13 16:02:51 GMT 2001


On Tue, Mar 13, 2001 at 10:55:26AM -0500, Michael Sweet wrote:
> Just did some more testing:
> 
>     SGI + generic = invalid handle
>     SGI + cups = invalid handle
>     Linux + generic = ok
>     Linux + cups = ok
> 
> (the Linux system was using the generic stuff originally...)
> 
> Sooo, it looks like we might have a byte order issue in the new
> code (SGI = big endian, Linux = little endian)

Actually it's not byte order. You log showed the problem.

Remove the debug timestamps first by doing a grep -v '^\[' log.xxx >log

At line 866 the SPOOLSS pipe is opened with a pnum of 0x701f,
and at line 1590 another SPOOLSS pipe is opened with a pnum of
0x7020.

Then at line 2349 a handle is allocated on pnum 0x7020
(OpenPrinterEx) and then used in an RPC on pnum 0x701f
at line 5454 to ClosePrinterEx. This of course is a different
pipe number from the one it was allocated on.

Bleeegh. This means NT doesn't keep track of the pipe number
a handle was allocated on and - just the pipe type. Ok, I
can do the same - just add a level of indirection including
a pipe handle reference count.

I've got to get my car serviced, then I'll code it up - expect
a checkin on HEAD and 2.2 sometime today.

Thanks for your help in tracking this down.

Jeremy.

-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------




More information about the samba-technical mailing list