Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
dbus
dbus
Commits
960fef84
Commit
960fef84
authored
Apr 03, 2008
by
John Palmieri
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
git+ssh://johnp@git.freedesktop.org/git/dbus/dbus
Conflicts: ChangeLog
parents
a3740411
68f69d38
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
24 deletions
+69
-24
ChangeLog
ChangeLog
+41
-0
bus/dir-watch-inotify.c
bus/dir-watch-inotify.c
+3
-3
dbus/dbus-bus.c
dbus/dbus-bus.c
+6
-6
tools/dbus-launch-x11.c
tools/dbus-launch-x11.c
+5
-5
tools/dbus-launch.c
tools/dbus-launch.c
+13
-5
tools/dbus-send.c
tools/dbus-send.c
+1
-5
No files found.
ChangeLog
View file @
960fef84
2008-04-01 Timo Hoenig <thoenig@suse.de>
Patch from Frederic Crozat <fcrozat@mandriva.com>
* bus/dir-watch-inotify.c (bus_watch_directory): Only monitor
IN_CLOSE_WRITE, IN_DELETE, IN_MOVE_TO and IN_MOVE_FROM events. This
way, only atomic changes to configuration file are monitored.
* bus/dir-watch-inotify.c (_handle_inotify_watch): Fix typo in
_dbus_verbose function call
* bus/dir-watch-inotify.c (bus_drop_all_directory_watches): Use
_dbus_strerror instead of perror
2008-03-04 Havoc Pennington <hp@redhat.com>
* bus/connection.c, bus/expirelist.c: Make the BusExpireList
...
...
@@ -8,6 +20,35 @@
updated, since we need to e.g. take some action whenever adding
and removing stuff from the expire list.
2008-03-31 Colin Walters <walters@verbum.org>
Patch from Owen Taylor <otaylor@redhat.com>
* tools/dbus-launch-x11.c: Check for X11 events before
selecting (FDO bug #15293)
2008-03-31 Colin Walters <walters@verbum.org>
Patch from Owen Taylor <otaylor@redhat.com>
* tools/dbus-launch-x11.c: Make sure we call XFlush()
on all code paths (FDO bug #15293)
2008-03-27 Havoc Pennington <hp@redhat.com>
* tools/dbus-send.c (append_dict): Do not provide a signature to
dbus_message_iter_open_container() when opening a dict entry.
2008-03-26 Colin Walters <walters@verbum.org>
Patch from Scott James Remnant <scott@netsplit.com>
* dbus/dbus-bus.c: Set default exit_on_disconnect after registration with
the bus, not before. This ensures that programs which wish to set
exit_on_disconnect to FALSE will not be terminated if the bus exits
during registration. (FDO Bug #15112)
>>>>>>> 68f69d38182ed5974984b0434086e6a288b477cb:ChangeLog
2008-03-04 John (J5) Palmieri <johnp@redhat.com>
* fix broken poll on Mac OSX - build patch by Benjamin Reed
...
...
bus/dir-watch-inotify.c
View file @
960fef84
...
...
@@ -64,7 +64,7 @@ _handle_inotify_watch (DBusWatch *watch, unsigned int flags, void *data)
ret
=
read
(
inotify_fd
,
buffer
,
INOTIFY_BUF_LEN
);
if
(
ret
<
0
)
_dbus_verbose
(
"Error reading inotify event: '%s'
\n
, _dbus_strerror(errno)
"
);
_dbus_verbose
(
"Error reading inotify event: '%s'
\n
"
,
_dbus_strerror
(
errno
));
else
if
(
!
ret
)
_dbus_verbose
(
"Error reading inotify event: buffer too small
\n
"
);
...
...
@@ -134,7 +134,7 @@ bus_watch_directory (const char *dir, BusContext *context)
goto
out
;
}
wd
=
inotify_add_watch
(
inotify_fd
,
dir
,
IN_
MODIFY
|
IN_
CREA
TE
|
IN_
DELETE
);
wd
=
inotify_add_watch
(
inotify_fd
,
dir
,
IN_
CLOSE_WRITE
|
IN_
DELE
TE
|
IN_
MOVED_TO
|
IN_MOVED_FROM
);
if
(
wd
<
0
)
{
_dbus_warn
(
"Cannot setup inotify for '%s'; error '%s'
\n
"
,
dir
,
_dbus_strerror
(
errno
));
...
...
@@ -156,7 +156,7 @@ bus_drop_all_directory_watches (void)
_dbus_verbose
(
"Dropping all watches on config directories
\n
"
);
ret
=
close
(
inotify_fd
);
if
(
ret
)
_dbus_verbose
(
"Error dropping watches: '%s'
\n
"
,
p
error
(
ret
));
_dbus_verbose
(
"Error dropping watches: '%s'
\n
"
,
_dbus_str
error
(
errno
));
num_wds
=
0
;
inotify_fd
=
-
1
;
...
...
dbus/dbus-bus.c
View file @
960fef84
...
...
@@ -436,12 +436,6 @@ internal_bus_get (DBusBusType type,
return
NULL
;
}
/* By default we're bound to the lifecycle of
* the message bus.
*/
dbus_connection_set_exit_on_disconnect
(
connection
,
TRUE
);
if
(
!
dbus_bus_register
(
connection
,
error
))
{
_DBUS_ASSERT_ERROR_IS_SET
(
error
);
...
...
@@ -461,6 +455,12 @@ internal_bus_get (DBusBusType type,
bus_connections
[
type
]
=
connection
;
}
/* By default we're bound to the lifecycle of
* the message bus.
*/
dbus_connection_set_exit_on_disconnect
(
connection
,
TRUE
);
_DBUS_LOCK
(
bus_datas
);
bd
=
ensure_bus_data
(
connection
);
_dbus_assert
(
bd
!=
NULL
);
/* it should have been created on
...
...
tools/dbus-launch-x11.c
View file @
960fef84
...
...
@@ -341,7 +341,7 @@ static Window
set_address_in_x11
(
char
*
address
,
pid_t
pid
)
{
char
*
current_address
;
Window
wid
;
Window
wid
=
None
;
unsigned
long
pid32
;
/* Xlib property functions want _long_ not 32-bit for format "32" */
/* lock the X11 display to make sure we're doing this atomically */
...
...
@@ -350,16 +350,14 @@ set_address_in_x11(char *address, pid_t pid)
if
(
!
x11_get_address
(
&
current_address
,
NULL
,
NULL
))
{
/* error! */
XUngrabServer
(
xdisplay
);
return
None
;
goto
out
;
}
if
(
current_address
!=
NULL
)
{
/* someone saved the address in the meantime */
XUngrabServer
(
xdisplay
);
free
(
current_address
);
return
None
;
goto
out
;
}
/* Create our window */
...
...
@@ -378,9 +376,11 @@ set_address_in_x11(char *address, pid_t pid)
/* Now grab the selection */
XSetSelectionOwner
(
xdisplay
,
selection_atom
,
wid
,
CurrentTime
);
out:
/* Ungrab the server to let other people use it too */
XUngrabServer
(
xdisplay
);
/* And make sure that the ungrab gets sent to X11 */
XFlush
(
xdisplay
);
return
wid
;
...
...
tools/dbus-launch.c
View file @
960fef84
...
...
@@ -458,6 +458,17 @@ kill_bus_when_session_ends (void)
while
(
TRUE
)
{
#ifdef DBUS_BUILD_X11
/* Dump events on the floor, and let
* IO error handler run if we lose
* the X connection. It's important to
* run this before going into select() since
* we might have queued outgoing messages or
* events.
*/
x11_handle_event
();
#endif
FD_ZERO
(
&
read_set
);
FD_ZERO
(
&
err_set
);
...
...
@@ -472,7 +483,7 @@ kill_bus_when_session_ends (void)
FD_SET
(
x_fd
,
&
read_set
);
FD_SET
(
x_fd
,
&
err_set
);
}
select
(
MAX
(
tty_fd
,
x_fd
)
+
1
,
&
read_set
,
NULL
,
&
err_set
,
NULL
);
...
...
@@ -483,15 +494,12 @@ kill_bus_when_session_ends (void)
}
#ifdef DBUS_BUILD_X11
/* Dump events on the floor, and let
* IO error handler run if we lose
* the X connection
/* Events will be processed before we select again
*/
if
(
x_fd
>=
0
)
verbose
(
"X fd condition reading = %d error = %d
\n
"
,
FD_ISSET
(
x_fd
,
&
read_set
),
FD_ISSET
(
x_fd
,
&
err_set
));
x11_handle_event
();
#endif
if
(
tty_fd
>=
0
)
...
...
tools/dbus-send.c
View file @
960fef84
...
...
@@ -150,14 +150,10 @@ append_dict (DBusMessageIter *iter, int keytype, int valtype, const char *value)
while
(
val
!=
NULL
)
{
DBusMessageIter
subiter
;
char
sig
[
3
];
sig
[
0
]
=
keytype
;
sig
[
1
]
=
valtype
;
sig
[
2
]
=
'\0'
;
dbus_message_iter_open_container
(
iter
,
DBUS_TYPE_DICT_ENTRY
,
sig
,
NULL
,
&
subiter
);
append_arg
(
&
subiter
,
keytype
,
val
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment