From bc999c40c0491a15601ddba63e19ede30d20f9b1 Mon Sep 17 00:00:00 2001 From: kmpeters Date: Wed, 24 Oct 2012 22:30:31 +0000 Subject: [PATCH] Modified motorUtilAux.cc to exclude aliased motors from list of motors to stop. --- motorApp/MotorSrc/motorUtilAux.cc | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/motorApp/MotorSrc/motorUtilAux.cc b/motorApp/MotorSrc/motorUtilAux.cc index caa2c823..4548ca6d 100644 --- a/motorApp/MotorSrc/motorUtilAux.cc +++ b/motorApp/MotorSrc/motorUtilAux.cc @@ -51,7 +51,7 @@ extern int numMotors; char ** getMotorList() { DBENTRY dbentry, *pdbentry = &dbentry; - long status; + long status, a_status; char **paprecords = 0, temp[PVNAME_STRINGSZ]; int num_entries = 0, length = 0, index = 0; @@ -68,12 +68,16 @@ char ** getMotorList() status = dbFirstRecord(pdbentry); while (!status) { - length = sprintf(temp, "%s", dbGetRecordName(pdbentry)); - paprecords[index] = (char *) callocMustSucceed(length+1, + a_status = dbIsAlias(pdbentry); + if (a_status == 0) + { + length = sprintf(temp, "%s", dbGetRecordName(pdbentry)); + paprecords[index] = (char *) callocMustSucceed(length+1, sizeof(char), "getMotorList(2nd)"); - strcpy(paprecords[index], temp); + strcpy(paprecords[index], temp); + index++; + } status = dbNextRecord(pdbentry); - index++; } numMotors = index; }