[AGENT++] AgentPro3 codegen error to add a MIB at a context

Claus Klein claus.klein at arcormail.de
Wed Sep 1 23:18:40 CEST 2010


=== modified file 'agenpro3/templates/agent++v3.5.23/ 
module_init_code.vm'
--- agenpro3/templates/agent++v3.5.23/module_init_code.vm	2010-08-31  
12:53:57 +0000
+++ agenpro3/templates/agent++v3.5.23/module_init_code.vm	2010-09-01  
11:36:07 +0000
@@ -28,13 +28,12 @@
  namespace Agentpp {
  #endif

-
  #if ($agenUtils.isDefined("agentX"))
  void module_init(const OctetStr& context, SubAgentXMib* mib) {
  #set($dot = "-")
  #set($underscore = "_")
  #foreach ( $m in $modules)
-	mib->add(new $m.moduleName.toLowerCase().replace($dot.charAt(0), 
$underscore.charAt(0))(context, mib));
+	mib->add(context, new  
$m.moduleName.toLowerCase().replace($dot.charAt(0), 
$underscore.charAt(0))(context, mib));
  #end
  }
  #else

On 01.09.2010, at 23:00, Claus Klein wrote:

> Hi,
>
> the AgentPro3 generated code it is not possible to add a mib at a
> context other than default.
> So I change the template to generate the following code:
>
>     void module_init(const OctetStr& context, SubAgentXMib* mib)
>     {
>         mib->add(context, new svfua_owner_mib(context, mib));
>         mib->add(context, new svfua_generic_mib(context, mib));
>         mib->add(context, new svfua_log_mib(context, mib));
>     }
>
>
> Please check my patch and add it to the next AgentPro Version.
>
> Best Regards,
>
> Claus
> _______________________________________________
> AGENTPP mailing list
> AGENTPP at agentpp.org
> http://lists.agentpp.org/mailman/listinfo/agentpp




More information about the AGENTPP mailing list