Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Jamal Dahbur
libcloudstorage
Commits
04d6fc89
Commit
04d6fc89
authored
Feb 14, 2018
by
Paweł Wegner
Browse files
Auth: don't call callback twice.
parent
c37fc46e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/IRequest.h
View file @
04d6fc89
...
...
@@ -226,6 +226,8 @@ class GenericCallback {
GenericCallback
(
typename
IGenericCallback
<
Arguments
...
>::
Pointer
functor
)
:
functor_
(
functor
)
{}
GenericCallback
(
std
::
nullptr_t
)
{}
operator
bool
()
const
{
return
static_cast
<
bool
>
(
functor_
);
}
void
operator
()(
Arguments
...
d
)
const
{
functor_
->
done
(
d
...);
}
...
...
src/Utility/Auth.cpp
View file @
04d6fc89
...
...
@@ -47,7 +47,7 @@ IHttpServer::IResponse::Pointer Auth::HttpServerCallback::handle(
const
char
*
error
=
request
.
get
(
data_
.
error_parameter_name_
);
if
(
accepted
)
{
std
::
unique_lock
<
std
::
mutex
>
lock
(
lock_
);
auto
callback
=
std
::
mov
e
(
data_
.
callback_
);
auto
callback
=
util
::
exchang
e
(
data_
.
callback_
,
nullptr
);
lock
.
unlock
();
if
(
callback
)
{
if
(
std
::
string
(
accepted
)
==
"true"
&&
code
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment