Home My Page Projects Code Snippets Project Openings DPWS Core
Summary Activity Forums Tracker Tasks Docs Surveys News SCM Files Mediawiki

[#406] dpws_process_request end in infinite loop

Date:
2014-03-17 10:14
Priority:
3
State:
Open
Submitted by:
Jiří Faist (jurafa)
Assigned to:
Stéphane ROUGES (srouges)
Target Fix Version:
none
Product:
none
Operating System:
none
Component:
DCXML
Version:
v2.5.0
Severity:
enhancement
Resolution:
Awaiting Response
Hardware:
none
URL:
Summary:
dpws_process_request end in infinite loop

Detailed description
When using generic skeletons, dpws_process_request calls the given callback function in which a parsing of incoming message is supposed to tak place. However if the EPX parser reaches the end of the body of the message by reaching the EPX_EVT_END_FRAGMENT event, than back in the dpws_process_request function at the line 122 there is a for cyclus, that consumes events that were not read and this cycle waits for the EPX_EVT_END_FRAGMENT which has been already read and thus the program ends in an infinite loop. The condition for exiting the loop shoud contain EPX_EVT_END_FRAGMENT && EPX_EVT_IDLE && EPX_EVT_ERROR I think.
Message  ↓
Date: 2014-03-21 08:29
Sender: Stéphane ROUGES

Hi Jiri,

I agree that adding your test would be safer. However, I'm interested by some more details because from what I see, dpws_process_request() does not consume the first event since it uses epx_get_event() before testing and only calls epx_next() if test fails.
Are you sure that your custom payload processor does not consume events after EPX_EVT_END_FRAGMENT ?

BR,

Stéphane

Field Old Value Date By
VersionNone2014-03-21 08:29srouges
SeverityNone2014-03-21 08:29srouges
ResolutionNone2014-03-21 08:29srouges
assigned_tonone2014-03-21 08:29srouges
ComponentNone2014-03-21 08:29srouges