Sponsored Content
Contact Us Post Here to Contact Site Administrators and Moderators How to post technical questions? Post 302427240 by Neo on Friday 4th of June 2010 09:56:45 AM
Old 06-04-2010
That was useful. I thought these bullets points in at FAQ were good:

Before You Ask

Before asking a technical question by e-mail, or in a newsgroup, or on a website chat board, do the following:

Try to find an answer by searching the archives of the forum you plan to post to.
  1. Try to find an answer by searching the Web.
  2. Try to find an answer by reading the manual.
  3. Try to find an answer by reading a FAQ.
  4. Try to find an answer by inspection or experimentation.
  5. Try to find an answer by asking a skilled friend.
  6. If you're a programmer, try to find an answer by reading the source code.

.... of course, our forums are "a skilled friend" to all who post here, so that bullet item is a bit overkill.

The most important for our forums, which I complete forgot earlier, is:

Try to find an answer by searching the Forums first.
This User Gave Thanks to Neo For This Post:
 

We Also Found This Discussion For You

1. Shell Programming and Scripting

Technical questions on bash,mysql and pHp

1. bash -bash escape rules, esp. ',", -how to use Ctrl+R reverse cmd search with regex? 2. mysql -how to use grep in mysql 3. php -why !0 is not evaluated to true? what's its value -php getopt: what if there is duplicate in cmdline args (2 Replies)
Discussion started by: John_Peter
2 Replies
UPSCLI_LIST_NEXT(3)						    NUT Manual						       UPSCLI_LIST_NEXT(3)

NAME
upscli_list_next - retrieve list items from a UPS SYNOPSIS
#include <upsclient.h> int upscli_list_next(UPSCONN_t *ups, int numq, const char **query, int *numa, char ***answer) DESCRIPTION
The upscli_list_next() function takes the pointer ups to a UPSCONN_t state structure, and the pointer query to an array of numq query elements. It performs a read from the network and expects to find either another list item or the end of a list. You must call upscli_list_start(3) before calling this function. This function will return 1 and set values in numa and answer if a list item is received. If the list is done, it will return 0, and the values in numa and answer are undefined. Calling this function after it returns something other than 1 is undefined. QUERY FORMATTING
You may not change the values of numq or query between the call to upscli_list_start(3) and the first call to this function. You also may not change the values between calls to this function. ANSWER FORMATTING
The contents of numa and answer work just like a call to upscli_get(3). The values returned by upsd(8) are identical to a single item request, so this is not surprising. ERROR CHECKING
This function checks the response from upsd(8) against your query. If the response is not part of the list you have requested, it will return an error code. When this happens, upscli_upserror(3) will return UPSCLI_ERR_PROTOCOL. RETURN VALUE
The upscli_list_next() function returns 1 when list data is present, 0 if the list is finished, or -1 if an error occurs. It is possible to have an empty list. The function will return 0 for its first call in that case. SEE ALSO
upscli_list_start(3), upscli_strerror(3), upscli_upserror(3) Network UPS Tools 05/22/2012 UPSCLI_LIST_NEXT(3)
All times are GMT -4. The time now is 03:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy