#418 Fixed broken/bad merge

This commit is contained in:
fpagliughi 2024-07-04 19:13:52 -04:00
parent 9e378f5ae0
commit 958a618067
2 changed files with 5 additions and 9 deletions

View File

@ -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

View File

@ -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)