libsesman: Make x11_display_offset and max_sessions unsigned
This commit is contained in:
parent
06580ec448
commit
82ede29388
@ -428,7 +428,11 @@ config_read_sessions(int file, struct config_sessions *se, struct list *param_n,
|
||||
|
||||
if (0 == g_strcasecmp(buf, SESMAN_CFG_SESS_X11DISPLAYOFFSET))
|
||||
{
|
||||
se->x11_display_offset = g_atoi(value);
|
||||
int x11off = g_atoi(value);
|
||||
if (x11off >= 0)
|
||||
{
|
||||
se->x11_display_offset = x11off;
|
||||
}
|
||||
}
|
||||
|
||||
else if (0 == g_strcasecmp(buf, SESMAN_CFG_SESS_MAX_DISPLAY))
|
||||
@ -442,7 +446,11 @@ config_read_sessions(int file, struct config_sessions *se, struct list *param_n,
|
||||
|
||||
else if (0 == g_strcasecmp(buf, SESMAN_CFG_SESS_MAX))
|
||||
{
|
||||
se->max_sessions = g_atoi(value);
|
||||
int sm = g_atoi(value);
|
||||
if (sm >= 0)
|
||||
{
|
||||
se->max_sessions = sm;
|
||||
}
|
||||
}
|
||||
|
||||
else if (0 == g_strcasecmp(buf, SESMAN_CFG_SESS_KILL_DISC))
|
||||
|
@ -117,7 +117,7 @@ struct config_sessions
|
||||
* @var x11_display_offset
|
||||
* @brief X11 TCP port offset. default value: 10
|
||||
*/
|
||||
int x11_display_offset;
|
||||
unsigned int x11_display_offset;
|
||||
/**
|
||||
* @var max_display_number
|
||||
* @brief Highest X11 display number considered for allocation
|
||||
@ -127,7 +127,7 @@ struct config_sessions
|
||||
* @var max_sessions
|
||||
* @brief maximum number of allowed sessions. 0 for unlimited
|
||||
*/
|
||||
int max_sessions;
|
||||
unsigned int max_sessions;
|
||||
/**
|
||||
* @var max_idle_time
|
||||
* @brief maximum idle time for each session
|
||||
|
Loading…
Reference in New Issue
Block a user