From 273b7adb85a03a00c3b173831af21c60e5d77eb0 Mon Sep 17 00:00:00 2001 From: harti Date: Mon, 28 Feb 2005 17:27:11 +0000 Subject: Virgin import of bsnmpd 1.8 --- contrib/bsnmp/gensnmptree/gensnmptree.1 | 4 ++-- contrib/bsnmp/gensnmptree/gensnmptree.c | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) (limited to 'contrib/bsnmp/gensnmptree') diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.1 b/contrib/bsnmp/gensnmptree/gensnmptree.1 index c26f24b..1aed9bf 100644 --- a/contrib/bsnmp/gensnmptree/gensnmptree.1 +++ b/contrib/bsnmp/gensnmptree/gensnmptree.1 @@ -26,10 +26,10 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.3 2004/08/06 08:46:46 brandt Exp $ +.\" $Begemot: bsnmp/gensnmptree/gensnmptree.1,v 1.4 2005/02/25 11:55:56 brandt_h Exp $ .\" .Dd October 7, 2003 -.Dt gensnmptree 1 +.Dt GENSNMPTREE 1 .Os .Sh NAME .Nm gensnmptree diff --git a/contrib/bsnmp/gensnmptree/gensnmptree.c b/contrib/bsnmp/gensnmptree/gensnmptree.c index d3b9909..3b2e2c0 100644 --- a/contrib/bsnmp/gensnmptree/gensnmptree.c +++ b/contrib/bsnmp/gensnmptree/gensnmptree.c @@ -30,7 +30,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.38 2004/08/06 08:46:46 brandt Exp $ + * $Begemot: bsnmp/gensnmptree/gensnmptree.c,v 1.41 2005/02/25 11:51:12 brandt_h Exp $ * * Generate OID table from table description. * @@ -50,7 +50,7 @@ * * elements := EMPTY | elements element * - * element := tree | leaf + * element := tree | leaf | column * * index := TYPE | index TYPE * @@ -560,9 +560,12 @@ gen_header(struct node *np, u_int oidlen, const char *func) if((np->flags & (FL_GET|FL_SET)) == 0) return; - if (np->type == NODE_COLUMN) + if (np->type == NODE_COLUMN) { + if (func == NULL) + errx(1, "column without function (%s) - probably " + "outside of a table", np->name); sprintf(f, "%s", func); - else + } else sprintf(f, "%s", np->u.leaf.func); LIST_FOREACH(ptr, &funcs, link) -- cgit v1.1