else
show_context_help=TRUE;
}
else if((strstr(input,"use_authentication=")==input)){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\n");
if(temp_buffer==NULL)
use_authentication=TRUE;
else if(atoi(temp_buffer)==0)
use_authentication=FALSE;
else
use_authentication=TRUE;
}
else if(strstr(input,"nagios_check_command=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\x0");
if(temp_buffer!=NULL){
strncpy(nagios_check_command,temp_buffer,sizeof(nagios_check_command));
nagios_check_command[sizeof(nagios_check_command)-1]='\x0';
strip(nagios_check_command);
}
}
else if(strstr(input,"refresh_rate=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\x0");
refresh_rate=atoi((temp_buffer==NULL)?"60":temp_buffer);
}
else if(strstr(input,"physical_html_path=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\n");
strncpy(physical_html_path,(temp_buffer==NULL)?"":temp_buffer,sizeof(physical_html_path));
physical_html_path[sizeof(physical_html_path)-1]='\x0';
strip(physical_html_path);
if(physical_html_path[strlen(physical_html_path)-1]!='/' && (strlen(physical_html_path) < sizeof(physical_html_path)-1))
strcat(physical_html_path,"/");
snprintf(physical_images_path,sizeof(physical_images_path),"%simages/",physical_html_path);
physical_images_path[sizeof(physical_images_path)-1]='\x0';
snprintf(physical_ssi_path,sizeof(physical_images_path),"%sssi/",physical_html_path);
physical_ssi_path[sizeof(physical_ssi_path)-1]='\x0';
}
else if(strstr(input,"url_html_path=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\n");
strncpy(url_html_path,(temp_buffer==NULL)?"":temp_buffer,sizeof(url_html_path));
url_html_path[sizeof(url_html_path)-1]='\x0';
strip(url_html_path);
if(url_html_path[strlen(url_html_path)-1]!='/' && (strlen(url_html_path) < sizeof(url_html_path)-1))
strcat(url_html_path,"/");
snprintf(url_docs_path,sizeof(url_docs_path),"%sdocs/",url_html_path);
url_docs_path[sizeof(url_docs_path)-1]='\x0';
snprintf(url_context_help_path,sizeof(url_context_help_path),"%scontexthelp/",url_html_path);
url_context_help_path[sizeof(url_context_help_path)-1]='\x0';
snprintf(url_images_path,sizeof(url_images_path),"%simages/",url_html_path);
url_images_path[sizeof(url_images_path)-1]='\x0';
snprintf(url_logo_images_path,sizeof(url_logo_images_path),"%slogos/",url_images_path);
url_logo_images_path[sizeof(url_logo_images_path)-1]='\x0';
snprintf(url_stylesheets_path,sizeof(url_stylesheets_path),"%sstylesheets/",url_html_path);
url_stylesheets_path[sizeof(url_stylesheets_path)-1]='\x0';
snprintf(url_media_path,sizeof(url_media_path),"%smedia/",url_html_path);
url_media_path[sizeof(url_media_path)-1]='\x0';
}
else if(strstr(input,"service_critical_sound=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\n");
if(temp_buffer==NULL)
continue;
service_critical_sound=strdup(temp_buffer);
}
else if(strstr(input,"service_warning_sound=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\n");
if(temp_buffer==NULL)
continue;
service_warning_sound=strdup(temp_buffer);
}
else if(strstr(input,"service_unknown_sound=")==input){
temp_buffer=strtok(input,"=");
temp_buffer=strtok(NULL,"\n");
if(temp_buffer==NULL)
continue;
service_unknown_sound=strdup(temp_buffer);
}
=4= |