projects
/
citadel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://git.citadel.org/appl/gitroot/citadel
[citadel.git]
/
citadel
/
context.c
diff --git
a/citadel/context.c
b/citadel/context.c
index 81b597850b1dbfbe00396ea6119ba1014ed80e3e..576e9359c7da3cc9efeea5b6f6644d8e740f174f 100644
(file)
--- a/
citadel/context.c
+++ b/
citadel/context.c
@@
-2,7
+2,7
@@
* Citadel context management stuff.
* Here's where we (hopefully) have all the code that manipulates contexts.
*
* Citadel context management stuff.
* Here's where we (hopefully) have all the code that manipulates contexts.
*
- * Copyright (c) 1987-201
1
by the citadel.org team
+ * Copyright (c) 1987-201
5
by the citadel.org team
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3.
*
* This program is open source software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License, version 3.
@@
-22,6
+22,7
@@
#include "locate_host.h"
#include "context.h"
#include "control.h"
#include "locate_host.h"
#include "context.h"
#include "control.h"
+#include "config.h"
int DebugSession = 0;
int DebugSession = 0;
@@
-244,8
+245,8
@@
void terminate_idle_sessions(void)
for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) {
if (
(ccptr != CC)
for (ccptr = ContextList; ccptr != NULL; ccptr = ccptr->next) {
if (
(ccptr != CC)
- && (
config.c_sleeping
> 0)
- && (now - (ccptr->lastcmd) >
config.c_sleeping
)
+ && (
CtdlGetConfigLong("c_sleeping")
> 0)
+ && (now - (ccptr->lastcmd) >
CtdlGetConfigLong("c_sleeping")
)
) {
if (!ccptr->dont_term) {
ccptr->kill_me = KILLME_IDLE;
) {
if (!ccptr->dont_term) {
ccptr->kill_me = KILLME_IDLE;
@@
-514,7
+515,7
@@
void begin_session(CitContext *con)
*con->fake_hostname = '\0';
*con->fake_roomname = '\0';
*con->cs_clientinfo = '\0';
*con->fake_hostname = '\0';
*con->fake_roomname = '\0';
*con->cs_clientinfo = '\0';
- safestrncpy(con->cs_host,
config.c_fqdn
, sizeof con->cs_host);
+ safestrncpy(con->cs_host,
CtdlGetConfigStr("c_fqdn")
, sizeof con->cs_host);
safestrncpy(con->cs_addr, "", sizeof con->cs_addr);
con->cs_UDSclientUID = -1;
con->cs_host[sizeof con->cs_host - 1] = 0;
safestrncpy(con->cs_addr, "", sizeof con->cs_addr);
con->cs_UDSclientUID = -1;
con->cs_host[sizeof con->cs_host - 1] = 0;
@@
-566,7
+567,7
@@
void begin_session(CitContext *con)
con->dl_is_net = 0;
con->nologin = 0;
con->dl_is_net = 0;
con->nologin = 0;
- if (((
config.c_maxsessions > 0)&&(num_sessions > config.c_maxsessions
)) || CtdlWantSingleUser()) {
+ if (((
CtdlGetConfigInt("c_maxsessions") > 0)&&(num_sessions > CtdlGetConfigInt("c_maxsessions")
)) || CtdlWantSingleUser()) {
con->nologin = 1;
}
con->nologin = 1;
}