µTasker Forum
µTasker Forum => µTasker general => Topic started by: cvela on February 15, 2010, 04:09:26 PM
-
Hi!
I'm using the simulator and when I try to disble the generation of HTTP Dynamic content undefining the symbol HTTP_DYNAMIC_CONTENT in config.h, i get a compilation error in http.c.
The error is 'DynamicCnt is not a memmber of stHTTP'. It appears at lines 283, 1099 and 1100.
What am I missing? Is it necessary to comment out any other symbol or something else?
Really it is not a problem. I don't need this feature and I'd like to eliminate it just to reduce the code size and for clarity, but for the moment is not a problem for me.
Thanks in advance,
Carlos Vela.
-
Hi Carlos
I can confirm this and suggest the following modification in the HTTP struct in tcpip.h so that this configuration is possible:
Original:
#ifdef HTTP_DYNAMIC_CONTENT
#ifdef HTTP_USER_DETAILS // {10}
void *ptrUserData; // pointer to memory containing connection details needed by application
#endif
#ifdef HTTP_WINDOWING_BUFFERS
LENGTH_CHUNK_COUNT DynamicCnt[1 + HTTP_WINDOWING_BUFFERS]; // reference during dynamic content generation {10} array {12}
#else
LENGTH_CHUNK_COUNT DynamicCnt[2]; // {12}
#endif
#endif
New:
#if defined HTTP_DYNAMIC_CONTENT && defined HTTP_USER_DETAILS // {10}
void *ptrUserData; // pointer to memory containing connection details needed by application
#endif
#if defined HTTP_DYNAMIC_CONTENT || defined HTTP_WINDOWING_BUFFERS // {35}
#ifdef HTTP_WINDOWING_BUFFERS
LENGTH_CHUNK_COUNT DynamicCnt[1 + HTTP_WINDOWING_BUFFERS]; // reference during dynamic content generation {10} array {12}
#else
LENGTH_CHUNK_COUNT DynamicCnt[2]; // {12}
#endif
#endif
The problem was that DynamicCnt[] was also being used for HTTP TCP windowing and so demanded that HTTP_DYNAMIC_CONTENT was enabled. This now compiles and seems to be OK for standard HTTP operation, even when HTTP_DYNAMIC_CONTENT is disabled.
Regards
Mark
-
Hi Mark!
Many thanks for your answer.
Regards,
Carlos Vela.