Skip to content

Commit

Permalink
Fixed issue where the '--sort-panel' option wouldn't sort certain pan…
Browse files Browse the repository at this point in the history
…els.
  • Loading branch information
allinurl committed Jul 28, 2015
1 parent 5280053 commit 1218d1b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/sort.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ parse_initial_sort (void)
char module[SORT_MODULE_LEN], field[SORT_FIELD_LEN], order[SORT_ORDER_LEN];
for (i = 0; i < conf.sort_panel_idx; ++i) {
view = conf.sort_panels[i];
if (sscanf (view, "%8[^','],%7[^','],%4s", module, field, order) != 3)
if (sscanf (view, "%15[^','],%11[^','],%4s", module, field, order) != 3)
continue;
set_initial_sort (module, field, order);
}
Expand Down
10 changes: 6 additions & 4 deletions src/sort.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,12 @@
#include "commons.h"
#include "parser.h"

#define SORT_MAX_OPTS 10
#define SORT_MODULE_LEN 9
#define SORT_FIELD_LEN 8
#define SORT_ORDER_LEN 5
#define SORT_MAX_OPTS 10

/* See GEnum for mapping */
#define SORT_FIELD_LEN 11 + 1 /* longest metric name */
#define SORT_MODULE_LEN 15 + 1 /* longest module name */
#define SORT_ORDER_LEN 4 + 1

typedef enum GSortField_
{
Expand Down

0 comments on commit 1218d1b

Please sign in to comment.