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
3c4f61af
Commit
3c4f61af
authored
17 years ago
by
rswindell
Browse files
Options
Downloads
Patches
Plain Diff
Optimize set_qwk_flag() - no need to read/modify/write the user database if
the flag is already set.
parent
a1d106cf
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/sbbs3/qwk.cpp
+6
-4
6 additions, 4 deletions
src/sbbs3/qwk.cpp
with
6 additions
and
4 deletions
src/sbbs3/qwk.cpp
+
6
−
4
View file @
3c4f61af
...
@@ -63,6 +63,9 @@ bool route_circ(char *via, char *id)
...
@@ -63,6 +63,9 @@ bool route_circ(char *via, char *id)
{
{
char
str
[
256
],
*
p
,
*
sp
;
char
str
[
256
],
*
p
,
*
sp
;
if
(
via
==
NULL
||
id
==
NULL
)
return
(
false
);
SAFECOPY
(
str
,
via
);
SAFECOPY
(
str
,
via
);
p
=
str
;
p
=
str
;
SKIP_WHITESPACE
(
p
);
SKIP_WHITESPACE
(
p
);
...
@@ -985,13 +988,12 @@ int sbbs_t::set_qwk_flag(ulong flag)
...
@@ -985,13 +988,12 @@ int sbbs_t::set_qwk_flag(ulong flag)
int
i
;
int
i
;
char
str
[
32
];
char
str
[
32
];
if
(
useron
.
qwk
&
flag
)
return
0
;
if
((
i
=
getuserrec
(
&
cfg
,
useron
.
number
,
U_QWK
,
8
,
str
))
!=
0
)
if
((
i
=
getuserrec
(
&
cfg
,
useron
.
number
,
U_QWK
,
8
,
str
))
!=
0
)
return
(
i
);
return
(
i
);
useron
.
qwk
=
ahtoul
(
str
);
useron
.
qwk
=
ahtoul
(
str
);
useron
.
qwk
|=
flag
;
useron
.
qwk
|=
flag
;
if
((
i
=
putuserrec
(
&
cfg
,
useron
.
number
,
U_QWK
,
8
,
ultoa
(
useron
.
qwk
,
str
,
16
)))
!=
0
)
return
putuserrec
(
&
cfg
,
useron
.
number
,
U_QWK
,
8
,
ultoa
(
useron
.
qwk
,
str
,
16
));
return
(
i
);
return
(
0
);
}
}
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