From 6aaaf6a460725c9fb22f0f2cb782b70a9d9dfcc2 Mon Sep 17 00:00:00 2001 From: Shawn Routhier Date: Mon, 13 Sep 2010 22:06:37 +0000 Subject: Fixes to lease input and output. [ISC-Bugs #20418] - Some systems don't support the "%s" argument to strftime, paste together the same string using mktime instead. [ISC-Bugs #19596] - When parsing iaid values accept printable characters. [ISC-Bugs #21585] - Always print time values in omshell as hex instead of ascii if the values happen to be printable characters. --- dhcpctl/omshell.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'dhcpctl/omshell.c') diff --git a/dhcpctl/omshell.c b/dhcpctl/omshell.c index af997ac7..c3e7ef63 100644 --- a/dhcpctl/omshell.c +++ b/dhcpctl/omshell.c @@ -3,7 +3,8 @@ Examine and modify omapi objects. */ /* - * Copyright (c) 2004-2007,2009 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2009-2010 by Internet Systems Consortium, Inc. ("ISC") + * Copyright (c) 2004-2007 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 2001-2003 by Internet Software Consortium * * Permission to use, copy, modify, and distribute this software for any @@ -98,6 +99,7 @@ main(int argc, char **argv) { char buf[1024]; char s1[1024]; int connected = 0; + char hex_buf[61]; for (i = 1; i < argc; i++) { usage(argv[0]); @@ -159,10 +161,10 @@ main(int argc, char **argv) { break; case omapi_datatype_data: - printf ("%s\n", - print_hex_1 (v -> value -> u.buffer.len, - v -> value -> u.buffer.value, - 60)); + print_hex_only(v->value->u.buffer.len, + v->value->u.buffer.value, + sizeof(hex_buf), hex_buf); + printf("%s\n", hex_buf); break; case omapi_datatype_object: -- cgit v1.2.1