- Check if the return type of the error message is string

- Add test with error


SVN revision: 24238
This commit is contained in:
sebastid 2006-07-27 15:34:16 +00:00 committed by sebastid
parent 48e23af633
commit e1219aaf40
2 changed files with 9 additions and 1 deletions

View File

@ -58,6 +58,14 @@ ecore_dbus_event_server_add(void *udata, int ev_type, void *ev)
ecore_dbus_method_list_names(event->server,
ecore_dbus_method_list_names_cb,
ecore_dbus_method_error_cb, NULL);
ecore_dbus_message_new_method_call(event->server,
"org.freedesktop.DBus" /*destination*/,
"/org/freedesktop/DBus" /*path*/,
"org.freedesktop.DBus" /*interface*/,
"ListName" /*method*/,
ecore_dbus_method_list_names_cb,
ecore_dbus_method_error_cb, NULL,
NULL /*fmt*/);
return 0;
}

View File

@ -385,7 +385,7 @@ _ecore_dbus_event_server_data(void *udata, int ev_type, void *ev)
if ((sent) && (sent->cb.error))
{
char *error = NULL;
if (ev2->args)
if ((ev2->args) && (ev2->args[0].type == ECORE_DBUS_DATA_TYPE_STRING))
error = ev2->args[0].value;
sent->cb.error(sent->cb.data, error);
}