fix sigar_who_net_sessions
This commit is contained in:
parent
4359ca4fce
commit
c99f594008
|
@ -875,7 +875,7 @@ static int sigar_who_net_sessions(sigar_t *sigar,
|
||||||
SIGAR_WHO_LIST_GROW(wholist);
|
SIGAR_WHO_LIST_GROW(wholist);
|
||||||
who = &wholist->data[wholist->number++];
|
who = &wholist->data[wholist->number++];
|
||||||
|
|
||||||
who->time = (time() - ptr->sesi10_time);
|
who->time = (time(NULL) - ptr->sesi10_time);
|
||||||
SIGAR_W2A((LPCWSTR)ptr->sesi10_username,
|
SIGAR_W2A((LPCWSTR)ptr->sesi10_username,
|
||||||
who->user, sizeof(who->user));
|
who->user, sizeof(who->user));
|
||||||
SIGAR_W2A((LPCWSTR)ptr->sesi10_cname,
|
SIGAR_W2A((LPCWSTR)ptr->sesi10_cname,
|
||||||
|
@ -892,6 +892,7 @@ static int sigar_who_net_sessions(sigar_t *sigar,
|
||||||
|
|
||||||
if (buffer) {
|
if (buffer) {
|
||||||
NetApiBufferFree(buffer);
|
NetApiBufferFree(buffer);
|
||||||
|
buffer = NULL;
|
||||||
}
|
}
|
||||||
} while (status == ERROR_MORE_DATA);
|
} while (status == ERROR_MORE_DATA);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue