Re: creating a new row using old api handlers

Dave Shield <[email protected]>
Newsgroups gmane.network.net-snmp.user
Message-ID <CAKoMtGb+P0TZmwmwJHq8q_0NNPnumWcyWDm2ut29G5aw6wsqsA@mail.gmail.com>
On 7 January 2013 19:58, pal snmp <[email protected]> wrote:
> The agent seems to call GET for each column with the same instance ID even
> when the first call failed to return an instance.

Quite likely - each varbind is processed separately.
The old API doesn't attempt to try and merge related rows together.
(Remember that a SET request can quite legitimately include
 varbinds that refer to different rows of the same table)


> For example, the SET request was sent for adding 4th row to the table, which
> doesn't exist. So the agent called GET for exampleTableEntryRS.4 ,
> exampleName.4, and exampleId.4

Indeed - this is necessary in order to supply the appropriate 'write_method'
hook for each of these column objects.   Once the RowStatus code has
taken care of constructing the new row  (assuming a createAndXxx value),
then you're going to need to call the routines for the other two column
objects, in order to assign the new values.
   That requires the two 'write_method' hooks to be set up, which is
done as part of the (implicit) GET request.


> I expected the agent to stop issuing GET requests for other columns as soon
> as it knows that the instance didn't exist

See above

Dave

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. SALE $99.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122412
_______________________________________________
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.