Hi ik,
Thanks for your reply.
I want to use the TFTP-server for loading configuration and firmware to networkdevices.
Synapse has a demo TFTP-server and -client which I am using.
I thought my code above was the problem, but it is also in the original demo-code when sending a file to the server.
When I want to send a file to the server that exists, the client does not get errormessage 6 'File already exists', but 0 ''.
Using wireshark I can see the server sending the correct error code to the client, but the client appartently does not receive it properly, and display a 0 error.
When I want to receive a file, and it does not exist, the client displays the proper errormessage 1 'File not found'. Here error handling is OK.
To compile the TFTP demo's I had to change FileExistsUTF8 to FileExists in TTFTPDaemonThread. Could this be a problem?
How does client receive the error, I cant see this clearly, does ftptsend.pas handle it?
Using Laz 0.9.30 fpc 2.4.2 on XP
Edit: typo.