Re: run fault when using read_config_store_data( ASN_OCTET_STR .... )

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <[email protected]>
On Thu, 2005-11-03 at 09:52 +0000, Paul Davies wrote:
> When I use read_config_store_data( ASN_OCTET_STR, ........ ) to store
> a table column entry to a persistent conf file I get a "run fault". 


> unsigned char myString[255];
> long myStringLen;
>
> cptr = read_config_store_data (ASN_OCTET_STR, cptr, &myString, (size_t*)(&myStringLen) );

> anyone seen anything similar or know what is going wrong?

That certainly *looks* as if it should work.
I seem to remember running into the same problem as part of
implementing the config storage for the DisMan re-writes.

The workaround I came up with was to introduce an extra pointer
variable, initialised to the relevant string, and use that in
the read_config_store_data call:

  unsigned char myString[255], *cp;
  long myStringLen;

  cp = myString;
  cptr = read_config_store_data (ASN_OCTET_STR, cptr, &cp, (size_t*)(&myStringLen) );


Try that.

Dave


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.