From: Justin Pettit Date: Tue, 29 Apr 2008 22:55:45 +0000 (-0700) Subject: Fix problem displaying duration when printing flow stats. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f6f9fc086ae556b39df89a3fbd279940f0be4b0;p=openvswitch Fix problem displaying duration when printing flow stats. --- diff --git a/lib/ofp-print.c b/lib/ofp-print.c index e846f7e9..7fa4cec0 100644 --- a/lib/ofp-print.c +++ b/lib/ofp-print.c @@ -468,11 +468,12 @@ ofp_flow_stats_reply(struct ds *string, const void *oh, size_t len, } for (fs = &fsr->flows[0]; fs < &fsr->flows[n]; fs++) { - ds_put_format(string, " duration=%"PRIu32" s, ", ntohs(fs->duration)); + ds_put_format(string, " duration=%"PRIu32" s, ", ntohl(fs->duration)); ds_put_format(string, "table_id=%"PRIu8", ", fs->table_id); - ds_put_format(string, "priority=%"PRIu16", ", fs->match.wildcards ? ntohs(fs->priority) : (uint16_t)-1); + ds_put_format(string, "priority=%"PRIu16", ", + fs->match.wildcards ? ntohs(fs->priority) : (uint16_t)-1); ds_put_format(string, "n_packets=%"PRIu64", ", - ntohll(fs->packet_count)); + ntohll(fs->packet_count)); ds_put_format(string, "n_bytes=%"PRIu64", ", ntohll(fs->byte_count)); ofp_print_match(string, &fs->match); }