Hello. I’ve got a problem of a similar nature as in DiBosco’s thread. To be precise, I want to pass some data from task declared and running in main.c to my www interface, meaning I have to add some code to httpd-cgi.c as well. And it’s the whole “data passing” thing that I’ve got a problem with.
I think there are basically three ways to pass data:
Using queues. Problem? Declaring “#include queues.h” in my httpd-cgi.c file leads to a… ahem… huge amount of errors while compiling.
Using “return” at the end of the data-generating task in main.c. Problem #1? Task gotta be “void” and there can be no “return” at the end of a “void”. Problem #2? Even if so, how do I reach this task in my httpd-cgi.c file? Adding “#include main.c” in header does not work.
Generating data to pointers. Basically simple idea. Problem? How do I reach this task (and pointer) in my httpd-cgi.c file? Adding “#include main.c” in httpd-cgi’s header does not work. Using “extern pointer_name” does not work (can’t be sure I’m using it correctly).
So that’s how I tried to deal with this situation. Can you help with any suggestions to make this work?