fix for sesman not checking username when returning disconnected session list

This commit is contained in:
ilsimo 2007-11-12 12:40:41 +00:00
parent 311b688ad7
commit a3202aea6a

View File

@ -644,6 +644,9 @@ session_get_byuser(char* user, int* cnt)
tmp = g_sessions;
index = 0;
while (tmp != 0)
{
#warning FIXME: we should get only disconnected sessions!
if (!g_strncasecmp(user, tmp->item->name, 256))
{
(sess[index]).SID=tmp->item->pid;
(sess[index]).type=tmp->item->type;
@ -654,10 +657,11 @@ session_get_byuser(char* user, int* cnt)
(sess[index]).idle_days=0;
(sess[index]).idle_hours=0;
(sess[index]).idle_minutes=0;
index++;
}
/* go on */
tmp=tmp->next;
index++;
}
/*THREAD-FIX release chain lock */