connman - fill in missing content of error and req browser reqeusts

these wwre not filled in. fill them in.
This commit is contained in:
Carsten Haitzler 2021-04-19 11:43:11 +01:00
parent e8d964322a
commit 18c0fb89cf
1 changed files with 18 additions and 2 deletions

View File

@ -302,15 +302,31 @@ _agent_release(const Eldbus_Service_Interface *iface,
static Eldbus_Message *
_agent_report_error(const Eldbus_Service_Interface *iface EINA_UNUSED,
const Eldbus_Message *msg EINA_UNUSED)
const Eldbus_Message *msg)
{
const char *txt = NULL;
if (eldbus_message_arguments_get(msg, "s", &txt))
{
e_util_dialog_show(_("Connman Error"), "%s", txt);
}
return NULL;
}
static Eldbus_Message *
_agent_request_browser(const Eldbus_Service_Interface *iface EINA_UNUSED,
const Eldbus_Message *msg EINA_UNUSED)
const Eldbus_Message *msg)
{
const char *url = NULL;
if (eldbus_message_arguments_get(msg, "s", &url))
{
char buf[PATH_MAX * 2];
snprintf(buf, sizeof(buf), "%s/enlightenment_open %s",
e_prefix_bin_get(), e_util_filename_escape(url));
e_util_exe_safe_run(buf, NULL);
}
return NULL;
}