"Josh Tolley" <[EMAIL PROTECTED]> writes:
> 
> When I run this, I always get the "not enough space for value" error,
> because, if I read this correctly, nothing has ever initialized the
> rowreq_ctx->data.myEntryName_len value. Does that initialization
> happen somewhere in the template code, and I just missed it? Do I have
> to do it manually somewhere, and if so, where? Am I just reading it
> completely wrong? Many thanks for any light you can shed on this for
> me.

I hit that one myself a little while ago.  As near as I can tell,
it's not ever initialized.

So what I do is right after the 
        /*
         * TODO:352:r: |   |-> populate applTable data context.
         * Populate data context here. (optionally, delay until row prep)
         */

I put in lines that look like this

        rowreq_ctx->data.fooRed_len = sizeof(rowreq_ctx->data.fooRed)
                                    / sizeof(rowreq_ctx->data.fooRed[0]);
        rowreq_ctx->data.fooGrn_len = sizeof(rowreq_ctx->data.fooGrn)
                                    / sizeof(rowreq_ctx->data.fooGrn[0]);
        rowreq_ctx->data.fooBlu_len = sizeof(rowreq_ctx->data.fooBlu)
                                    / sizeof(rowreq_ctx->data.fooBlu[0]);

You could also do the same thing for each variable right after it's
respective 
        /*
         * make sure there is enough space for applDirectoryName data
         */
Which is probably the more correct place to do it.

This is something that really should be done by the MFD template, and
I'm considering figuring out the mib2c language and submitting a
patch.

-- 
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-users mailing list
[email protected]
Please see the following page to unsubscribe or change other options:
https://lists.sourceforge.net/lists/listinfo/net-snmp-users

Reply via email to