projects
/
platform
/
core
/
uifw
/
at-spi2-atk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
When a client is removed, don't continue looking through the list of clients
[platform/core/uifw/at-spi2-atk.git]
/
dbind
/
dbtest.c
diff --git
a/dbind/dbtest.c
b/dbind/dbtest.c
index
9a3ae86
..
d00486a
100644
(file)
--- a/
dbind/dbtest.c
+++ b/
dbind/dbtest.c
@@
-1,9
+1,7
@@
#include <stdio.h>
#include <glib.h>
#include <string.h>
#include <stdio.h>
#include <glib.h>
#include <string.h>
-#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbind/dbind.h>
#include <dbind/dbind.h>
-#include <dbind/dbind-any.h>
/* Wow! dbus is unpleasant to use */
/* Wow! dbus is unpleasant to use */
@@
-341,7
+339,7
@@
void test_marshalling ()
fprintf (stderr, "Marshalling ok\n");
}
fprintf (stderr, "Marshalling ok\n");
}
-void test_teamspaces (DB
indContext *ctx
)
+void test_teamspaces (DB
usConnection *bus
)
{
GArray *spaces;
DBusError error;
{
GArray *spaces;
DBusError error;
@@
-353,9
+351,14
@@
void test_teamspaces (DBindContext *ctx)
} TeamSpace;
dbus_error_init (&error);
} TeamSpace;
dbus_error_init (&error);
- if (!dbind_context_method_call (ctx, NULL, DESKICE_PATH, DESKICE_NAMESPACE,
- "GetTeamList", &error,
- "=>a(sss)", &spaces)) {
+ if (!dbind_method_call_reentrant (bus,
+ NULL,
+ DESKICE_PATH,
+ DESKICE_NAMESPACE,
+ "GetTeamList",
+ &error,
+ "=>a(sss)",
+ &spaces)) {
fprintf (stderr, "Error getting team spaces %s: %s\n",
error.name, error.message);
dbus_error_free (&error);
fprintf (stderr, "Error getting team spaces %s: %s\n",
error.name, error.message);
dbus_error_free (&error);
@@
-375,8
+378,6
@@
void test_teamspaces (DBindContext *ctx)
dbind_any_free_ptr ("a(sss)", spaces);
}
dbind_any_free_ptr ("a(sss)", spaces);
}
-extern dbind_find_c_alignment (char *type);
-
void test_helpers ()
{
dbind_find_c_alignment ("(sss)");
void test_helpers ()
{
dbind_find_c_alignment ("(sss)");
@@
-387,17
+388,16
@@
void test_helpers ()
int main (int argc, char **argv)
{
int main (int argc, char **argv)
{
- DBindContext *ctx;
+ DBusConnection *bus;
+ DBusError err;
+
+ dbus_error_init (&err);
- ctx = dbind_create_context (DBUS_BUS_SESSION, NULL);
- if (!ctx)
- return 1;
+ bus = dbus_bus_get (DBUS_BUS_SESSION, &err);
test_helpers ();
test_marshalling ();
test_helpers ();
test_marshalling ();
- test_teamspaces (ctx);
-
- dbind_context_free (ctx);
+ test_teamspaces (bus);
return 0;
}
return 0;
}