X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=test%2Ftest_transport_em.c;h=2ca3f08fe7f614dc8dcd24a8a70902b3966d0740;hb=refs%2Fchanges%2F51%2F4751%2F2;hp=afdebc3263219c12af79f156fe494c7b7bdd6e9f;hpb=cc314e0c526a0ed0ce9295e490b3f2bb29c3332c;p=ric-plt%2Flib%2Frmr.git diff --git a/test/test_transport_em.c b/test/test_transport_em.c index afdebc3..2ca3f08 100644 --- a/test/test_transport_em.c +++ b/test/test_transport_em.c @@ -36,7 +36,7 @@ int tpem_last_len = 0; int tpem_addr_dup = 0; // getsockname duplicates last addr if true int tpem_conn_state = 0; // states returned by emulated functions allowing failures to be driven -int tpem_sock_state = 0; +int tpem_sock_state = 0; // if sock state 0, then socket call returns good fd int tpem_listen_state = 0; int tpem_bind_state = 0; int tpem_accept_fd = 5; // file desc returned by accept @@ -125,7 +125,7 @@ static int tpem_socket( int domain, int type, int protocol ) { if( tpem_sock_state == 0 ) { if( ++fd > 10 ) { - fd = 1; + fd = 3; // ensure we don't stomp on std* descriptors } return fd;