osaf/libs/agents/saf/clma/clma_util.c | 7 ++----- tests/clmsv/Makefile.am | 3 ++- 2 files changed, 4 insertions(+), 6 deletions(-)
The select() function cannot handle file descriptors larger than 1023. To avoid this limitation, we replace all usages of select() with poll(). diff --git a/osaf/libs/agents/saf/clma/clma_util.c b/osaf/libs/agents/saf/clma/clma_util.c --- a/osaf/libs/agents/saf/clma/clma_util.c +++ b/osaf/libs/agents/saf/clma/clma_util.c @@ -18,6 +18,7 @@ #include <stdlib.h> #include <syslog.h> #include "clma.h" +#include "osaf_poll.h" static void clma_hdl_list_del(clma_client_hdl_rec_t ** list); /* Variables used during startup/shutdown only */ @@ -52,14 +53,10 @@ uint32_t clma_validate_version(SaVersion */ static unsigned int clma_create(void) { - unsigned int timeout = 3000; - NCS_SEL_OBJ_SET set; unsigned int rc = NCSCC_RC_SUCCESS; /* create and init sel obj for mds sync */ m_NCS_SEL_OBJ_CREATE(&clma_cb.clms_sync_sel); - m_NCS_SEL_OBJ_ZERO(&set); - m_NCS_SEL_OBJ_SET(clma_cb.clms_sync_sel, &set); pthread_mutex_lock(&clma_cb.cb_lock); clma_cb.clms_sync_awaited = 1; pthread_mutex_unlock(&clma_cb.cb_lock); @@ -71,7 +68,7 @@ static unsigned int clma_create(void) } /* Block and wait for indication from MDS meaning CMLS is up */ - m_NCS_SEL_OBJ_SELECT(clma_cb.clms_sync_sel, &set, 0, 0, &timeout); + osaf_poll_one_fd(m_GET_FD_FROM_SEL_OBJ(clma_cb.clms_sync_sel), 30000); pthread_mutex_lock(&clma_cb.cb_lock); clma_cb.clms_sync_awaited = 0; diff --git a/tests/clmsv/Makefile.am b/tests/clmsv/Makefile.am --- a/tests/clmsv/Makefile.am +++ b/tests/clmsv/Makefile.am @@ -47,4 +47,5 @@ clmtest_SOURCES = \ $(top_srcdir)/tests/clmsv/src/tet_saClmFinalize.c clmtest_LDADD = \ - $(top_builddir)/osaf/libs/saf/libSaClm/libSaClm.la + $(top_builddir)/osaf/libs/saf/libSaClm/libSaClm.la \ + $(top_builddir)/osaf/libs/core/libopensaf_core.la ------------------------------------------------------------------------------ Android is increasing in popularity, but the open development platform that developers love is also attractive to malware creators. Download this white paper to learn more about secure code signing practices that can help keep Android apps secure. http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel