Skip to content

Commit

Permalink
Add thr missing API into saithriftv2 missing for syncd (#1503)
Browse files Browse the repository at this point in the history
Signed-off-by: Vivek Reddy <vkarri@nvidia.com>

Co-authored-by: Vivek Reddy Karri <vkarri@r-build-sonic06.mtr.labs.mlnx>
  • Loading branch information
vivekrnv and Vivek Reddy Karri committed Jun 25, 2022
1 parent f69394f commit f79004c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 7 deletions.
10 changes: 10 additions & 0 deletions meta/sai_rpc_frontend.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,16 @@ int start_p4_sai_thrift_rpc_server(char *port) {
return status;
}

/**
* @brief Start Thrift RPC server Wrapper
*/
int start_sai_thrift_rpc_server(int port)
{
static char port_str[10];
snprintf(port_str, sizeof(port_str), "%d", port);
return start_p4_sai_thrift_rpc_server(port_str);
}

/**
* @brief Stop Thrift RPC server
*/
Expand Down
7 changes: 0 additions & 7 deletions test/saithriftv2/src/saiserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -266,13 +266,6 @@ void handleInitScript(const std::string& initScript)
system(initScript.c_str());
}

int start_sai_thrift_rpc_server(int port)
{
static char port_str[10];
snprintf(port_str, sizeof(port_str), "%d", port);
return start_p4_sai_thrift_rpc_server(port_str);
}

int
main(int argc, char* argv[])
{
Expand Down
1 change: 1 addition & 0 deletions test/saithriftv2/src/switch_sai_rpc_server.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
extern "C" {
int start_p4_sai_thrift_rpc_server(char *port);
int start_sai_thrift_rpc_server(int port);
}

0 comments on commit f79004c

Please sign in to comment.