SNMP frontend, new preli table handling code
Skipped data set and use table-helper only Specialized SNMP error handling
This commit is contained in:
parent
468a0aa4ae
commit
6f7a33d196
15 changed files with 750 additions and 363 deletions
|
|
@ -1847,6 +1847,9 @@ yang_valstr2enum(yang_stmt *ytype,
|
|||
* @param[in] ytype YANG type noden
|
||||
* @param[in] enumstr Value of enum
|
||||
* @param[out] valstr Corresponding string containing an int (direct pointer, dont free)
|
||||
* @retval 1 OK, result in valstr
|
||||
* @retval 0 Invalid, not found
|
||||
* @retval -1 Error
|
||||
*/
|
||||
int
|
||||
yang_enum2valstr(yang_stmt *ytype,
|
||||
|
|
@ -1862,14 +1865,17 @@ yang_enum2valstr(yang_stmt *ytype,
|
|||
goto done;
|
||||
}
|
||||
if ((yenum = yang_find(ytype, Y_ENUM, enumstr)) == NULL)
|
||||
goto done;
|
||||
goto fail;
|
||||
/* Should assign value if yval not found */
|
||||
if ((yval = yang_find(yenum, Y_VALUE, NULL)) == NULL)
|
||||
goto done;
|
||||
*valstr = yang_argument_get(yval);
|
||||
retval = 0;
|
||||
retval = 1;
|
||||
done:
|
||||
return retval;
|
||||
fail:
|
||||
retval = 0;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/*! Get integer value from xml node from yang enumeration
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue