Make refresh interval configurable.

This commit is contained in:
ehouse 2009-03-02 05:29:06 +00:00
parent 6b3265ac47
commit 3469dc7bf3
2 changed files with 11 additions and 1 deletions

View file

@ -67,8 +67,17 @@ static void
send_meta( FILE* fil )
{
FILE* css;
RelayConfigs* cfg = RelayConfigs::GetConfigs();
fprintf( fil, "<head>" );
fprintf( fil, "<meta http-equiv=\"refresh\" content=\"5\" />" );
if ( !!cfg ) {
int refreshSecs;
if ( cfg->GetValueFor( "WWW_REFRESH_SECS", &refreshSecs ) ) {
fprintf( fil, "<meta http-equiv=\"refresh\" content=\"%d\" />",
refreshSecs );
}
}
css = fopen( "./xwrelay.css", "r" );
if ( NULL != css ) {

View file

@ -30,6 +30,7 @@ WWWPORT=11001
#WWW_LISTEN_ADDR=0
#--- INADDR_LOOPBACK: 0x7f000001/2130706433
WWW_LISTEN_ADDR=2130706433
WWW_REFRESH_SECS=30
# Need a unique name for every instance of the relay so they can
# create game ids guaranteed to be unique