rem: LOG(L_ERR,"ERROR:run_priority_switch: unknown output node type" " (%d) for PRIORITY_SWITCH node\n",NODE_TYPE(kid));
add: LOG(L_ERR,"ERROR:cpl-c:run_priority_switch: unknown output node" " type (%d) for PRIORITY_SWITCH node\n",NODE_TYPE(kid));
context: inline unsigned char *run_time_switch( struct cpl_interpreter *intr ){	unsigned char  *p;	unsigned char  *kid;	unsigned char  attr_name;	unsigned short attr_len;	unsigned char  *attr_str;	unsigned char  flags;	int nr_attrs;	int i,j;	ac_tm_t att;	tmrec_t trt;	/* I'm totally ignoring any attributes in the time-switch node	 * let me make it work and I'll about this time zone, etc */	DBG("DEBUG:run_time_switch: checking recv. time stamp <%d>\n",		intr->recv_time);	for( i=0 ; i<NR_OF_KIDS(intr->ip) ; i++ ) {		kid = intr->ip + KID_OFFSET(intr->ip,i);		check_overflow_by_ptr( kid+SIMPLE_NODE_SIZE(kid), intr, script_error);		switch ( NODE_TYPE(kid) ) {			case NOT_PRESENT_NODE:				DBG("DEBUG:run_time_switch: NOT_PRESENT node found ->"					"skipping (useless in this case)\n");				break;			case OTHERWISE_NODE :				if (i!=NR_OF_KIDS(intr->ip)-1) {					LOG(L_ERR,"ERROR:run_time_switch: OTHERWISE node "						"not found as the last sub-node!\n");					goto script_error;				}				DBG("DEBUG:run_time_switch: matching on OTHERWISE node\n");				return get_first_child(kid);			case TIME_NODE :				/* init structures */				memset( &att, 0, sizeof(att));				memset( &trt, 0, sizeof(trt));				if(ac_tm_set_time( &att, intr->recv_time))					goto runtime_error;				/* let's see how many attributes we have */				nr_attrs = NR_OF_ATTR(kid);				/* get the attributes */				p = ATTR_PTR(kid);				flags = 0;				for(j=0;j<nr_attrs;j++) {					/* get the attribute */					get_basic_attr( p, attr_name, attr_len, intr, script_error);					get_str_attr( p, attr_str, attr_len, intr, script_error,1);					/* process the attribute */					DBG("DEBUG:cpl_c:run_time_node: attribute [%d] found :"						"[%s]\n",attr_name, attr_str);					switch (attr_name) {						case DTSTART_ATTR:							if( !attr_str || tr_parse_dtstart(&trt, attr_str))								goto parse_err;							flags ^= (1<<0);							break;						case DTEND_ATTR:							if( !attr_str || tr_parse_dtend(&trt, attr_str))								goto parse_err;							flags ^= (1<<1);							break;						case DURATION_ATTR:							if( !attr_str || tr_parse_duration(&trt, attr_str))								goto parse_err;							flags ^= (1<<1);							break;						case FREQ_ATTR:							if( attr_str && tr_parse_freq(&trt, attr_str))								goto parse_err;							break;						case UNTIL_ATTR:							if( attr_str && tr_parse_until(&trt, attr_str))								goto parse_err;							break;						case INTERVAL_ATTR:							if( attr_str && tr_parse_interval(&trt, attr_str))								goto parse_err;							break;						case BYDAY_ATTR:							if( attr_str && tr_parse_byday(&trt, attr_str))								goto parse_err;							break;						case BYMONTHDAY_ATTR:							if( attr_str && tr_parse_bymday(&trt, attr_str))								goto parse_err;							break;						case BYYEARDAY_ATTR:							if( attr_str && tr_parse_byyday(&trt, attr_str))								goto parse_err;							break;						case BYMONTH_ATTR:							if( attr_str && tr_parse_bymonth(&trt, attr_str))								goto parse_err;							break;						case BYWEEKNO_ATTR:							if( attr_str && tr_parse_byweekno(&trt, attr_str))								goto parse_err;							break;						case WKST_ATTR:							if( attr_str && tr_parse_wkst(&trt, attr_str))								goto parse_err;							break;						default:							LOG(L_ERR,"ERROR:cpl_c:run_time_switch: "								"unsupported attribute [%d] found in TIME "								"node\n",attr_name);							goto script_error;					} /* end attribute switch */				} /* end for*/				/* check the mandatory attributes */				if ( flags!=((1<<0)|(1<<1)) ) {					LOG(L_ERR,"ERROR:cpl_c:run_time_switch: attribute DTSTART"						",DTEND,DURATION missing or multi-present\n");					goto script_error;				}				/* does the recv_time match the specified interval?  */				j = check_tmrec( &trt, &att, 0);				ac_tm_free( &att );				tmrec_free( &trt );				switch  (j) {					case 0:						DBG("DEBUG:run_time_switch: matching current "							"TIME node\n");						return get_first_child(kid);					case -1:						LOG(L_ERR,"ERROR:cpl_c:run_time_switch: check_tmrec "							"ret. err. when testing time cond. !\n");						goto runtime_error;						break;					case 1:						DBG("DEBUG:cpl_c:run_time_switch: time cond. doesn't"							" match !\n");						break;				}				break;			default:				LOG(L_ERR,"ERROR:run_priority_switch: unknown output node type"					" (%d) for PRIORITY_SWITCH node\n",NODE_TYPE(kid));				goto script_error;		} /* end switch for NODE_TYPE */	} /* end for for all kids */	/* none of the branches of TIME_SWITCH mached -> go for default */	ac_tm_free( &att );	tmrec_free( &trt );	return DEFAULT_ACTION;runtime_error:	ac_tm_free( &att );	tmrec_free( &trt );	return CPL_RUNTIME_ERROR;parse_err:	LOG(L_ERR,"ERROR:run_priority_switch: error parsing attr [%d][%s]\n",		attr_name,attr_str?(char*)attr_str:"NULL");script_error:	ac_tm_free( &att );	tmrec_free( &trt );	return CPL_SCRIPT_ERROR;}