From: Patrik Flykt <[email protected]>
Hi,
This patch set implements Agent API ReportError method call. v2 is updated to
use D-Bus name net.connman.
Error names have been updated to use an net.connman.Agent prefix, as object
paths were found not to be a valid component in an error name. A
'service_complete' helper function has been created, it is needed later on in
the patch set.
__connman_agent_report_error has been implemented taking a callback function
and user data argument. A ReportError method call is created and sent, and
the specified Error.Retry D-Bus error is used to decide whether to retry the
same service or not.
The error reporting functionality is triggered from service.c for a service
state set to CONNMAN_SERVICE_STATE_FAILURE. Error strings are created with
error2string, please comment if such use of the existing error names is ok.
Also the bottom half of __connman_service_indicate_state after the
'service_complete' function is run every time, also on a retry. I haven't
seen any problems so far with my limited testing, other people with
better knowledge may want to take another look whether that's sane or not.
Finally there is ReportError support for test/simple-agent.
Cheers,
Patrik
Patrik Flykt (5):
Fix Agent API error definitions
Create service_complete helper function.
Agent API ReportError method call
Call __connman_agent_report_error when a service fails to connect.
simple-agent support for ReportError method call
doc/agent-api.txt | 4 +-
src/agent.c | 85 +++++++++++++++++++++++++++++++++++++++++++++++++++++
src/connman.h | 7 ++++-
src/service.c | 39 +++++++++++++++++++-----
test/simple-agent | 15 +++++++++
5 files changed, 139 insertions(+), 11 deletions(-)
--
1.7.2.3
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman