vty: Fix optional display of pdp with mm-context
The vty is randomly including the pdp context when the vty command 'show mm-context all' is issued without the pdp parameter. I do not know why, but I assume that relying on a true/false test of argv[0] has unpredictable results. Change-Id: Idcde4dd30a39625b24a1c3a38901349875e0949a
This commit is contained in:
parent
e5c8998f9c
commit
c12c1a6b0c
|
@ -654,7 +654,7 @@ DEFUN(swow_mmctx_imsi, show_mmctx_imsi_cmd,
|
||||||
argv[0], VTY_NEWLINE);
|
argv[0], VTY_NEWLINE);
|
||||||
return CMD_WARNING;
|
return CMD_WARNING;
|
||||||
}
|
}
|
||||||
vty_dump_mmctx(vty, "", mm, argv[1] ? 1 : 0);
|
vty_dump_mmctx(vty, "", mm, (argc > 1) ? 1 : 0);
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -663,9 +663,8 @@ DEFUN(swow_mmctx_all, show_mmctx_all_cmd,
|
||||||
SHOW_STR MMCTX_STR "All MM Contexts\n" INCLUDE_PDP_STR)
|
SHOW_STR MMCTX_STR "All MM Contexts\n" INCLUDE_PDP_STR)
|
||||||
{
|
{
|
||||||
struct sgsn_mm_ctx *mm;
|
struct sgsn_mm_ctx *mm;
|
||||||
|
|
||||||
llist_for_each_entry(mm, &sgsn_mm_ctxts, list)
|
llist_for_each_entry(mm, &sgsn_mm_ctxts, list)
|
||||||
vty_dump_mmctx(vty, "", mm, argv[0] ? 1 : 0);
|
vty_dump_mmctx(vty, "", mm, (argc > 0) ? 1 : 0);
|
||||||
|
|
||||||
return CMD_SUCCESS;
|
return CMD_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue