From: Ben Pfaff Date: Fri, 30 Sep 2011 18:01:49 +0000 (-0700) Subject: ofp-print: Pretty-print payloads in all error messages, except "hello"s. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdc5d61fb7b28829d25dd5f6f5dbddce6253f71a;p=openvswitch ofp-print: Pretty-print payloads in all error messages, except "hello"s. This function was only pretty-printing "bad request" error payloads. I don't know why. It makes sense to pretty-print all of them except for "hello" messages, which already have their own special cases. Suggestion #7369. Suggested-by: Reid Price --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index 7bdbc220..a6e41eb7 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -935,15 +935,11 @@ ofp_print_error_msg(struct ds *string, const struct ofp_error_msg *oem) ds_put_printable(string, payload, payload_len); break; - case OFPET_BAD_REQUEST: + default: s = ofp_to_string(payload, payload_len, 1); ds_put_cstr(string, s); free(s); break; - - default: - ds_put_hex_dump(string, payload, payload_len, 0, true); - break; } }