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
fd0a5c08
Commit
fd0a5c08
authored
9 years ago
by
deuce
Browse files
Options
Downloads
Patches
Plain Diff
Fix some more warnings... still a couple left.
parent
be545bfc
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/main.cpp
+21
-10
21 additions, 10 deletions
src/sbbs3/main.cpp
with
21 additions
and
10 deletions
src/sbbs3/main.cpp
+
21
−
10
View file @
fd0a5c08
...
...
@@ -2187,8 +2187,13 @@ void output_thread(void* arg)
sbbs
->
online
=
FALSE
;
i
=
buftop
-
bufbot
;
// Pretend we sent it all
}
else
cryptFlushData
(
sbbs
->
ssh_session
);
else
{
if
(
!
cryptStatusOK
((
err
=
cryptFlushData
(
sbbs
->
ssh_session
))))
{
lprintf
(
LOG_WARNING
,
"%s !ERROR %d flushing Cryptlib session"
,
node
,
err
);
sbbs
->
online
=
FALSE
;
i
=
buftop
-
bufbot
;
// Pretend we sent it all
}
}
pthread_mutex_unlock
(
&
sbbs
->
ssh_mutex
);
}
else
...
...
@@ -3461,7 +3466,7 @@ sbbs_t::~sbbs_t()
/* Reset text.dat */
for
(
i
=
0
;
i
<
TOTAL_TEXT
&&
text
!=
NULL
;
i
++
)
for
(
i
=
0
;
i
<
TOTAL_TEXT
;
i
++
)
if
(
text
[
i
]
!=
text_sav
[
i
])
{
if
(
text
[
i
]
!=
nulstr
)
free
(
text
[
i
]);
...
...
@@ -4492,7 +4497,7 @@ void DLLCALL bbs_thread(void* arg)
struct
main_sock_cb_data
ssh_cb
;
struct
main_sock_cb_data
rlogin_cb
;
void
*
ts_cb
;
struct
in_addr
iadd
r
;
int
er
r
;
if
(
startup
==
NULL
)
{
sbbs_beep
(
100
,
500
);
...
...
@@ -4712,8 +4717,6 @@ void DLLCALL bbs_thread(void* arg)
#warning This version of Cryptlib is known to crash Synchronet. Upgrade to at least version 3.3 or do not build with Cryptlib support.
#endif
if
(
startup
->
options
&
BBS_OPT_ALLOW_SSH
)
{
bool
loaded_key
=
false
;
CRYPT_KEYSET
ssh_keyset
;
if
(
!
do_cryptInit
())
...
...
@@ -4742,8 +4745,10 @@ void DLLCALL bbs_thread(void* arg)
/* Ok, now try saving this one... use the syspass to enctrpy it. */
if
(
cryptStatusOK
(
cryptKeysetOpen
(
&
ssh_keyset
,
CRYPT_UNUSED
,
CRYPT_KEYSET_FILE
,
str
,
CRYPT_KEYOPT_CREATE
)))
{
cryptAddPrivateKey
(
ssh_keyset
,
ssh_context
,
scfg
.
sys_pass
);
cryptKeysetClose
(
ssh_keyset
);
if
(
!
cryptStatusOK
(
cryptAddPrivateKey
(
ssh_keyset
,
ssh_context
,
scfg
.
sys_pass
)))
lprintf
(
LOG_ERR
,
"SSH Cryptlib error %d saving key"
,
i
);
if
(
!
cryptStatusOK
(
cryptKeysetClose
(
ssh_keyset
)))
lprintf
(
LOG_ERR
,
"SSH Cryptlib error %d closing keyset"
,
i
);
}
}
...
...
@@ -5082,7 +5087,10 @@ NO_SSH:
close_socket
(
client_socket
);
continue
;
}
cryptPopData
(
sbbs
->
ssh_session
,
str
,
sizeof
(
str
),
&
i
);
if
(
!
cryptStatusOK
(
err
=
cryptPopData
(
sbbs
->
ssh_session
,
str
,
sizeof
(
str
),
&
i
)))
{
lprintf
(
LOG_WARNING
,
"Node %d !ERROR %d receiving on Cryptlib session"
,
sbbs
->
cfg
.
node_num
,
err
);
i
=
0
;
}
}
#endif
sbbs
->
client_socket
=
client_socket
;
// required for output to the user
...
...
@@ -5339,7 +5347,10 @@ NO_PASSTHRU:
/* Wait for pending data to be sent then turn off ssh_mode for uber-output */
while
(
sbbs
->
output_thread_running
&&
RingBufFull
(
&
sbbs
->
outbuf
))
SLEEP
(
1
);
cryptPopData
(
sbbs
->
ssh_session
,
str
,
sizeof
(
str
),
&
i
);
if
(
!
cryptStatusOK
(
err
=
cryptPopData
(
sbbs
->
ssh_session
,
str
,
sizeof
(
str
),
&
i
)))
{
lprintf
(
LOG_WARNING
,
"Node %d !ERROR %d receiving on Cryptlib session"
,
sbbs
->
cfg
.
node_num
,
err
);
i
=
0
;
}
sbbs
->
ssh_mode
=
false
;
}
#endif
...
...
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