Loading modules/echo/mod_echo.c +28 −26 Original line number Diff line number Diff line Loading @@ -64,8 +64,7 @@ AP_DECLARE_DATA module echo_module; typedef struct { typedef struct { int bEnabled; } EchoConfig; Loading Loading @@ -93,21 +92,23 @@ static int process_echo_connection(conn_rec *c) EchoConfig *pConfig = ap_get_module_config(c->base_server->module_config, &echo_module); if(!pConfig->bEnabled) if (!pConfig->bEnabled) { return DECLINED; } for( ; ; ) { for ( ; ; ) { apr_ssize_t r, w; r = sizeof(buf); apr_recv(c->client_socket, buf, &r); if(r <= 0) if (r <= 0) { break; } w = r; apr_send(c->client_socket, buf, &w); if(w != r) if (w != r) { break; } } return OK; } Loading @@ -120,7 +121,8 @@ static const command_rec echo_cmds[] = static void register_hooks(void) { ap_hook_process_connection(process_echo_connection,NULL,NULL,AP_HOOK_MIDDLE); ap_hook_process_connection(process_echo_connection, NULL, NULL, AP_HOOK_MIDDLE); } AP_DECLARE_DATA module echo_module = { Loading Loading
modules/echo/mod_echo.c +28 −26 Original line number Diff line number Diff line Loading @@ -64,8 +64,7 @@ AP_DECLARE_DATA module echo_module; typedef struct { typedef struct { int bEnabled; } EchoConfig; Loading Loading @@ -93,21 +92,23 @@ static int process_echo_connection(conn_rec *c) EchoConfig *pConfig = ap_get_module_config(c->base_server->module_config, &echo_module); if(!pConfig->bEnabled) if (!pConfig->bEnabled) { return DECLINED; } for( ; ; ) { for ( ; ; ) { apr_ssize_t r, w; r = sizeof(buf); apr_recv(c->client_socket, buf, &r); if(r <= 0) if (r <= 0) { break; } w = r; apr_send(c->client_socket, buf, &w); if(w != r) if (w != r) { break; } } return OK; } Loading @@ -120,7 +121,8 @@ static const command_rec echo_cmds[] = static void register_hooks(void) { ap_hook_process_connection(process_echo_connection,NULL,NULL,AP_HOOK_MIDDLE); ap_hook_process_connection(process_echo_connection, NULL, NULL, AP_HOOK_MIDDLE); } AP_DECLARE_DATA module echo_module = { Loading