From 2f6f9fc086ae556b39df89a3fbd279940f0be4b0 Mon Sep 17 00:00:00 2001 From: Justin Pettit Date: Tue, 29 Apr 2008 15:55:45 -0700 Subject: [PATCH] Fix problem displaying duration when printing flow stats. --- lib/ofp-print.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } -- 2.30.2