Skip to content

Commit

Permalink
Fix typo (sonic-net#467)
Browse files Browse the repository at this point in the history
* Rename to fix typo

Signed-off-by: Wenda Ni <[email protected]>

* Correct shared_ptr creation parameters

Signed-off-by: Wenda Ni <[email protected]>
  • Loading branch information
wendani authored and kcudnik committed Jun 11, 2019
1 parent be5d002 commit d5c89cd
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/src/sai_redis_interfacequery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ bool g_apiInitialized = false;
volatile bool g_run = false;

// this event is used to nice end notifications thread
swss::SelectableEvent g_redisNotificationTrheadEvent;
swss::SelectableEvent g_redisNotificationThreadEvent;
std::shared_ptr<std::thread> notification_thread;

std::shared_ptr<swss::DBConnector> g_db;
Expand Down Expand Up @@ -61,15 +61,15 @@ void ntf_thread()
swss::Select s;

s.addSelectable(g_redisNotifications.get());
s.addSelectable(&g_redisNotificationTrheadEvent);
s.addSelectable(&g_redisNotificationThreadEvent);

while (g_run)
{
swss::Selectable *sel;

int result = s.select(&sel);

if (sel == &g_redisNotificationTrheadEvent)
if (sel == &g_redisNotificationThreadEvent)
{
// user requested shutdown_switch
break;
Expand Down Expand Up @@ -136,7 +136,7 @@ sai_status_t sai_api_initialize(

SWSS_LOG_DEBUG("creating notification thread");

notification_thread = std::make_shared<std::thread>(std::thread(ntf_thread));
notification_thread = std::make_shared<std::thread>(ntf_thread);

g_apiInitialized = true;

Expand All @@ -161,7 +161,7 @@ sai_status_t sai_api_uninitialize(void)
g_run = false;

// notify thread that it should end
g_redisNotificationTrheadEvent.notify();
g_redisNotificationThreadEvent.notify();

notification_thread->join();

Expand Down

0 comments on commit d5c89cd

Please sign in to comment.