]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Restore printing of values in omshell to the style pre 21518. For
authorShawn Routhier <sar@isc.org>
Fri, 3 Dec 2010 20:32:14 +0000 (20:32 +0000)
committerShawn Routhier <sar@isc.org>
Fri, 3 Dec 2010 20:32:14 +0000 (20:32 +0000)
21518 we changed the print routines to always display time values
as a hex list.  This had a side effect of printing all data strings
as a hex list.  We shall investigate other ways of displaying time
values more usefully.  [ISC-Bugs #22626]

RELNOTES
dhcpctl/omshell.c
includes/dhcpd.h

index 0a92d7182537ebb3b15f1fd213969c2d5538e677..1fc0a43dbb4ea25e88031f47d8361cb73f5b203f 100644 (file)
--- a/RELNOTES
+++ b/RELNOTES
@@ -2349,6 +2349,11 @@ work on other platforms. Please report any problems and suggested fixes to
 
 - Fix some bugs and omissions in omshell.
 
+- Restore printing of values in omshell to the style pre 21518.  For
+  21518 we changed the print routines to always display time values
+  as a hex list.  This had a side effect of printing all data strings
+  as a hex list.  We shall investigate other ways of displaying time
+  values more usefully.  [ISC-Bugs #22626]
 
                Changes since 3.0 Release Candidate 5
 
index c3e7ef63dee354c5cd1904ee57ef0092e4133c31..4da7428e971191bd7b44e5943c15d6c73bfa9bfe 100644 (file)
@@ -161,9 +161,9 @@ main(int argc, char **argv) {
                            break;
                                
                          case omapi_datatype_data:
-                           print_hex_only(v->value->u.buffer.len,
-                                          v->value->u.buffer.value,
-                                          sizeof(hex_buf), hex_buf);
+                           print_hex_or_string(v->value->u.buffer.len,
+                                               v->value->u.buffer.value,
+                                               sizeof(hex_buf), hex_buf);
                            printf("%s\n", hex_buf);
                            break;
                            
index 3df59b0b90023f6fae78dca7da64f76e1018ab68..a096f1250afa64d1ac5398ab657b9417dc68ff31 100644 (file)
@@ -2304,6 +2304,7 @@ void dump_packet PROTO ((struct packet *));
 void hash_dump PROTO ((struct hash_table *));
 char *print_hex PROTO ((unsigned, const u_int8_t *, unsigned, unsigned));
 void print_hex_only PROTO ((unsigned, const u_int8_t *, unsigned, char *));
+void print_hex_or_string PROTO ((unsigned, const u_int8_t *, unsigned, char *));
 #define print_hex_1(len, data, limit) print_hex(len, data, limit, 0)
 #define print_hex_2(len, data, limit) print_hex(len, data, limit, 1)
 #define print_hex_3(len, data, limit) print_hex(len, data, limit, 2)