Fix missing displays on sesman restart
This commit is contained in:
+1
-4
@@ -208,10 +208,7 @@ ercp_get_session_announce_event(struct trans *trans,
|
||||
|
||||
if (rv == 0)
|
||||
{
|
||||
if (display != NULL)
|
||||
{
|
||||
*display = i_display;
|
||||
}
|
||||
*display = i_display;
|
||||
*uid = (uid_t)i_uid;
|
||||
*type = (enum scp_session_type)i_type;
|
||||
*start_width = i_width;
|
||||
|
||||
@@ -188,7 +188,6 @@ ercp_send_session_announce_event(struct trans *trans,
|
||||
*
|
||||
* @param trans EICP transport
|
||||
* @param[out] display Display used by session.
|
||||
* Pointer can be NULL if this is already known.
|
||||
* @param[out] uid UID of user logged in to session
|
||||
* @param[out] type Session type
|
||||
* @param[out] start_width Starting width of seenio
|
||||
|
||||
+16
-1
@@ -42,9 +42,10 @@ process_session_announce_event(struct session_item *si)
|
||||
{
|
||||
int rv;
|
||||
const char *start_ip_addr;
|
||||
unsigned int display;
|
||||
|
||||
rv = ercp_get_session_announce_event(si->sesexec_trans,
|
||||
NULL,
|
||||
&display,
|
||||
&si->uid,
|
||||
&si->type,
|
||||
&si->start_width,
|
||||
@@ -53,10 +54,24 @@ process_session_announce_event(struct session_item *si)
|
||||
&si->guid,
|
||||
&start_ip_addr,
|
||||
&si->start_time);
|
||||
if (rv == 0)
|
||||
{
|
||||
// We may already know the display we sent sesexec. If we do,
|
||||
// check sesexec sent the same value back.
|
||||
if (si->display >= 0 && display != (unsigned int)si->display)
|
||||
{
|
||||
LOG(LOG_LEVEL_ERROR, "Bugcheck: sesman expected display %d, got %u",
|
||||
si->display, display);
|
||||
rv = 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (rv == 0)
|
||||
{
|
||||
snprintf(si->start_ip_addr, sizeof(si->start_ip_addr),
|
||||
"%s", start_ip_addr);
|
||||
si->display = display;
|
||||
|
||||
si->state = E_SESSION_RUNNING;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user