Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
O
OpenLDAP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Dragoș Haiduc
OpenLDAP
Commits
adea0057
Commit
adea0057
authored
17 years ago
by
Hallvard Furuseth
Browse files
Options
Downloads
Patches
Plain Diff
ITS#5248: use volatile sig_atomic_t for signal variables gotintr, abcan
parent
24d92588
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
clients/tools/common.c
+8
-8
8 additions, 8 deletions
clients/tools/common.c
with
8 additions
and
8 deletions
clients/tools/common.c
+
8
−
8
View file @
adea0057
...
...
@@ -149,8 +149,8 @@ static struct tool_ctrls_t {
};
/* "features" */
static
int
gotintr
;
static
int
abcan
;
enum
{
Intr_None
=
0
,
Intr_Abandon
,
Intr_Cancel
,
Intr_Ignore
};
static
volatile
sig_atomic_t
gotintr
,
abcan
;
#ifdef LDAP_CONTROL_X_SESSION_TRACKING
...
...
@@ -558,19 +558,19 @@ tool_args( int argc, char **argv )
/* this shouldn't go here, really; but it's a feature... */
}
else
if
(
strcasecmp
(
control
,
"abandon"
)
==
0
)
{
abcan
=
LDAP_REQ_ABANDON
;
abcan
=
Intr_Abandon
;
if
(
crit
)
{
gotintr
=
abcan
;
}
}
else
if
(
strcasecmp
(
control
,
"cancel"
)
==
0
)
{
abcan
=
LDAP_REQ_EXTENDED
;
abcan
=
Intr_Cancel
;
if
(
crit
)
{
gotintr
=
abcan
;
}
}
else
if
(
strcasecmp
(
control
,
"ignore"
)
==
0
)
{
abcan
=
-
1
;
abcan
=
Intr_Ignore
;
if
(
crit
)
{
gotintr
=
abcan
;
}
...
...
@@ -1720,19 +1720,19 @@ tool_check_abandon( LDAP *ld, int msgid )
int
rc
;
switch
(
gotintr
)
{
case
LDAP_REQ_EXTENDED
:
case
Intr_Cancel
:
rc
=
ldap_cancel_s
(
ld
,
msgid
,
NULL
,
NULL
);
fprintf
(
stderr
,
"got interrupt, cancel got %d: %s
\n
"
,
rc
,
ldap_err2string
(
rc
)
);
return
-
1
;
case
LDAP_REQ_ABANDON
:
case
Intr_Abandon
:
rc
=
ldap_abandon_ext
(
ld
,
msgid
,
NULL
,
NULL
);
fprintf
(
stderr
,
"got interrupt, abandon got %d: %s
\n
"
,
rc
,
ldap_err2string
(
rc
)
);
return
-
1
;
case
-
1
:
case
Intr_Ignore
:
/* just unbind, ignoring the request */
return
-
1
;
}
...
...
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