Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Synchronet
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Main
Synchronet
Commits
35a070f0
Commit
35a070f0
authored
20 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Add code to load scan pointers... inital test indicate it's not working
though (ie: scan_cfg is still garbage)
parent
1e8218ad
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/websrvr.c
+12
-1
12 additions, 1 deletion
src/sbbs3/websrvr.c
with
12 additions
and
1 deletion
src/sbbs3/websrvr.c
+
12
−
1
View file @
35a070f0
...
...
@@ -204,6 +204,7 @@ typedef struct {
time_t
logon_time
;
char
username
[
LEN_NAME
+
1
];
int
last_js_user_num
;
subscan_t
*
subscan
;
/* JavaScript parameters */
JSRuntime
*
js_runtime
;
...
...
@@ -1018,6 +1019,10 @@ void http_logon(http_session_t * session, user_t *usr)
putuserrec
(
&
scfg
,
session
->
user
.
number
,
U_MODEM
,
LEN_MODEM
,
"HTTP"
);
putuserrec
(
&
scfg
,
session
->
user
.
number
,
U_COMP
,
LEN_COMP
,
session
->
host_name
);
putuserrec
(
&
scfg
,
session
->
user
.
number
,
U_NOTE
,
LEN_NOTE
,
session
->
host_ip
);
FREE_AND_NULL
(
session
->
subscan
);
session
->
subscan
=
(
subscan_t
*
)
malloc
(
sizeof
(
subscan_t
)
*
scfg
.
total_subs
);
if
(
session
->
subscan
!=
NULL
)
getmsgptrs
(
&
scfg
,
session
->
user
.
number
,
session
->
subscan
);
}
session
->
client
.
user
=
session
->
username
;
client_on
(
session
->
socket
,
&
session
->
client
,
/* update existing client record? */
TRUE
);
...
...
@@ -1035,6 +1040,9 @@ void http_logoff(http_session_t * session)
SAFECOPY
(
session
->
username
,
unknown
);
logoutuserdat
(
&
scfg
,
&
session
->
user
,
time
(
NULL
),
session
->
logon_time
);
if
(
session
->
subscan
!=
NULL
)
putmsgptrs
(
&
scfg
,
session
->
user
.
number
,
session
->
subscan
);
FREE_AND_NULL
(
session
->
subscan
);
memset
(
&
session
->
user
,
0
,
sizeof
(
session
->
user
));
session
->
last_user_num
=
session
->
user
.
number
;
}
...
...
@@ -1047,7 +1055,7 @@ BOOL http_checkuser(http_session_t * session)
lprintf
(
LOG_INFO
,
"%04d JavaScript: Initializing User Objects"
,
session
->
socket
);
if
(
session
->
user
.
number
>
0
)
{
if
(
!
js_CreateUserObjects
(
session
->
js_cx
,
session
->
js_glob
,
&
scfg
,
&
session
->
user
,
NULL
/* ftp index file */
,
NULL
/* subscan */
))
{
,
NULL
/* ftp index file */
,
session
->
subscan
/* subscan */
))
{
lprintf
(
LOG_ERR
,
"%04d !JavaScript ERROR creating user objects"
,
session
->
socket
);
send_error
(
session
,
"500 Error initializing JavaScript User Objects"
);
return
(
FALSE
);
...
...
@@ -2744,6 +2752,7 @@ void http_session_thread(void* arg)
session
.
last_user_num
=-
1
;
session
.
last_js_user_num
=-
1
;
session
.
logon_time
=
0
;
session
.
subscan
=
NULL
;
while
(
!
session
.
finished
&&
server_socket
!=
INVALID_SOCKET
)
{
memset
(
&
(
session
.
req
),
0
,
sizeof
(
session
.
req
));
...
...
@@ -2799,6 +2808,8 @@ void http_session_thread(void* arg)
session
.
js_runtime
=
NULL
;
}
FREE_AND_NULL
(
session
.
subscan
);
#ifdef _WIN32
if
(
startup
->
hangup_sound
[
0
]
&&
!
(
startup
->
options
&
BBS_OPT_MUTE
))
PlaySound
(
startup
->
hangup_sound
,
NULL
,
SND_ASYNC
|
SND_FILENAME
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment