diff --git a/modules/database/src/ioc/dbStatic/dbStaticLib.c b/modules/database/src/ioc/dbStatic/dbStaticLib.c index fda3cbf51d..9ee7cb1bee 100644 --- a/modules/database/src/ioc/dbStatic/dbStaticLib.c +++ b/modules/database/src/ioc/dbStatic/dbStaticLib.c @@ -1668,9 +1668,12 @@ long dbCreateAlias(DBENTRY *pdbentry, const char *alias) dbInitEntry(pdbentry->pdbbase, &tempEntry); status = dbFindRecord(&tempEntry, alias); dbFinishEntry(&tempEntry); - if (!status) + if (!status) { + /* redefining the same alias for the same record is ok */ + if (tempEntry.precnode == precnode) + return 0; return S_dbLib_recExists; - + } pnewnode = dbCalloc(1, sizeof(dbRecordNode)); pnewnode->recordname = epicsStrDup(alias); pnewnode->precord = precnode->precord;