Fixed numerous bugs
This commit is contained in:
@@ -193,9 +193,13 @@ static long putParmString(char **pparm,char *pstring)
|
||||
{
|
||||
size_t size;
|
||||
|
||||
size = strlen(pstring) + 1;
|
||||
if(size>=MAX_STRING_SIZE) return(S_dbLib_badLink);
|
||||
if(*pparm && (*pparm != pNullString)) free((void *)(*pparm));
|
||||
if(!pstring) return(0);
|
||||
if(!(pstring = strchr(pstring,'@'))) return(0);
|
||||
pstring++;
|
||||
size = strlen(pstring) + 1;
|
||||
if(size==1) return(0);
|
||||
if(size>=MAX_STRING_SIZE) return(S_dbLib_badLink);
|
||||
*pparm = dbCalloc(size, sizeof(char *));
|
||||
strcpy(*pparm,pstring);
|
||||
return(0);
|
||||
@@ -1909,6 +1913,7 @@ char *dbVerify(DBENTRY *pdbentry,char *pstring)
|
||||
if(!pflddes->ftPvt) dbInitDeviceMenu(pdbentry);
|
||||
pdbDeviceMenu = (dbDeviceMenu *)pflddes->ftPvt;
|
||||
if(!pdbDeviceMenu) return(NULL);
|
||||
if(pdbDeviceMenu->nChoice == 0) return(NULL);
|
||||
for (i = 0; i < pdbDeviceMenu->nChoice; i++) {
|
||||
if (!(pchoice = pdbDeviceMenu->papChoice[i]))
|
||||
continue;
|
||||
|
||||
@@ -227,6 +227,7 @@ int dbIsDefaultValue(DBENTRY *pdbentry)
|
||||
if(!plink) return(FALSE);
|
||||
if(plink->type!=CONSTANT) return(FALSE);
|
||||
if(plink->value.constantStr == 0) return(TRUE);
|
||||
if(!pflddes->initial) return(FALSE);
|
||||
if(strcmp(plink->value.constantStr,pflddes->initial)==0)
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
|
||||
@@ -408,6 +408,7 @@ int dbIsDefaultValue(DBENTRY *pdbentry)
|
||||
if(!plink) return(FALSE);
|
||||
if(plink->type!=CONSTANT) return(FALSE);
|
||||
if(plink->value.constantStr == 0) return(TRUE);
|
||||
if(!pflddes->initial) return(FALSE);
|
||||
if(strcmp(plink->value.constantStr,pflddes->initial)==0)
|
||||
return(TRUE);
|
||||
return(FALSE);
|
||||
|
||||
@@ -93,6 +93,11 @@ maplinkType pamaplinkType[LINK_NTYPES] = {
|
||||
#define pvlOptCP 0x8 /*CA + process on monitor*/
|
||||
#define pvlOptCPP 0x10 /*CA + process passive record on monitor*/
|
||||
#define pvlOptFWD 0x20 /*Generate ca_put for forward link*/
|
||||
#define pvlOptInpNative 0x40 /*Input native*/
|
||||
#define pvlOptInpString 0x80 /*Input as string*/
|
||||
#define pvlOptOutNative 0x100 /*Output native*/
|
||||
#define pvlOptOutString 0x200 /*Output as string*/
|
||||
|
||||
typedef long (*LINKCVT)();
|
||||
struct pv_link {
|
||||
char *pvname; /*pvname to link to*/
|
||||
|
||||
Reference in New Issue
Block a user