Hi all.
I've made a small app (with source) that demonstates some problems with libtinysmb.
You will need to create a smb.conf file on your SD card (an example is included in the zip file) and have a file of suitable size on your smb share to test with.
There are two #defines in the source to adjust, SMB_READSIZE and SMB_READBYTES, see the comments in the source for more info.
Unless I'm making a mistake in my use of libtinysmb, here's what I found:
* libtinysmb cannot read more than approx 132096 bytes from a single file (could be slightly more, always crashes before I can see)
* Reading more than 4096 bytes at a time is unstable as SMB_ReadFile will return bogus read values even though smb.c indicates a maximum read size of 63488 bytes
* Calling SMB_ReadFile more than 60 times for a single file is prone to crashing the Wii
Here's the test app: http://users.tpg.com.au/drtwox/tinysmbtest.zip
Note: The pre-compiled .dol file contains "safe" values which will not crash. It *should* successfully read the file and exit back to the loader cleanly.
libtinysmb unstable/unusable
Re: libtinysmb unstable/unusable
Nevermind points 1 and 3, the CVS build fixes it... but I still find point 2 (large readsizes) causes problems.
Re: libtinysmb unstable/unusable
Hey, while using libtinysmb I detected a similar problem, although the maximum read amount was about 8000 bytes instead of 4096 for read_smb to return bogus (and take a looong time to execute).
A simple solution is to use a wrapper and read in blocks < 4096 calling read_smb several times. Ofcourse this is not a very elegant solution, but it works. I don't know what causes the problem (could be in libtinysmb or even in net_recv, which was causing the problems 1 and 3).
A simple solution is to use a wrapper and read in blocks < 4096 calling read_smb several times. Ofcourse this is not a very elegant solution, but it works. I don't know what causes the problem (could be in libtinysmb or even in net_recv, which was causing the problems 1 and 3).
Who is online
Users browsing this forum: No registered users and 2 guests