summaryrefslogtreecommitdiff
path: root/accel-pptpd/cli
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2010-12-02 00:10:42 +0300
committerDmitry Kozlov <xeb@mail.ru>2010-12-02 00:10:42 +0300
commitdce11f592d17084aa5ba0bd9e33d308291c02921 (patch)
tree426f07b7b0978c727c8c6ccccfd430ff5cd5d82e /accel-pptpd/cli
parent2712035632c53f7432d372b04a7c2a563614e537 (diff)
downloadaccel-ppp-xebd-dce11f592d17084aa5ba0bd9e33d308291c02921.tar.gz
accel-ppp-xebd-dce11f592d17084aa5ba0bd9e33d308291c02921.zip
cli: fixed bug of empty username when show sessions invoked with order/match
Diffstat (limited to 'accel-pptpd/cli')
-rw-r--r--accel-pptpd/cli/std_cmd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/accel-pptpd/cli/std_cmd.c b/accel-pptpd/cli/std_cmd.c
index 75ff900..0d23493 100644
--- a/accel-pptpd/cli/std_cmd.c
+++ b/accel-pptpd/cli/std_cmd.c
@@ -123,10 +123,10 @@ static int show_ses_exec(const char *cmd, char * const *fields, int fields_cnt,
}
if (order == ORDER_USERNAME)
- row->order_key = _strdup(ppp->username);
+ row->order_key = ppp->username ? _strdup(ppp->username) : _strdup("");
if (match == MATCH_USERNAME)
- row->match_key = _strdup(ppp->username);
+ row->match_key = ppp->username ? _strdup(ppp->username) : _strdup("");
u_inet_ntoa(ppp->peer_ipaddr, ip_str);