Skip to content

Commit 177f768

Browse files
Use the refactored version of Selectables (sonic-net#313)
* Add packaging for syncd-rpc * Remove deprecated parameter from select()
1 parent d1c5223 commit 177f768

9 files changed

+9
-29
lines changed

lib/src/sai_redis_fdb.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ sai_status_t internal_redis_flush_fdb_entries(
4444

4545
swss::Selectable *sel;
4646

47-
int fd;
48-
49-
int result = s.select(&sel, &fd, GET_RESPONSE_TIMEOUT);
47+
int result = s.select(&sel, GET_RESPONSE_TIMEOUT);
5048

5149
if (result == swss::Select::OBJECT)
5250
{

lib/src/sai_redis_generic_get.cpp

+1-7
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,6 @@ std::string getSelectResultAsString(int result)
4949

5050
switch (result)
5151
{
52-
case swss::Select::FD:
53-
res = "FD";
54-
break;
55-
5652
case swss::Select::ERROR:
5753
res = "ERROR";
5854
break;
@@ -198,9 +194,7 @@ sai_status_t internal_redis_generic_get(
198194

199195
swss::Selectable *sel;
200196

201-
int fd;
202-
203-
int result = s.select(&sel, &fd, GET_RESPONSE_TIMEOUT);
197+
int result = s.select(&sel, GET_RESPONSE_TIMEOUT);
204198

205199
if (result == swss::Select::OBJECT)
206200
{

lib/src/sai_redis_generic_get_stats.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,7 @@ sai_status_t internal_redis_generic_get_stats(
143143

144144
swss::Selectable *sel;
145145

146-
int fd;
147-
148-
int result = s.select(&sel, &fd, GET_RESPONSE_TIMEOUT);
146+
int result = s.select(&sel, GET_RESPONSE_TIMEOUT);
149147

150148
if (result == swss::Select::OBJECT)
151149
{

lib/src/sai_redis_interfacequery.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ void ntf_thread()
6666
{
6767
swss::Selectable *sel;
6868

69-
int fd;
70-
71-
int result = s.select(&sel, &fd);
69+
int result = s.select(&sel);
7270

7371
if (sel == &g_redisNotificationTrheadEvent)
7472
{

lib/src/sai_redis_switch.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,7 @@ sai_status_t sai_redis_internal_notify_syncd(
3535

3636
swss::Selectable *sel;
3737

38-
int fd;
39-
40-
int result = s.select(&sel, &fd, GET_RESPONSE_TIMEOUT);
38+
int result = s.select(&sel, GET_RESPONSE_TIMEOUT);
4139

4240
if (result == swss::Select::OBJECT)
4341
{

syncd/syncd.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -3358,9 +3358,7 @@ int syncd_main(int argc, char **argv)
33583358
{
33593359
swss::Selectable *sel = NULL;
33603360

3361-
int fd;
3362-
3363-
int result = s.select(&sel, &fd);
3361+
int result = s.select(&sel);
33643362

33653363
if (sel == restartQuery.get())
33663364
{

syncd/tests.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -156,11 +156,10 @@ void bulk_nhgm_consumer_worker()
156156
swss::ConsumerTable c(&db, tableName);
157157
swss::Select cs;
158158
swss::Selectable *selectcs;
159-
int tmpfd;
160159
int ret = 0;
161160

162161
cs.addSelectable(&c);
163-
while ((ret = cs.select(&selectcs, &tmpfd)) == swss::Select::OBJECT)
162+
while ((ret = cs.select(&selectcs)) == swss::Select::OBJECT)
164163
{
165164
swss::KeyOpFieldsValuesTuple kco;
166165
c.pop(kco);

vslib/src/sai_vs_interfacequery.cpp

+1-3
Original file line numberDiff line numberDiff line change
@@ -177,9 +177,7 @@ void unittestChannelThreadProc()
177177
{
178178
swss::Selectable *sel;
179179

180-
int fd;
181-
182-
int result = s.select(&sel, &fd);
180+
int result = s.select(&sel);
183181

184182
if (sel == &g_unittestChannelThreadEvent)
185183
{

vslib/src/sai_vs_switch.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,7 @@ void linkmsg_thread(
215215
{
216216
swss::Selectable *temps = NULL;
217217

218-
int tempfd;
219-
int result = s.select(&temps, &tempfd);
218+
int result = s.select(&temps);
220219

221220
SWSS_LOG_INFO("select ended: %d", result);
222221
}

0 commit comments

Comments
 (0)