RCM 5700 Refresh page from main line

I have an application running, using HTTP server and CGI scripts. But I also
require to send a redirection (or refresh) from my main line code. Example being if new data comes into the micro, I need refresh from main line on its arrival. Hope this makes sense!

When my costate is done I call led3toggle (so I can change the state of the LED), which includes a cgi_redirectto.

int led3toggle(HttpState* state)
{
if (strcmp(led3,“ledon.gif”)==0) {
strcpy(led3,“ledoff.gif”);
}
else {
strcpy(led3,“ledon.gif”);
}
cgi_redirectto(state,REDIRECTTO); // When my costate is done I call led3toggle (so I can change the state of the LED), which includes a cgi_redirectto.

int led3toggle(HttpState* state)
{
if (strcmp(led3,“ledon.gif”)==0) {
strcpy(led3,“ledoff.gif”);
}
else {
strcpy(led3,“ledon.gif”);
}
cgi_redirectto(state,REDIRECTTO); // Is this what you’re referring to?
return 0;

when I go to the website the led does not show that it is off; however if I manually refresh the page, the led will go off.

Is this the redirecto you’re referring to?
return 0;

when I go to the website the led does not show that it is off; however if I manually refresh the page, the led will go off.

Many thanks in advance

Hi Gary,

Yes I am using similar cgi_redirecto(state.REDIRECTO), in fact I use the following cgi_redirectto(state,“/index.shtml”);

My cgi costate routines work fine, and when a cgi is called from the Web page via browser, the page updates on the browser instantly !

In my case my main line code talks to a serial port to check some outside
data. This is done repetatively ( every 20 mins ).

I am tryng to effect a cgi_redirectto(state,“/index.shtml”); from the main line code, at the end of the serial update routine, and believe that it should be possible some way !!

Regards Alex