summaryrefslogtreecommitdiff
path: root/ACE/ASNMP
diff options
context:
space:
mode:
authorAbdullah Sowayan <sowayan@users.noreply.github.com>2008-06-16 18:00:46 +0000
committerAbdullah Sowayan <sowayan@users.noreply.github.com>2008-06-16 18:00:46 +0000
commit6b2f0a7407d94a1c549ba9336f9a8f9d4a2143e4 (patch)
tree2de628584f2db1eaf3e097fd45ccf3ea12996ae2 /ACE/ASNMP
parent5f7c80aca3083b9c652f9a7e0d4615fcc78ccec4 (diff)
downloadATCD-6b2f0a7407d94a1c549ba9336f9a8f9d4a2143e4.tar.gz
Mon Jun 16 18:00:26 UTC 2008 Abdullah Sowayan <abdullah.sowayan@lmco.com>
Diffstat (limited to 'ACE/ASNMP')
-rw-r--r--ACE/ASNMP/examples/get/get.cpp4
-rw-r--r--ACE/ASNMP/examples/get/get_async.cpp35
-rw-r--r--ACE/ASNMP/examples/next/next.cpp4
-rw-r--r--ACE/ASNMP/examples/set/set.cpp4
4 files changed, 26 insertions, 21 deletions
diff --git a/ACE/ASNMP/examples/get/get.cpp b/ACE/ASNMP/examples/get/get.cpp
index 1829c381442..5d17cd7b7cc 100644
--- a/ACE/ASNMP/examples/get/get.cpp
+++ b/ACE/ASNMP/examples/get/get.cpp
@@ -190,8 +190,8 @@ int getapp::run()
else {
VbIter iter(pdu_);
while (iter.next(vb)) {
- cout << "\tOid = " << vb.to_string_oid() << "\n";
- cout << "\tValue = " << vb.to_string_value() << "\n";
+ cout << "\tOid = " << vb.to_string_oid() << "\n";
+ cout << "\tValue = " << vb.to_string_value() << "\n";
}
}
}
diff --git a/ACE/ASNMP/examples/get/get_async.cpp b/ACE/ASNMP/examples/get/get_async.cpp
index 163d559f58e..ebeff2a577a 100644
--- a/ACE/ASNMP/examples/get/get_async.cpp
+++ b/ACE/ASNMP/examples/get/get_async.cpp
@@ -194,21 +194,26 @@ void getapp::result(Snmp *, int rc)
Vb vb;
if (rc < 0)
{
- const char *ptr = snmp_.error_string();
- cout << "ASNMP:ERROR: get command failed reason: " << ptr << endl;
- } else {
- // check to see if there are any errors
- if (pdu_.get_error_status()) {
- cout << "ERROR: agent replied as follows\n";
- cout << pdu_.agent_error_reason() << endl;
- }
- else {
- VbIter iter(pdu_);
- while (iter.next(vb)) {
- cout << "\tOid = " << vb.to_string_oid() << "\n";
- cout << "\tValue = " << vb.to_string_value() << "\n";
- }
- }
+ const char *ptr = snmp_.error_string();
+ cout << "ASNMP:ERROR: get command failed reason: " << ptr << endl;
+ }
+ else
+ {
+ // check to see if there are any errors
+ if (pdu_.get_error_status())
+ {
+ cout << "ERROR: agent replied as follows\n";
+ cout << pdu_.agent_error_reason() << endl;
+ }
+ else
+ {
+ VbIter iter(pdu_);
+ while (iter.next(vb))
+ {
+ cout << "\tOid = " << vb.to_string_oid() << "\n";
+ cout << "\tValue = " << vb.to_string_value() << "\n";
+ }
+ }
}
cout << "\nASNMP:INFO: command completed normally.\n"<< endl;
ACE_Reactor::instance()->end_reactor_event_loop();
diff --git a/ACE/ASNMP/examples/next/next.cpp b/ACE/ASNMP/examples/next/next.cpp
index a246c1ce549..921439c0c21 100644
--- a/ACE/ASNMP/examples/next/next.cpp
+++ b/ACE/ASNMP/examples/next/next.cpp
@@ -189,8 +189,8 @@ int nextapp::run()
else {
VbIter iter(pdu_);
while (iter.next(vb)) {
- cout << "\tOid = " << vb.to_string_oid() << "\n";
- cout << "\tValue = " << vb.to_string_value() << "\n";
+ cout << "\tOid = " << vb.to_string_oid() << "\n";
+ cout << "\tValue = " << vb.to_string_value() << "\n";
}
}
}
diff --git a/ACE/ASNMP/examples/set/set.cpp b/ACE/ASNMP/examples/set/set.cpp
index 8cd8752f48a..4c0103bfbb8 100644
--- a/ACE/ASNMP/examples/set/set.cpp
+++ b/ACE/ASNMP/examples/set/set.cpp
@@ -260,8 +260,8 @@ int set::run()
else {
VbIter iter(pdu_);
while (iter.next(vb)) {
- cout << "\tOid = " << vb.to_string_oid() << "\n";
- cout << "\tValue = " << vb.to_string_value() << "\n";
+ cout << "\tOid = " << vb.to_string_oid() << "\n";
+ cout << "\tValue = " << vb.to_string_value() << "\n";
}
}
}