Re: Should row_prep() return error code when "some" row data can

This is a discussion on Re: Should row_prep() return error code when "some" row data can within the SNMP Coders forums, part of the Networking and Network Related category; On Fri, 22 Jun 2007 09:56:34 -0700 (PDT) Need wrote: NH> Lets say I have four fields(...


Go Back   Usenet Forums > Networking and Network Related > SNMP Coders

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-25-2007
Robert Story
 
Posts: n/a
Default Re: Should row_prep() return error code when "some" row data can

On Fri, 22 Jun 2007 09:56:34 -0700 (PDT) Need wrote:
NH> Lets say I have four fields(columns) in a row. When the row_prep() routine is called I plan on calling four individual API routines (one for each field) to get the data to populate into the row. If the first two API calls return valid data, but the third API call has trouble getting the data, then what would you recommend would be a "normal" SNMP response to the overall request?

Well that depends. If you can somehow flag which fields have valid values
(perhaps by adding another flag field and using the column flags), you could
simply proceed and wait to see if the actual data is needed.

NH> a) set the third field to some init value, try to get the data for the fourth data field and then return MFD_SUCCESS from row_prep()

In generaly, you probably shouldn't lie to the client.

NH> b) set the third field to some init value, do NOT try to get the data for the fourth data field and then return some MFD ERROR response code value from row_prep()?
NH>
NH> c) make sure the complete row (all fields) are cleared of data (so the row does not have good and bad data populated at once) and return some MFD ERROR response code value from row_prep()?

These are pretty much equivalent.. once you return an error, the data
won't/shouldn't get back to the client...

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Net-snmp-coders mailing list
Net-snmp-coders@lists.sourceforge.net
https://lists.sourceforge.net/lists/...et-snmp-coders
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 03:38 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0