MCPcopy Create free account
hub / github.com/apache/qpid-proton / process_endpoints

Function process_endpoints

c/tests/engine_test.cpp:56–81  ·  view source on GitHub ↗

handle state changes of the endpoints

Source from the content-addressed store, hash-verified

54
55// handle state changes of the endpoints
56static void process_endpoints(pn_connection_t *conn) {
57 pn_session_t *ssn = pn_session_head(conn, PN_LOCAL_UNINIT);
58 while (ssn) {
59 // fprintf(stderr, "Opening session %p\n", (void*)ssn);
60 pn_session_open(ssn);
61 ssn = pn_session_next(ssn, PN_LOCAL_UNINIT);
62 }
63
64 pn_link_t *link = pn_link_head(conn, PN_LOCAL_UNINIT);
65 while (link) {
66 pn_link_open(link);
67 link = pn_link_next(link, PN_LOCAL_UNINIT);
68 }
69
70 link = pn_link_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
71 while (link) {
72 pn_link_close(link);
73 link = pn_link_next(link, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
74 }
75
76 ssn = pn_session_head(conn, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
77 while (ssn) {
78 pn_session_close(ssn);
79 ssn = pn_session_next(ssn, PN_LOCAL_ACTIVE | PN_REMOTE_CLOSED);
80 }
81}
82
83// bring up a session and a link between the two connections
84static void test_setup(pn_connection_t *c1, pn_transport_t *t1,

Callers 2

test_setupFunction · 0.85
engine_test.cppFile · 0.85

Calls 8

pn_session_headFunction · 0.85
pn_session_openFunction · 0.85
pn_session_nextFunction · 0.85
pn_link_headFunction · 0.85
pn_link_openFunction · 0.85
pn_link_nextFunction · 0.85
pn_link_closeFunction · 0.85
pn_session_closeFunction · 0.85

Tested by

no test coverage detected