sesman: no logic change, code cleanup
This commit is contained in:
parent
58f5dcc030
commit
1d35ba19a6
@ -55,8 +55,8 @@ scp_v0_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
scp_v0s_replyauthentication(c,3);
|
scp_v0s_replyauthentication(c,3);
|
||||||
log_message( LOG_LEVEL_INFO,"Username okey but group problem for user: %s",
|
log_message(LOG_LEVEL_INFO, "Username okey but group problem for "
|
||||||
s->username);
|
"user: %s", s->username);
|
||||||
/* g_writeln("user password ok, but group problem"); */
|
/* g_writeln("user password ok, but group problem"); */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -71,19 +71,22 @@ scp_v0_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
|
|||||||
}
|
}
|
||||||
else if (data)
|
else if (data)
|
||||||
{
|
{
|
||||||
s_item = session_get_bydata(s->username, s->width, s->height, s->bpp, s->type);
|
s_item = session_get_bydata(s->username, s->width, s->height,
|
||||||
|
s->bpp, s->type);
|
||||||
if (s_item != 0)
|
if (s_item != 0)
|
||||||
{
|
{
|
||||||
display = s_item->display;
|
display = s_item->display;
|
||||||
if (0 != s->client_ip)
|
if (0 != s->client_ip)
|
||||||
{
|
{
|
||||||
log_message( LOG_LEVEL_INFO, "++ reconnected session: username %s, display :%d.0, "
|
log_message( LOG_LEVEL_INFO, "++ reconnected session: username %s, "
|
||||||
"session_pid %d, ip %s", s->username, display, s_item->pid, s->client_ip);
|
"display :%d.0, session_pid %d, ip %s",
|
||||||
|
s->username, display, s_item->pid, s->client_ip);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_message(LOG_LEVEL_INFO, "++ reconnected session: username %s, display :%d.0, "
|
log_message(LOG_LEVEL_INFO, "++ reconnected session: username %s, "
|
||||||
"session_pid %d", s->username, display, s_item->pid);
|
"display :%d.0, session_pid %d", s->username, display,
|
||||||
|
s_item->pid);
|
||||||
}
|
}
|
||||||
auth_end(data);
|
auth_end(data);
|
||||||
/* don't set data to null here */
|
/* don't set data to null here */
|
||||||
@ -109,14 +112,16 @@ scp_v0_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
|
|||||||
log_message( LOG_LEVEL_INFO, "starting Xvnc session...");
|
log_message( LOG_LEVEL_INFO, "starting Xvnc session...");
|
||||||
display = session_start(s->width, s->height, s->bpp, s->username,
|
display = session_start(s->width, s->height, s->bpp, s->username,
|
||||||
s->password, data, SESMAN_SESSION_TYPE_XVNC,
|
s->password, data, SESMAN_SESSION_TYPE_XVNC,
|
||||||
s->domain, s->program, s->directory, s->client_ip);
|
s->domain, s->program, s->directory,
|
||||||
|
s->client_ip);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
log_message(LOG_LEVEL_INFO, "starting X11rdp session...");
|
log_message(LOG_LEVEL_INFO, "starting X11rdp session...");
|
||||||
display = session_start(s->width, s->height, s->bpp, s->username,
|
display = session_start(s->width, s->height, s->bpp, s->username,
|
||||||
s->password, data, SESMAN_SESSION_TYPE_XRDP,
|
s->password, data, SESMAN_SESSION_TYPE_XRDP,
|
||||||
s->domain, s->program, s->directory, s->client_ip);
|
s->domain, s->program, s->directory,
|
||||||
|
s->client_ip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -139,4 +144,3 @@ scp_v0_process(struct SCP_CONNECTION* c, struct SCP_SESSION* s)
|
|||||||
scp_v0s_deny_connection(c);
|
scp_v0s_deny_connection(c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -156,4 +156,3 @@ struct SCP_DISCONNECTED_SESSION*
|
|||||||
session_get_byuser(char* user, int* cnt, unsigned char flags);
|
session_get_byuser(char* user, int* cnt, unsigned char flags);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user