From 37705f55845c639292ddc2ecd674c9cdc7add361 Mon Sep 17 00:00:00 2001 From: Dmitry Kozlov Date: Wed, 30 Apr 2014 13:25:53 +0400 Subject: net-snmp: fiexed improper handling of empty username when requesting session table Signed-off-by: Dmitry Kozlov --- accel-pppd/extra/net-snmp/sessionTable_data_access.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'accel-pppd/extra/net-snmp/sessionTable_data_access.c') 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; -- cgit v1.2.3