I'm using 5.3 and I generated a mfd project, along with it's
autogenerated AgentX main and it's Makefile.  I had hoped/assumed
that compiling that "as is" would at least compile, even if it
doesn't do anything.  It doesn't.

In fooBarTable_data_access.c, in the function fooBarTable_container_load,
there are chunks of code that look like this:

        /*
         * make sure there is enough space for fooBarThingName data
         */
        if ((NULL == rowreq_ctx->data.fooBarThingName) ||
            (rowreq_ctx->data.fooBarThingName_len <
             (fooBarThingName_len * sizeof(fooBarThingName[0])))) {
            snmp_log(LOG_ERR, "not enough space for value\n");
            return MFD_ERROR;
        }
        rowreq_ctx->data.fooBarThingName_len =
            fooBarThingName_len * sizeof(fooBarThingName[0]);
        memcpy(rowreq_ctx->data.fooBarThingName, fooBarThingName,
               fooBarThingName_len * sizeof(fooBarThingName[0]));


It looks like these are being generated by mib2c-conf.d/generic-ctx-get.m2i

They don't compile, giving an error that looks like 

  rdbmsDbTable_data_access.c:321: error: ‘fooBarThingName_len’ undeclared 
(first use in this function)
  rdbmsDbTable_data_access.c:321: error: ‘fooBarThingName’ undeclared (first 
use in this function)

which is not surprising, since "fooBarThingName_len" and
"fooBarThingName" are members of the struct , not local or global
variables that can be referred to like this.  This can't compile.

I've tried various permutations of mib2c mfd selections, and this
problem remains.

Is this a bug/oversight in the mib2c mfd conf, or what?

Is anyone actually using mib2c mfd for 5.3?


-- 
Mark Atwood                 When you do things right, people won't be sure
[EMAIL PROTECTED]         you've done anything at all.
http://mark.atwood.name/   http://fallenpegasus.livejournal.com/

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Net-snmp-coders mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to