Skip to content

Commit 64463df

Browse files
committed
Fixed various compilation error or warning.
1 parent dd5c89e commit 64463df

File tree

9 files changed

+71
-20
lines changed

9 files changed

+71
-20
lines changed

examples/debug/debug.ecf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
2121
<setting name="concurrency" value="scoop"/>
2222
<library name="cgi" location="..\..\library\server\wsf\connector\cgi-safe.ecf" readonly="false"/>
23-
<library name="standalone" location="..\..\library\server\wsf\connector\standalone-safe.ecf" readonly="false"/>
2423
<library name="libfcgi" location="..\..\library\server\wsf\connector\libfcgi-safe.ecf" readonly="false"/>
2524
<library name="nino" location="..\..\library\server\wsf\connector\nino-safe.ecf" readonly="false"/>
25+
<library name="standalone" location="..\..\library\server\wsf\connector\standalone-safe.ecf" readonly="false"/>
2626
<cluster name="launcher" location=".\launcher\any\" recursive="true"/>
2727
<cluster name="src" location=".\src\" recursive="true"/>
2828
</target>
2929
<target name="debug_standalone" extends="common">
3030
<root class="EWF_DEBUG_SERVER" feature="make_and_launch"/>
31+
<setting name="concurrency" value="scoop"/>
3132
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
3233
<cluster name="launcher" location=".\launcher\default\" recursive="true"/>
3334
<cluster name="src" location=".\src\" recursive="true"/>

examples/restbucksCRUD/restbucks-safe.ecf

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
2-
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-12-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-12-0 http://www.eiffel.com/developers/xml/configuration-1-12-0.xsd" name="restbucks" uuid="2773FEAA-448F-410E-BEDE-9298C4749066" library_target="restbucks">
2+
<system xmlns="http://www.eiffel.com/developers/xml/configuration-1-13-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.eiffel.com/developers/xml/configuration-1-13-0 http://www.eiffel.com/developers/xml/configuration-1-13-0.xsd" name="restbucks" uuid="2773FEAA-448F-410E-BEDE-9298C4749066" library_target="restbucks">
33
<target name="restbucks_common">
44
<file_rule>
55
<exclude>/EIFGENs$</exclude>
@@ -8,16 +8,16 @@
88
</file_rule>
99
<option full_class_checking="false" void_safety="all">
1010
</option>
11-
<setting name="concurrency" value="thread"/>
11+
<setting name="concurrency" value="scoop"/>
1212
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
13-
<library name="connector_nino" location="..\..\library\server\ewsgi\connectors\nino\nino-safe.ecf" readonly="false">
13+
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false">
1414
<option debug="true">
15-
<debug name="nino" enabled="true"/>
15+
<debug name="standalone" enabled="true"/>
1616
</option>
1717
</library>
1818
<library name="conneg" location="..\..\library\network\protocol\content_negotiation\conneg-safe.ecf"/>
1919
<library name="crypto" location="$ISE_LIBRARY\unstable\library\text\encryption\crypto\crypto-safe.ecf" readonly="false"/>
20-
<library name="default_nino" location="..\..\library\server\wsf\default\nino-safe.ecf" readonly="false"/>
20+
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false"/>
2121
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
2222
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
2323
<library name="json" location="..\..\contrib\library\text\parser\json\library\json-safe.ecf" readonly="false"/>
@@ -30,7 +30,7 @@
3030
<target name="restbucks" extends="restbucks_common">
3131
<root class="RESTBUCKS_SERVER" feature="make"/>
3232
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="provisional">
33-
<debug name="nino" enabled="true"/>
33+
<debug name="standalone" enabled="true"/>
3434
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
3535
</option>
3636
<cluster name="src" location="src\" recursive="true">
@@ -42,7 +42,7 @@
4242
<target name="policy_driven_restbucks" extends="restbucks_common">
4343
<root class="RESTBUCKS_SERVER" feature="make"/>
4444
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="transitional" syntax="provisional">
45-
<debug name="nino" enabled="true"/>
45+
<debug name="standalone" enabled="true"/>
4646
<assertions precondition="true" postcondition="true" check="true" invariant="true" loop="true" supplier_precondition="true"/>
4747
</option>
4848
<library name="wsf_policy_driven" location="..\..\library\server\wsf\wsf_policy_driven-safe.ecf" readonly="false"/>

examples/upload_image/upload_image-safe.ecf

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@
88
<exclude>/\.svn$</exclude>
99
</file_rule>
1010
<option debug="true" warning="true" full_class_checking="true" is_attached_by_default="true" void_safety="all" syntax="provisional">
11-
<debug name="nino" enabled="true"/>
11+
<debug name="standalone" enabled="true"/>
1212
<assertions precondition="true" postcondition="true" check="true" invariant="true" supplier_precondition="true"/>
1313
</option>
1414
<setting name="concurrency" value="thread"/>
1515
<library name="base" location="$ISE_LIBRARY\library\base\base-safe.ecf"/>
16-
<library name="connector_nino" location="..\..\library\server\ewsgi\connectors\nino\nino-safe.ecf" readonly="false" use_application_options="true">
16+
<library name="connector_standalone" location="..\..\library\server\ewsgi\connectors\standalone\standalone-safe.ecf" readonly="false" use_application_options="true">
1717
<option>
1818
<assertions precondition="true" check="true" invariant="true" supplier_precondition="true"/>
1919
</option>
2020
</library>
21-
<library name="default_nino" location="..\..\library\server\wsf\default\nino-safe.ecf" readonly="false" use_application_options="true"/>
21+
<library name="default_standalone" location="..\..\library\server\wsf\default\standalone-safe.ecf" readonly="false" use_application_options="true"/>
2222
<library name="encoder" location="..\..\library\text\encoder\encoder-safe.ecf" readonly="false"/>
2323
<library name="http" location="..\..\library\network\protocol\http\http-safe.ecf" readonly="false"/>
2424
<library name="testing" location="$ISE_LIBRARY\library\testing\testing-safe.ecf"/>

library/server/ewsgi/connectors/standalone/src/httpd/concurrency/none/httpd_request_handler.e

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,16 @@ deferred class
88

99
inherit
1010
HTTPD_REQUEST_HANDLER_I
11+
redefine
12+
is_persistent_connection_supported
13+
end
14+
15+
feature -- Status report
16+
17+
is_persistent_connection_supported: BOOLEAN = False
18+
-- <Precursor>
19+
-- When there is no concurrency support, do not try to support
20+
-- persistent connection!
1121

1222
note
1323
copyright: "2011-2015, Jocelyn Fiat, Javier Velilla, Eiffel Software and others"

library/server/ewsgi/connectors/standalone/src/httpd/httpd_request_handler_i.e

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,16 @@ feature -- Settings
108108

109109
is_verbose: BOOLEAN
110110

111+
is_persistent_connection_supported: BOOLEAN
112+
-- Is persistent connection supported?
113+
do
114+
Result := {HTTPD_SERVER}.is_persistent_connection_supported
115+
end
116+
117+
persistent_connection_timeout: INTEGER = 5 -- seconds
118+
-- Number of seconds for persistent connection timeout.
119+
-- Default: 5 sec.
120+
111121
feature -- Status report
112122

113123
has_error: BOOLEAN
@@ -168,7 +178,7 @@ feature -- Execution
168178
n := n + 1
169179
-- FIXME: it seems to be called one more time, mostly to see this is done.
170180
execute_request
171-
l_exit := not {HTTPD_SERVER}.is_persistent_connection_supported
181+
l_exit := not is_persistent_connection_supported
172182
or has_error or l_socket.is_closed or not l_socket.is_open_read
173183
or not is_persistent_connection_requested
174184
reset_request
@@ -196,10 +206,21 @@ feature -- Execution
196206
debug ("dbglog")
197207
dbglog (generator + ".execute_request socket=" + l_socket.descriptor.out + " ENTER")
198208
end
199-
l_socket.set_timeout (5) -- 5 seconds!
209+
200210
--| TODO: add configuration options for socket timeout.
201211
--| set by default 5 seconds.
202-
l_ready_for_reading := l_socket.ready_for_reading
212+
-- l_socket.set_timeout (persistent_connection_timeout) -- 5 seconds!
213+
l_socket.set_timeout (1) -- 1 second!
214+
from
215+
i := persistent_connection_timeout -- * 1 sec
216+
until
217+
l_ready_for_reading or i <= 0 or has_error
218+
loop
219+
l_ready_for_reading := l_socket.ready_for_reading
220+
check not l_socket.is_closed end
221+
i := i - 1
222+
end
223+
203224
if l_ready_for_reading then
204225
create l_remote_info
205226
if attached l_socket.peer_address as l_addr then
@@ -217,9 +238,11 @@ feature -- Execution
217238
end
218239

219240
if has_error then
220-
-- check catch_bad_incoming_connection: False end
221-
if is_verbose then
222-
log ("ERROR: invalid HTTP incoming request")
241+
if l_ready_for_reading then
242+
-- check catch_bad_incoming_connection: False end
243+
if is_verbose then
244+
log ("ERROR: invalid HTTP incoming request")
245+
end
223246
end
224247
else
225248
process_request (l_socket)

library/server/obsolete/v0/ewsgi/connectors/libfcgi/libfcgi.ecf

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,13 @@
1313
<library name="ewsgi" location="..\..\ewsgi.ecf"/>
1414
<library name="http" location="..\..\..\..\..\..\network\protocol\http\http.ecf"/>
1515
<library name="libfcgi" location="..\..\..\..\..\libfcgi\libfcgi.ecf"/>
16-
<cluster name="src" location=".\" recursive="true"/>
16+
<cluster name="src" location="..\..\..\..\..\ewsgi\connectors\libfcgi\src" recursive="true">
17+
<file_rule>
18+
<exclude>/wgi_.*_handler.e$</exclude>
19+
<exclude>/wgi_.*_connector.e$</exclude>
20+
<exclude>/.*_service.e$</exclude>
21+
</file_rule>
22+
</cluster>
23+
<cluster name="src_v0" location=".\" recursive="true"/>
1724
</target>
1825
</system>

library/server/obsolete/v0/ewsgi/connectors/nino/nino.ecf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@
2323
<exclude>/.*_service.e$</exclude>
2424
</file_rule>
2525
</cluster>
26-
<cluster name="src" location=".\src\" recursive="true"/>
26+
<cluster name="src_v0" location=".\src\" recursive="true" />
2727
</target>
2828
</system>

library/server/wsf/src/wsf_request.e

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ inherit
4141
{NONE} all
4242
end
4343

44-
create {WSF_TO_WGI_SERVICE, WSF_EXECUTION, WGI_EXPORTER}
44+
create {WSF_EXECUTION, WGI_EXPORTER}
4545
make_from_wgi
4646

4747
convert

tests/all-safe.ecf

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,21 @@
6060
<library name="wsf_router_context" location="..\library\server\wsf\wsf_router_context-safe.ecf" readonly="false"/>
6161
<library name="wsf_session" location="..\library\server\wsf\wsf_session-safe.ecf" readonly="false"/>
6262
</target>
63+
<target name="all_none" extends="all">
64+
<description>Compiling with None concurrency</description>
65+
<root all_classes="true"/>
66+
<setting name="concurrency" value="none"/>
67+
</target>
6368
<target name="all_scoop" extends="all">
6469
<description>Compiling with SCOOP concurrency</description>
6570
<root all_classes="true"/>
6671
<setting name="concurrency" value="scoop"/>
6772
</target>
73+
<target name="all_mt" extends="all">
74+
<description>Compiling with Eiffel Thread concurrency</description>
75+
<root all_classes="true"/>
76+
<setting name="concurrency" value="thread"/>
77+
</target>
6878
<target name="all_windows" extends="all">
6979
<description>Compiling as Windows , on other platforms than Windows</description>
7080
<root all_classes="true"/>

0 commit comments

Comments
 (0)