ofp-print: Pretty-print payloads in all error messages, except "hello"s.
authorBen Pfaff <blp@nicira.com>
Fri, 30 Sep 2011 18:01:49 +0000 (11:01 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 27 Oct 2011 17:50:18 +0000 (10:50 -0700)
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 <reid@nicira.com>
lib/ofp-print.c

index 7bdbc22..a6e41eb 100644 (file)
@@ -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;
     }
 }