Function calls within a web file are initiated by a char \255 followed by the ID of the function to be called. After analyzing the char-arrays representing the web files in web_files.c, I can assure that functions are not called multiple times within a file (except if intended).
however, it seems the functions having the 9 lowest function IDs are ALWAYS called. (Added a print to web_server_dyn_express(), the function that links function IDs and functions).
Opening a page printing an error log looks like this:
Code: Select all
web function call #0 <-- process post
web function call #1 <-- insert header
web function call #2 <-- insert menu
web function call #3 <-- close header
web function call #4 <-- print user feedback
feedback
web function call #5 <-- print device name
web function call #6 <-- print firmware version
getVer
web function call #7 <-- print version of data image
web function call #9 <-- print errors, start at buffer start
errorOutput
web buf len 947
web function call #9 <-- duplicate
errorOutput
web buf len 947
web function call #10 <-- print errors, continue from current buf location
errorOutput
web buf len 0
web function call #8 <-- insert footer
web function call #0 <-- duplicate
web function call #1 <-- duplicate
web function call #2 <-- duplicate
web function call #3 <-- duplicate
web function call #4 <-- duplicate
feedback
web function call #5 <-- duplicate
web function call #6 <-- duplicate
getVer
web function call #7 <-- duplicate
web function call #8 <-- duplicate
Code: Select all
web function call #0
web function call #1
web function call #2
web function call #3
web function call #4
feedback
web function call #5
web function call #6
getVer
web function call #7
web function call #8
I am a bit lost on what might be causing this behaviour and compared all source files of my lib_webserver module with a fresh download. They are identical, except that I changed everyting flash related to quadflash (not using flash for the website, but had to change everyting so i can include the library for quadflash devices). makefs.py is identical as well.