can I define "static" interfaces in source/lib/interfaces.c?
Tomasz Chmielewski
mangoo at wpkg.org
Mon Feb 13 14:14:34 GMT 2006
Martin Zielinski wrote:
> Tomasz Chmielewski wrote:
>> Martin Zielinski wrote:
>>
>> (...)
>>
>>> Did some tests and comparisons between an ARM smbclient and a MIPS
>>> (BE) smbclient.
>>>
>>> 1st thing is, that I get several compiler warnings like these:
>>>
>>> libsmb/clireadwrite.c:35: warning: right shift count >= width of type
>>>
>>> they come from code like this:
>>>
>>> if ((SMB_BIG_UINT)offset >> 32) where sizeof (SMB_BIG_UINT) is 4 on
>>> ARM _and_ MIPS. (On my i686 it's: 8)
>>>
>>> Now comes the compiler:
>>> arm gcc: (0x40bd >> 32) == 0
>>> mips gcc: (0x40bd >> 32) == 0x40bd (!)
>>>
>>> so everything after that goes wrong.
>>>
>>> The smbclient error can be (warning: hack) fixed, when you change the
>>> code line
>>> - if ((SMB_BIG_UINT)offset >> 32)
>>> with
>>> + if (sizeof (SMB_BIG_UINT) > 4 && (SMB_BIG_UINT)offset >> 32)
>>>
>>> Perhaps, you find a more elegant way.
>>
>>
>> Hmm, it didn't help in my case, still get the error (reply_write_and_X
>> - large offset (c237 << 32) used and we don't support 64 bit offsets)
>> and the files are cut to 16573 bytes :(
>>
>> Any more ideas how to debug it?
>>
> Hmm, starts to become difficult...
> As the first chunk of data is (under normal circumstances) 16573 bytes
> in size, I still believe, that the second packet is wrong.
>
> Please verify with ethereal, that the WriteAndX Request at offset 16573
> contains a field decoded as "High Offset". This is the error case on my
> mips system.
It looks it has it:
Write AndX Request (0x2f)
(...)
Data Offset: 63
High Offset: 16573
(...)
I was uploading a file to a i686 Samba server, the file was broken.
> Then take a look at libsmb/clireadwrite.c
> In function cli_issue_write the large_writex value becomes True when the
> error occurs. This shouldn't happen.
The error shouldn't happen? This we know :)
Or it shouldn't become True, as the error is not really true?
Should I set it to false and try again?
> In general, the handling of potential 64 bit values seems not to be
> totally clean on 32bit-only systems. I found the problem on my mips
> board by tracking down the several defines in config.h and includes.h
> and comparing them to a working system.
Well.
I wonder if it wouldn't be faster to do some SSH magic and execute
smbclient from a "healthy" system :|
--
Tomasz Chmielewski
http://wpkg.org
More information about the samba-technical
mailing list