Use returned string of monitor.query message if "value" parameter is not set.
Removed an unnecessary string copy. git-svn-id: http://voip.null.ro/svn/yate@5648 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
15908020fd
commit
90112ddece
|
@ -2879,9 +2879,11 @@ AsnValue SnmpAgent::makeQuery(const String& query, unsigned int& index, AsnMib*
|
|||
msg.addParam("name",query);
|
||||
msg.addParam("index",String(index));
|
||||
if (Engine::dispatch(msg)) {
|
||||
String value = msg.getValue("value","");
|
||||
if (!value.null()) {
|
||||
val.setValue(value);
|
||||
const String* value = msg.getParam(YSTRING("value"));
|
||||
if (!value)
|
||||
value = &msg.retValue();
|
||||
if (*value) {
|
||||
val.setValue(*value);
|
||||
val.setType(STRING);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue