mirror of
https://github.com/eclipse-paho/paho.mqtt.cpp.git
synced 2025-09-15 12:58:39 +08:00
#418 Fixed broken/bad merge
This commit is contained in:
parent
9e378f5ae0
commit
958a618067
@ -400,10 +400,7 @@ public:
|
||||
* Register a listener to be notified when an action completes.
|
||||
* @param listener The callback to be notified when actions complete.
|
||||
*/
|
||||
virtual void set_action_callback(iaction_listener& listener) {
|
||||
guard g(lock_);
|
||||
listener_ = &listener;
|
||||
}
|
||||
virtual void set_action_callback(iaction_listener& listener);
|
||||
/**
|
||||
* Store some context associated with an action.
|
||||
* @param userContext optional object used to pass context to the
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
// token.cpp
|
||||
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2013-2019 Frank Pagliughi <fpagliughi@mindspring.com>
|
||||
* Copyright (c) 2013-2024 Frank Pagliughi <fpagliughi@mindspring.com>
|
||||
*
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v2.0
|
||||
@ -257,13 +257,12 @@ void token::reset()
|
||||
errMsg_.clear();
|
||||
}
|
||||
|
||||
void set_action_callback(iaction_listener& listener)
|
||||
void token::set_action_callback(iaction_listener& listener)
|
||||
{
|
||||
guard g(lock_);
|
||||
unique_lock g{lock_};
|
||||
listener_ = &listener;
|
||||
|
||||
if (complete_)
|
||||
{
|
||||
if (complete_) {
|
||||
g.unlock();
|
||||
|
||||
if (rc_ == MQTTASYNC_SUCCESS)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user