Commit Graph
42 Commits
Author SHA1 Message Date
Olaf Barthel 861e0f088a Long overdue fixes for typos and such 2024-09-23 15:54:07 +02:00
Olaf Barthel cd9dce733f Rollback of all changes made for smbfs 2.23
The proof of concept implementation of mapping the original UTF16LE-encoded path names to hashed versions in the ISO-Latin-1 encoded space did not scale well and would invariably leak memory because there is no safe way to determine whether such a mapping was no longer needed. There appears to be no way to make this work robustly.

So, sadly, I removed Tygre's implementation.

We are back to square one with mapping UTF16LE-encoded path names, and also with mapping file/directory names longer than 107 characters (Windows names can be up to 127 characters long).
2024-09-23 14:40:20 +02:00
Tygre 4c51651c3f Adding support to convert Unicode filenames into AmigaOS filenames 2021-06-08 13:26:23 -04:00
Olaf Barthel 561ca54b8f Updated to version 2.20
If the Examine/ExNext/ExAll functions need to restart directory scanning, the cache maintained by the smbfs directory reader is now always cleared.

Removed the directory cache expiration time feature, along with the just-introduced CACHEEXPIRES option. The context in which the expiration time was used did not justify it as a feature. It looked more like a bug...

Rewrote the smba_readdir() function to perform its only task in a much simpler manner. It now either fills the directory cache or retrieves the cache entries to be delivered to the caller, resuming the retrieval at a predefined position if required.
2019-02-28 11:04:35 +01:00
obarthel d8adddb851 Updated to version 2.19
smb_proc_readdir_short() now updates the scan resume information for every directory entry it can process and actually uses the scan resume information when asked to resume scanning.

If the directory cache becomes stale before the contents have been processed, scanning will have to be restarted. smbfs now tells the server that the scan operation has been aborted before it is started again.

Directory scanning in combination with deletion operations can collapse if the directory cache becomes stale before all the relevant entries have been processed. You can now tune how long the cache will remain active, which previously was a period of 5 seconds. The current default is 10 seconds, which definitely helps. Use the new CACHEEXPIRES option to change how long the cache is considered good enough.
2019-02-23 12:26:49 +01:00
obarthel 401f1291e3 Updated to version 2.12
Found a couple more cases in which debug output did not use the correct parameter information. This happened, for example, in the SMB write operation (which did not correctly report the 64 bit seek offset) and the ACTION_SET_COMMENT implementation which did not print the comment string correctly.

Added a proper string length limit check for the text buffers used by the DateToStr() function.

Enabled profiling support for SAS/C to learn more about the most frequently-used functions and their respective running times. Added inline qualifiers to these functions, or copied the respective function to where it was called, allowing it to be inlined.

The main file system processing loop no longer calls WaitSelect() every time it needs to wait for a new packet to arrive, or for a NetBIOS "keep alive" message to come along. It now defaults to calling Wait(), which has a much lower overhead than WaitSelect(). However, periodic calls to WaitSelect() and the associated NetBIOS "keep alive" handling are scheduled regularly every 10 seconds. That way the "keep alive" messages are dealt with without spending too much time with WaitSelect().
2019-01-06 10:45:39 +01:00
obarthel 781ed01675 Updated to version 2.10
The smb_receive_raw() function in "sock.c" again copies the NetBIOS header into the receive buffer separately, rolling back an earlier change which did not seem to be sound, and also served to make complicated code even more complicated :-/

Added the SCATTERGATHER tuning option which defaults to "no". Instead of breaking down write operations into two separate send() calls (one short, one very large), setting SCATTERGATHER=yes can call sendmsg() instead which allows the entire operation to be completed in one single step. This approach was suggested by Patrik Axelsson. Currently, I am uncertain if all AmiTCP V3/V4 TCP/IP stacks implement sendmsg() for TCP sockets in the same consistent manner, which is why this feature is not enabled by default.
2018-12-29 10:46:35 +01:00
obarthel d0250562c3 Updated to version 2.9
Added the TCP_NODELAY, SO_RCVBUF and SO_SNDBUF tuning options which serve the same purposes as their Samba configuration option counterparts.
2018-12-24 12:32:19 +01:00
Olaf Barthel 81598879d5 Updated to version 2.8
Added the WRITETHRESHOLD parameter which can be used to disable the separate transmission of the SMB message header and its payload if the combined sizes of both are smaller than or equal to the threshold value. This is intended to improve write performance for small amounts of data which would otherwise linger in the transmission queue.

Added the READTHRESHOLD counterpart to WRITETHRESHOLD which affects the read operations.

The smb_receive_raw() function in "sock.c" no longer copies the NetBIOS header into the receive buffer separately, but makes sure that the initial receive operation takes care of it.

The allocate_path_name() function in "smb_abstraction.c" failed to put the path separator character where it should be, resulting in the path name and the file/directory name to get lumped together. This affected creation of files and directories both.

The default values for READTHRESHOLD and WRITETHRESHOLD now have the effect of transmitting the SMB header and the payload separately, just like it was introduces in version 2.1.

Use something like READTHRESHOLD=1500 and WRITETHRESHOLD=1500 to send packets smaller than or equal to 1500 bytes as a combined lump of data, and data larger than 1500 bytes as separate SMB header and payload.

When processing the share name the limitations on the individual components (server name, share, port number/IP service name) are no longer verified using hard-coded lengths, but use the respective buffer limits instead. The port number/IP service name length check is new.

Added more debug log output to the code which now performs the file and lock name/address lookups instead of walking throug the entire file/lock lists.
2018-12-19 16:09:04 +01:00
obarthel bc59f2e6b5 Updated to version 1.176
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-08-12 11:14:44 +02:00
Olaf Barthel bfc6b74ddc Updated to version 1.158
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-27 11:14:20 +02:00
obarthel 593e22abb2 Updated to version 1.152
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-11 20:16:56 +02:00
obarthel 31c8fb0d77 Updated to version 1.146
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-03 11:36:04 +02:00
obarthel 32c75549a4 Updated to version 1.144
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-06-01 15:35:50 +02:00
obarthel 41e8bc46bd Updated to version 1.143
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-30 18:59:23 +02:00
obarthel 8e4d177607 Updated to version 1.140
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-27 15:38:19 +02:00
obarthel ea486c36c9 Updated to version 1.139
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-26 14:37:48 +02:00
Olaf Barthel 951e61cc62 Updated to version 1.136
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-22 12:34:02 +02:00
obarthel 8807ed9641 Updated to version 1.135
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-21 14:20:09 +02:00
obarthel 5f07e3e857 Updated to version 1.133
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-20 11:19:48 +02:00
obarthel afe7b87f24 Updated to version 1.132
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-19 15:43:09 +02:00
obarthel 8daa23142f Updated to version 1.129
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-13 12:42:55 +02:00
obarthel d2a15bd63e Updated to version 1.128
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-11 11:07:04 +02:00
Olaf Barthel 632429a309 Updated to version 1.125
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-08 11:34:47 +02:00
obarthel 047be4f827 Updated to version 1.124
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-06 16:50:02 +02:00
obarthel 61735b08c2 Updated to version 1.222
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-05 15:03:16 +02:00
obarthel cd5669e306 Updated to version 1.120
Please keep in mind that this is still a development version and might surprise you (not necessarily in a good way).

Do not let me discourage you to build and test this version, although there will be some risks involved such as data corruption or loss of data.
2018-05-01 15:14:45 +02:00
obarthel 94cf193a82 Updated to version 1.116 2017-12-23 09:11:11 +01:00
Olaf Barthel 3ea31dbf2c Added WRITEBEHIND and PREFERWRITERAW options 2016-04-26 15:52:08 +02:00
Olaf Barthel 8402a08510 Added the remaining error codes 2016-04-09 11:27:17 +02:00
Olaf Barthel 8b0b3fbe48 Version bump 2016-04-04 14:22:20 +02:00
Olaf Barthel 4a769ec098 Indentation cleanup / blkmode becomes capabilities 2016-04-02 12:29:15 +02:00
Olaf Barthel 93dc9c4c19 Indentation cleanup 2016-04-02 12:28:57 +02:00
Olaf Barthel 2adfed7183 success/error handling is now consistent
All functions now follow a consistent error reporting scheme. A negative return value always indicates an error condition. A return value of 0 always indicates success, except for the few functions which have to return a count of bytes or directory records upon success.

Previously, it was hard to tell what function returned what in case of error, which led the bugs in smba_write() and smba_read(), neither of which gracefully fell back on SMB_COM_WRITE/SMB_COM_READ, respectively if SMB_COM_WRITE_RAW/SMB_COM_READ_RAW failed.

State variables are now named according to their respective purpose where possible. Previously, it was "rval", "errnum", "result" which were used almost interchangeably regardless of purpose.
2016-03-30 13:48:32 +02:00
Olaf Barthel 11c3b7891d Reworked the word/dword conversion code
The word/dword conversion macros should be more robust now, using type casts where needed.
2016-03-06 15:23:03 +01:00
Olaf Barthel 4893011dae Renamed max_xmit to given_max_xmit
Because the field and variable name "max_xmit" was used in four different places, with different types in different context, it was hard to know what was what. This is part of the cleanup work.
2016-03-06 15:22:13 +01:00
Olaf Barthel 76bdadec3d Removed server state from global data structure
These fields are not needed in the global data structure, they are used only locally.
2016-03-06 15:20:55 +01:00
Olaf Barthel f607381ad1 Hard-coded SMB port number no longer required
The corresponding code in the SMB abstraction layer now uses getservbyname("netbios-ssn","tcp") instead.
2016-02-21 13:38:22 +01:00
Olaf Barthel b20e2b432e Added switch to enable raw SMB access
The updated SMB abstraction layer supports skipping the NetBIOS protol layer altogether, which improves compatibility with Windows Vista, Windows 7, etc.
2016-02-21 13:36:39 +01:00
Olaf Barthel 1566796e21 smbfs 1.68 (3.6.2005)
- It appears that Windows XP can produce directory listings with
  file/directory modification times set to 0, indicating that no
  such information is available, while the associated last file
  write access data is present. Previously, smbfs only reported
  the modification. If this data is unavailable and the date of
  the last write access is, the last write access will be
  reported instead.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@11 26594b9e-b914-4e86-b7a1-9402bd427170
2005-06-03 14:35:12 +00:00
Olaf Barthel d29f359e49 smbfs 1.67 (27.5.2005)
- Replaced the long NT date conversion code with something hopefully
  much more robust. The results so far are both encouraging and
  irritating. Dates that previously came out as "unknown" are now
  processed, but there are differences between the dates shown in the
  directory listing and by listing the files by name. Go figure...

- Transplanted some more code from Samba to handle directory entry
  data conversion.


git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@5 26594b9e-b914-4e86-b7a1-9402bd427170
2005-05-27 09:48:26 +00:00
Olaf Barthel ed8def5209 - Initial import into sourceforge.net CVS.
git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/amiga-smbfs/trunk@3 26594b9e-b914-4e86-b7a1-9402bd427170
2005-05-24 13:22:14 +00:00