From a7788636025a7768faf789f95fcd5c74c25004e8 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Fri, 8 Mar 2002 15:25:43 +0000 Subject: [PATCH] In do_sel udf is not set false at the beginning. If selm has an invalid value recGblSetSevr(psel,SOFT_ALARM,MAJOR_ALARM) is called. --- src/rec/selRecord.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/rec/selRecord.c b/src/rec/selRecord.c index cdbe88878..462ad6252 100644 --- a/src/rec/selRecord.c +++ b/src/rec/selRecord.c @@ -380,7 +380,6 @@ struct selRecord *psel; /* pointer to selection record */ double val; /* selection mechanism */ - psel->udf = TRUE; pvalue = &psel->a; switch (psel->selm){ case (SELECTED): @@ -417,12 +416,16 @@ struct selRecord *psel; /* pointer to selection record */ val = order[order_inx/2]; break; default: + recGblSetSevr(psel,SOFT_ALARM,MAJOR_ALARM); return(-1); } if (val != 1e+30 && val != -1e+30 ){ psel->val=val; psel->udf=FALSE; - } + } else { + recGblSetSevr(psel,UDF_ALARM,MAJOR_ALARM); + /* If UDF is TRUE this alarm will be overwritten by checkAlarms*/ + } /* initialize flag */ return(0); }