diff options
author | Shawn Routhier <sar@isc.org> | 2010-09-13 22:06:37 +0000 |
---|---|---|
committer | Shawn Routhier <sar@isc.org> | 2010-09-13 22:06:37 +0000 |
commit | 6aaaf6a460725c9fb22f0f2cb782b70a9d9dfcc2 (patch) | |
tree | 28bbbb49198842add33bc86f21cec99b3372b198 /dhcpctl/omshell.c | |
parent | 83d409ae5974c45941eb538314131e243a6d4fcc (diff) | |
download | isc-dhcp-6aaaf6a460725c9fb22f0f2cb782b70a9d9dfcc2.tar.gz |
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.
Diffstat (limited to 'dhcpctl/omshell.c')
-rw-r--r-- | dhcpctl/omshell.c | 12 |
1 files changed, 7 insertions, 5 deletions
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: |