Thus it will be possible afterwards to implement RequestPeerError very
simply.
---
include/agent.h | 4 ++++
src/agent.c | 17 +++++++++++++----
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/include/agent.h b/include/agent.h
index 05462df..6961f7a 100644
--- a/include/agent.h
+++ b/include/agent.h
@@ -52,6 +52,10 @@ void connman_agent_driver_unregister(struct
connman_agent_driver *driver);
typedef void (* report_error_cb_t) (void *user_context,
bool retry, void *user_data);
+int connman_agent_report_error_full(void *user_context, const char *path,
+ const char *method, const char *error,
+ report_error_cb_t callback,
+ const char *dbus_sender, void *user_data);
int connman_agent_report_error(void *user_context, const char *path,
const char *error,
report_error_cb_t callback,
diff --git a/src/agent.c b/src/agent.c
index 90ff670..a340026 100644
--- a/src/agent.c
+++ b/src/agent.c
@@ -367,8 +367,8 @@ out:
g_free(report_error);
}
-int connman_agent_report_error(void *user_context, const char *path,
- const char *error,
+int connman_agent_report_error_full(void *user_context, const char *path,
+ const char *method, const char *error,
report_error_cb_t callback,
const char *dbus_sender, void *user_data)
{
@@ -387,8 +387,7 @@ int connman_agent_report_error(void *user_context, const
char *path,
return -ESRCH;
message = dbus_message_new_method_call(agent->owner, agent->path,
- CONNMAN_AGENT_INTERFACE,
- "ReportError");
+ CONNMAN_AGENT_INTERFACE, method);
if (!message)
return -ENOMEM;
@@ -425,6 +424,16 @@ int connman_agent_report_error(void *user_context, const
char *path,
return -EINPROGRESS;
}
+int connman_agent_report_error(void *user_context, const char *path,
+ const char *error,
+ report_error_cb_t callback,
+ const char *dbus_sender, void *user_data)
+{
+ return connman_agent_report_error_full(user_context, path,
+ "ReportError", error, callback, dbus_sender,
+ user_data);
+}
+
static gint compare_priority(gconstpointer a, gconstpointer b)
{
const struct connman_agent_driver *driver1 = a;
--
1.8.5.5
_______________________________________________
connman mailing list
[email protected]
https://lists.connman.net/mailman/listinfo/connman