summaryrefslogtreecommitdiff
path: root/accel-pppd/extra/net-snmp/sessionTable_data_access.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-04-30 13:25:53 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-04-30 13:25:53 +0400
commit37705f55845c639292ddc2ecd674c9cdc7add361 (patch)
tree53546d06fb8a250b6d73110fb2f852b1004a296d /accel-pppd/extra/net-snmp/sessionTable_data_access.c
parente4bfe041eba9a46f5d3c048ab9143cfea2f64da9 (diff)
downloadaccel-ppp-37705f55845c639292ddc2ecd674c9cdc7add361.tar.gz
accel-ppp-37705f55845c639292ddc2ecd674c9cdc7add361.zip
net-snmp: fiexed improper handling of empty username when requesting session table
Signed-off-by: Dmitry Kozlov <xeb@mail.ru>
Diffstat (limited to 'accel-pppd/extra/net-snmp/sessionTable_data_access.c')
-rw-r--r--accel-pppd/extra/net-snmp/sessionTable_data_access.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/accel-pppd/extra/net-snmp/sessionTable_data_access.c b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
index a6046ae2..8ec4aa60 100644
--- a/accel-pppd/extra/net-snmp/sessionTable_data_access.c
+++ b/accel-pppd/extra/net-snmp/sessionTable_data_access.c
@@ -224,16 +224,16 @@ sessionTable_container_load(netsnmp_container *container)
strcpy(rowreq_ctx->data->ifname, ses->ifname);
if (ses->username)
- rowreq_ctx->data->username = strdup(ses->username);
+ rowreq_ctx->data->username = _strdup(ses->username);
else
- ses->username = strdup("");
+ rowreq_ctx->data->username = _strdup("");
rowreq_ctx->data->peer_addr = ses->ipv4 ? ses->ipv4->peer_addr : 0;
rowreq_ctx->data->type = ses->ctrl->type;
rowreq_ctx->data->state = ses->state;
rowreq_ctx->data->uptime = (ses->stop_time ? ses->stop_time : t) - ses->start_time;
- rowreq_ctx->data->calling_sid = strdup(ses->ctrl->calling_station_id);
- rowreq_ctx->data->called_sid = strdup(ses->ctrl->called_station_id);
+ rowreq_ctx->data->calling_sid = _strdup(ses->ctrl->calling_station_id);
+ rowreq_ctx->data->called_sid = _strdup(ses->ctrl->called_station_id);
CONTAINER_INSERT(container, rowreq_ctx);
++count;