CHANGES: BUG: 1267 snmplib: register_mib_context() fix for read-only variables

This is a slightly modified version of a patch from Harsha Shivanna.
diff --git a/agent/helpers/old_api.c b/agent/helpers/old_api.c
index 397bdc7..d2b99d9 100644
--- a/agent/helpers/old_api.c
+++ b/agent/helpers/old_api.c
@@ -124,7 +124,8 @@
         reginfo->range_ubound = range_ubound;
         reginfo->timeout = timeout;
         reginfo->contextName = (context) ? strdup(context) : NULL;
-        reginfo->modes = HANDLER_CAN_RWRITE;
+        reginfo->modes = vp->acl == NETSNMP_OLDAPI_RONLY ? HANDLER_CAN_RONLY :
+                         HANDLER_CAN_RWRITE;
 
         /*
          * register ourselves in the mib tree