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
1e9b2b32
Commit
1e9b2b32
authored
1 year ago
by
Rob Swindell
Browse files
Options
Downloads
Patches
Plain Diff
Add/use new trashcan2() function that'll compare 2 strings against a .can file
parent
cfe2e836
No related branches found
No related tags found
No related merge requests found
Pipeline
#4991
passed
1 year ago
Stage: build
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/sbbs3/mailsrvr.c
+2
-4
2 additions, 4 deletions
src/sbbs3/mailsrvr.c
src/sbbs3/scfglib.h
+1
-0
1 addition, 0 deletions
src/sbbs3/scfglib.h
src/sbbs3/scfglib1.c
+11
-0
11 additions, 0 deletions
src/sbbs3/scfglib1.c
with
14 additions
and
4 deletions
src/sbbs3/mailsrvr.c
+
2
−
4
View file @
1e9b2b32
...
...
@@ -3119,8 +3119,7 @@ static bool smtp_client_thread(smtp_t* smtp)
return
false
;
}
if
(
trashcan
(
&
scfg
,
host_name
,
"smtpspy"
)
||
trashcan
(
&
scfg
,
host_ip
,
"smtpspy"
))
{
if
(
trashcan2
(
&
scfg
,
host_ip
,
host_name
,
"smtpspy"
))
{
SAFECOPY
(
str
,
client
.
protocol
);
strlwr
(
str
);
SAFEPRINTF2
(
path
,
"%s%sspy.txt"
,
scfg
.
logs_dir
,
str
);
...
...
@@ -4545,8 +4544,7 @@ static bool smtp_client_thread(smtp_t* smtp)
}
if
(
spy
==
NULL
&&
(
trashcan
(
&
scfg
,
reverse_path
,
"smtpspy"
)
||
trashcan
(
&
scfg
,
rcpt_addr
,
"smtpspy"
)))
{
&&
trashcan2
(
&
scfg
,
reverse_path
,
rcpt_addr
,
"smtpspy"
))
{
SAFECOPY
(
tmp
,
client
.
protocol
);
strlwr
(
tmp
);
SAFEPRINTF2
(
path
,
"%s%sspy.txt"
,
scfg
.
logs_dir
,
tmp
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfglib.h
+
1
−
0
View file @
1e9b2b32
...
...
@@ -73,6 +73,7 @@ DLLEXPORT BOOL is_valid_grpnum(scfg_t*, int);
DLLEXPORT
BOOL
is_valid_xtrnsec
(
scfg_t
*
,
int
);
DLLEXPORT
BOOL
trashcan
(
scfg_t
*
cfg
,
const
char
*
insearch
,
const
char
*
name
);
DLLEXPORT
BOOL
trashcan2
(
scfg_t
*
cfg
,
const
char
*
str1
,
const
char
*
str2
,
const
char
*
name
);
DLLEXPORT
char
*
trashcan_fname
(
scfg_t
*
cfg
,
const
char
*
name
,
char
*
fname
,
size_t
);
DLLEXPORT
str_list_t
trashcan_list
(
scfg_t
*
cfg
,
const
char
*
name
);
DLLEXPORT
char
*
twitlist_fname
(
scfg_t
*
cfg
,
char
*
fname
,
size_t
);
...
...
This diff is collapsed.
Click to expand it.
src/sbbs3/scfglib1.c
+
11
−
0
View file @
1e9b2b32
...
...
@@ -888,6 +888,17 @@ BOOL trashcan(scfg_t* cfg, const char* insearchof, const char* name)
return
(
findstr
(
insearchof
,
trashcan_fname
(
cfg
,
name
,
fname
,
sizeof
(
fname
))));
}
/****************************************************************************/
/* Searches the file <name>.can in the TEXT directory for 2 matches */
/* Returns TRUE if found in list, FALSE if not. */
/****************************************************************************/
BOOL
trashcan2
(
scfg_t
*
cfg
,
const
char
*
str1
,
const
char
*
str2
,
const
char
*
name
)
{
char
fname
[
MAX_PATH
+
1
];
return
find2strs
(
str1
,
str2
,
trashcan_fname
(
cfg
,
name
,
fname
,
sizeof
(
fname
)));
}
/****************************************************************************/
char
*
trashcan_fname
(
scfg_t
*
cfg
,
const
char
*
name
,
char
*
fname
,
size_t
maxlen
)
{
...
...
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