MCPcopy Create free account
hub / github.com/apache/httpd / transit

Function transit

modules/http2/h2_session.c:1436–1476  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1434}
1435
1436static void transit(h2_session *session, const char *action, h2_session_state nstate)
1437{
1438 int ostate;
1439
1440 if (session->state != nstate) {
1441 ostate = session->state;
1442
1443 ap_log_cerror(APLOG_MARK, APLOG_DEBUG, 0, session->c1,
1444 H2_SSSN_LOG(APLOGNO(03078), session,
1445 "transit [%s] -- %s --> [%s]"),
1446 h2_session_state_str(ostate), action,
1447 h2_session_state_str(nstate));
1448
1449 switch (session->state) {
1450 case H2_SESSION_ST_IDLE:
1451 if (!session->remote.emitted_count) {
1452 /* on fresh connections, with async mpm, do not return
1453 * to mpm for a second. This gives the first request a better
1454 * chance to arrive (und connection leaving IDLE state).
1455 * If we return to mpm right away, this connection has the
1456 * same chance of being cleaned up by the mpm as connections
1457 * that already served requests - not fair. */
1458 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c1,
1459 H2_SSSN_LOG("", session, "enter idle"));
1460 }
1461 else {
1462 /* normal keepalive setup */
1463 ap_log_cerror(APLOG_MARK, APLOG_TRACE1, 0, session->c1,
1464 H2_SSSN_LOG("", session, "enter keepalive"));
1465 }
1466 session->state = nstate;
1467 break;
1468 case H2_SESSION_ST_DONE:
1469 break;
1470 default:
1471 /* nop */
1472 session->state = nstate;
1473 break;
1474 }
1475 }
1476}
1477
1478static void h2_session_ev_init(h2_session *session, int arg, const char *msg)
1479{

Callers 12

session_cleanupFunction · 0.70
h2_session_ev_initFunction · 0.70
h2_session_ev_conn_errorFunction · 0.70
h2_session_ev_ngh2_doneFunction · 0.70
h2_session_ev_bad_clientFunction · 0.70
h2_session_processFunction · 0.70

Calls 1

h2_session_state_strFunction · 0.85

Tested by

no test coverage detected