Skip to content

Commit

Permalink
fix wrong API type , add cmdline parse option , remove unuseful api c…
Browse files Browse the repository at this point in the history
…all (sonic-net#499)

fix wrong API type in internal_api_wait_for_response()

add cmdline parse option "s" , otherwise syncd cannot be executed via -s option, system cannot be up with syncd
  • Loading branch information
dzhangalibaba authored and lguohan committed Aug 1, 2019
1 parent f60facd commit c8371a2
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/src/sai_redis_generic_remove.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ sai_status_t internal_redis_bulk_generic_remove(
g_asicState->set(key, entries, "bulkremove");
}

return internal_api_wait_for_response(SAI_COMMON_API_CREATE);
return internal_api_wait_for_response(SAI_COMMON_API_REMOVE);
}


Expand Down
2 changes: 1 addition & 1 deletion lib/src/sai_redis_generic_set.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ sai_status_t internal_redis_bulk_generic_set(
g_asicState->set(key, entries, "bulkset");
}

return internal_api_wait_for_response(SAI_COMMON_API_CREATE);
return internal_api_wait_for_response(SAI_COMMON_API_SET);
}


Expand Down
2 changes: 0 additions & 2 deletions lib/src/sai_redis_interfacequery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,6 @@ sai_status_t sai_api_initialize(
g_redisNotifications = std::make_shared<swss::NotificationConsumer>(g_dbNtf.get(), "NOTIFICATIONS");
g_redisClient = std::make_shared<swss::RedisClient>(g_db.get());

g_asicState->setBuffered(false); // in sync mode, always false

clear_local_state();

g_asicInitViewMode = false;
Expand Down
4 changes: 2 additions & 2 deletions syncd/syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3302,9 +3302,9 @@ void handleCmdLine(int argc, char **argv)

#ifdef SAITHRIFT
options.run_rpc_server = false;
const char* const optstring = "dNUCt:p:i:rm:huS";
const char* const optstring = "dNUCt:p:i:rm:huSs";
#else
const char* const optstring = "dNUCt:p:i:huS";
const char* const optstring = "dNUCt:p:i:huSs";
#endif // SAITHRIFT

while(true)
Expand Down

0 comments on commit c8371a2

Please sign in to comment.