PROXY  WHOIS  RQUOTE  TEXTS  SOFT  FOREX  BBOARD
 Music  Philosophy  Code  Literature  Russian

= ROOT|Technical|Code_Examples|C|nagios-2.9|cgi|cmd.c =

page 5 of 28



		else if(!strcmp(variables[x],"host")){
			x++;
			if(variables[x]==NULL){
				error=TRUE;
				break;
			        }

			host_name=(char *)malloc(strlen(variables[x])+1);
			if(host_name==NULL)
				host_name="";
			else
				strcpy(host_name,variables[x]);
			}

		/* we found the hostgroup name */
		else if(!strcmp(variables[x],"hostgroup")){
			x++;
			if(variables[x]==NULL){
				error=TRUE;
				break;
			        }

			hostgroup_name=(char *)malloc(strlen(variables[x])+1);
			if(hostgroup_name==NULL)
				hostgroup_name="";
			else
				strcpy(hostgroup_name,variables[x]);
			}

		/* we found the service name */
		else if(!strcmp(variables[x],"service")){
			x++;
			if(variables[x]==NULL){
				error=TRUE;
				break;
			        }

			service_desc=(char *)malloc(strlen(variables[x])+1);
			if(service_desc==NULL)
				service_desc="";
			else
				strcpy(service_desc,variables[x]);
			}

		/* we found the servicegroup name */
		else if(!strcmp(variables[x],"servicegroup")){
			x++;
			if(variables[x]==NULL){
				error=TRUE;
				break;
			        }

			servicegroup_name=(char *)malloc(strlen(variables[x])+1);
			if(servicegroup_name==NULL)
				servicegroup_name="";
			else
				strcpy(servicegroup_name,variables[x]);
			}

		/* we got the persistence option for a comment */
		else if(!strcmp(variables[x],"persistent"))
			persistent_comment=TRUE;

		/* we got the notification option for an acknowledgement */
		else if(!strcmp(variables[x],"send_notification"))
			send_notification=TRUE;

		/* we got the acknowledgement type */
		else if(!strcmp(variables[x],"sticky_ack"))
			sticky_ack=TRUE;

		/* we got the service check force option */
		else if(!strcmp(variables[x],"force_check"))
			force_check=TRUE;

		/* we got the option to affect host and all its services */
		else if(!strcmp(variables[x],"ahas"))
			affect_host_and_services=TRUE;

		/* we got the option to propagate to child hosts */
		else if(!strcmp(variables[x],"ptc"))
			propagate_to_children=TRUE;

		/* we got the option for fixed downtime */
		else if(!strcmp(variables[x],"fixed")){
			x++;
			if(variables[x]==NULL){
				error=TRUE;
				break;
			        }

			fixed=(atoi(variables[x])>0)?TRUE:FALSE;
		        }

		/* we got the triggered by downtime option */
		else if(!strcmp(variables[x],"trigger")){
			x++;
			if(variables[x]==NULL){
				error=TRUE;
				break;
=5=

1|2|3|4| < PREV = PAGE 5 = NEXT > |6|7|8|9|10|11|12|13|14.28

UP TO ROOT | UP TO DIR | TO FIRST PAGE

Google
 


E-mail Facebook Google Digg del.icio.us BlinkList Fark Furl Ma.gnolia Netscape NewsVine Reddit Slashdot Spurl StumbleUpon Technorati YahooMyWeb LiveJournal Blogmarks TwitThis Live News2.ru BobrDobr.ru Memori.ru MoeMesto.ru

0.0206339 wallclock secs ( 0.00 usr + 0.00 sys = 0.00 CPU)