"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "test/fdpass.c" between
dbus-1.13.14.tar.xz and dbus-1.13.16.tar.xz

About: D-Bus is an inter-process communication (IPC) system, allowing multiple, concurrently-running applications to communicate with one another. D-Bus supplies both a system daemon and a per-user-login-session daemon. Development version.

fdpass.c  (dbus-1.13.14.tar.xz):fdpass.c  (dbus-1.13.16.tar.xz)
skipping to change at line 95 skipping to change at line 95
DBusConnection *left_client_conn; DBusConnection *left_client_conn;
DBusConnection *left_server_conn; DBusConnection *left_server_conn;
DBusConnection *right_server_conn; DBusConnection *right_server_conn;
DBusConnection *right_client_conn; DBusConnection *right_client_conn;
/* queue of DBusMessage received by right_client_conn */ /* queue of DBusMessage received by right_client_conn */
GQueue messages; GQueue messages;
int fd_before; int fd_before;
DBusInitialFDs *initial_fds;
} Fixture; } Fixture;
static void oom (const gchar *doing) G_GNUC_NORETURN; static void oom (const gchar *doing) G_GNUC_NORETURN;
static void static void
oom (const gchar *doing) oom (const gchar *doing)
{ {
g_error ("out of memory (%s)", doing); g_error ("out of memory (%s)", doing);
abort (); abort ();
} }
skipping to change at line 179 skipping to change at line 180
static void static void
test_connect (Fixture *f, test_connect (Fixture *f,
gboolean should_support_fds) gboolean should_support_fds)
{ {
char *address; char *address;
if (f->skip) if (f->skip)
return; return;
f->initial_fds = _dbus_check_fdleaks_enter ();
g_assert (f->left_server_conn == NULL); g_assert (f->left_server_conn == NULL);
g_assert (f->right_server_conn == NULL); g_assert (f->right_server_conn == NULL);
address = dbus_server_get_address (f->server); address = dbus_server_get_address (f->server);
g_assert (address != NULL); g_assert (address != NULL);
f->left_client_conn = dbus_connection_open_private (address, &f->e); f->left_client_conn = dbus_connection_open_private (address, &f->e);
assert_no_error (&f->e); assert_no_error (&f->e);
g_assert (f->left_client_conn != NULL); g_assert (f->left_client_conn != NULL);
test_connection_setup (f->ctx, f->left_client_conn); test_connection_setup (f->ctx, f->left_client_conn);
skipping to change at line 878 skipping to change at line 881
f->server = NULL; f->server = NULL;
} }
if (f->ctx != NULL) if (f->ctx != NULL)
test_main_context_unref (f->ctx); test_main_context_unref (f->ctx);
#ifdef HAVE_UNIX_FD_PASSING #ifdef HAVE_UNIX_FD_PASSING
if (f->fd_before >= 0 && close (f->fd_before) < 0) if (f->fd_before >= 0 && close (f->fd_before) < 0)
g_error ("%s", g_strerror (errno)); g_error ("%s", g_strerror (errno));
#endif #endif
/* TODO: It would be nice if we could ask GLib which test-case
* we're currently in */
if (f->initial_fds != NULL)
_dbus_check_fdleaks_leave (f->initial_fds, "next test-case");
} }
int int
main (int argc, main (int argc,
char **argv) char **argv)
{ {
int ret; int ret;
test_init (&argc, &argv); test_init (&argc, &argv);
 End of changes. 3 change blocks. 
0 lines changed or deleted 8 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)