lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-users] Problem with loading a website


From: User431
Subject: [lwip-users] Problem with loading a website
Date: Thu, 11 Jan 2018 07:44:25 -0700 (MST)

Hello guys,
I've got some trouble with the webserver, a website and FatFS.
I implemented the fs_open_custom, fs_read_custom and fs_close_custom
functions. 
This works fine so far, I can open in a browser every single file I'm
placing on the SD-Card. It doesn't matter if the file has only 1 kB or 10
MB. 

But now it's time to build a website. On my first page I've got a html-file,
a css-file and two jpeg-image. As I said, opening every file individually is
no problem. This works fine.

But wenn I open the html file, where the css file and the jpeg are linked
in, the problems begin.

Normally first is the fs_open_custom called. In this function, I open with
f_open the requested file and save into the fs_file struct the length of the
file. 
Then the fs_read_custom function is called. In this function I read the
ammount of bytes, which are given with the count integer and copy them into
the buffer. When the file is bigger then the buffer, this function is called
again, until it's read all bytes and return END_OF_FILE. 
And finally, the fs_close_custom function is called. Here I only call the
function f_close. 

And now the problem. 
The html file is going through the steps mentioned above. It's so small, so
fs_read_custom is only called once. Then the css-file is coming, the same
result. 
Now it's time for the first jpeg. fs_open_custom is called normal, then
fs_read_custom. But the file is to big, so fs_read_custom should be called
again. But this is not happen. Instead of that, fs_open_custom is called for
the second jpeg. And then again the fs_read_custom function. And after that,
fs_close_custom.
 
So no one of the jpegs is loaded and send to the client the right way. 

I hope, you understand my issue and can help me. 
Thank you very much!



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

[Prev in Thread] Current Thread [Next in Thread]