Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
A
asterisk
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
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Voice
asterisk
Commits
83c61383
Commit
83c61383
authored
7 years ago
by
Joshua Colp
Committed by
Gerrit Code Review
7 years ago
Browse files
Options
Downloads
Plain Diff
Merge "stasis: Remove silly use of RAII_VAR in stasis_forward_all."
parents
a34b36c5
64bcb65a
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main/stasis.c
+4
-3
4 additions, 3 deletions
main/stasis.c
with
4 additions
and
3 deletions
main/stasis.c
+
4
−
3
View file @
83c61383
...
...
@@ -908,7 +908,7 @@ struct stasis_forward *stasis_forward_all(struct stasis_topic *from_topic,
{
int
res
;
size_t
idx
;
RAII_VAR
(
struct
stasis_forward
*
,
forward
,
NULL
,
ao2_cleanup
)
;
struct
stasis_forward
*
forward
;
if
(
!
from_topic
||
!
to_topic
)
{
return
NULL
;
...
...
@@ -921,7 +921,7 @@ struct stasis_forward *stasis_forward_all(struct stasis_topic *from_topic,
/* Forwards to ourselves are implicit. */
if
(
to_topic
==
from_topic
)
{
return
ao2_bump
(
forward
)
;
return
forward
;
}
forward
->
from_topic
=
ao2_bump
(
from_topic
);
...
...
@@ -932,6 +932,7 @@ struct stasis_forward *stasis_forward_all(struct stasis_topic *from_topic,
if
(
res
!=
0
)
{
ao2_unlock
(
from_topic
);
ao2_unlock
(
to_topic
);
ao2_ref
(
forward
,
-
1
);
return
NULL
;
}
...
...
@@ -941,7 +942,7 @@ struct stasis_forward *stasis_forward_all(struct stasis_topic *from_topic,
ao2_unlock
(
from_topic
);
ao2_unlock
(
to_topic
);
return
ao2_bump
(
forward
)
;
return
forward
;
}
static
void
subscription_change_dtor
(
void
*
obj
)
...
...
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