Commit f6f1c5f8 authored by Simon McVittie's avatar Simon McVittie

Merge tag 'upstream/1.6.0'

Upstream version 1.6.0
parents 5f2e21f2 5f848773
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
......@@ -38,6 +38,23 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
......@@ -129,6 +146,11 @@ RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
install-pdf-recursive install-ps-recursive install-recursive \
installcheck-recursive installdirs-recursive pdf-recursive \
ps-recursive uninstall-recursive
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
......@@ -542,8 +564,11 @@ distclean-libtool:
-rm -f libtool config.lt
install-pkgconfigDATA: $(pkgconfig_DATA)
@$(NORMAL_INSTALL)
test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)"
@list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
......@@ -728,13 +753,10 @@ distdir: $(DISTFILES)
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
fi; \
done
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
if test "$$subdir" = .; then :; else \
$(am__make_dryrun) \
|| test -d "$(distdir)/$$subdir" \
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|| exit 1; \
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
$(am__relativize); \
new_distdir=$$reldir; \
......
D-Bus 1.6.0 (2012-06-05)
==
The “soul of this machine has improved” release.
This version starts a new stable branch of D-Bus: only bug fixes will
be accepted into 1.6.x. Other changes will now go to the 1.7.x branch.
Summary of changes since 1.4.x:
• New requirements
· PTHREAD_MUTEX_RECURSIVE on Unix
· compiler support for 64-bit integers (int64_t or equivalent)
• D-Bus Specification v0.19
• New dbus-daemon features
· <allow own_prefix="com.example.Service"/> rules allow the service to
own names like com.example.Service.Instance3
· optional systemd integration when checking at_console policies
· --nopidfile option, mainly for use by systemd
· path_namespace and arg0namespace may appear in match rules
· eavesdropping is disabled unless the match rule contains eavesdrop=true
• New public API
· functions to validate various string types (dbus_validate_path() etc.)
· dbus_type_is_valid()
· DBusBasicValue, a union of every basic type
• Bug fixes
· removed an unsafe reimplementation of recursive mutexes
· dbus-daemon no longer busy-loops if it has far too many file descriptors
· dbus-daemon.exe --print-address works on Windows
· all the other bug fixes from 1.4.20
• Other major implementation changes
· on Linux, dbus-daemon uses epoll if supported, for better scalability
· dbus_threads_init() ignores its argument and behaves like
dbus_threads_init_default() instead
· removed the per-connection link cache, improving dbus-daemon performance
• Developer features
· optional Valgrind instrumentation (--with-valgrind)
· optional Stats interface on the dbus-daemon (--enable-stats)
· optionally abort whenever malloc() fails (--enable-embedded-tests
and export DBUS_MALLOC_CANNOT_FAIL=1)
Changes since 1.5.12:
• Be more careful about monotonic time vs. real time, fixing DBUS_COOKIE_SHA1
spec-compliance (fd.o #48580, David Zeuthen)
• Don't use install(1) within the source/build trees, fixing the build as
non-root when using OpenBSD install(1) (fd.o #48217, Antoine Jacoutot)
• Add missing commas in some tcp and nonce-tcp addresses, and remove
an unused duplicate copy of the nonce-tcp transport in Windows builds
(fd.o #45896, Simon McVittie)
D-Bus 1.5.12 (2012-03-27)
==
......
# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# generated automatically by aclocal 1.11.5 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
......@@ -14,8 +14,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
[m4_warning([this file was generated for autoconf 2.68.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
[m4_warning([this file was generated for autoconf 2.69.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
......@@ -38,7 +38,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
m4_if([$1], [1.11.3], [],
m4_if([$1], [1.11.5], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
......@@ -54,7 +54,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
[AM_AUTOMAKE_VERSION([1.11.3])dnl
[AM_AUTOMAKE_VERSION([1.11.5])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
......
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
......@@ -18,6 +18,23 @@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
......@@ -266,6 +283,11 @@ DIST_SOURCES = $(am__bus_test_SOURCES_DIST) \
$(am__dbus_daemon_SOURCES_DIST) \
$(am__dbus_daemon_launch_helper_SOURCES_DIST) \
$(am__dbus_daemon_launch_helper_test_SOURCES_DIST)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
DATA = $(agent_DATA) $(config_DATA) $(systemdsystemunit_DATA)
ETAGS = etags
CTAGS = ctags
......@@ -706,8 +728,11 @@ dbus.socket: $(top_builddir)/config.status $(srcdir)/dbus.socket.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-dbus_daemon_execPROGRAMS: $(dbus_daemon_exec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(dbus_daemon_execdir)" || $(MKDIR_P) "$(DESTDIR)$(dbus_daemon_execdir)"
@list='$(dbus_daemon_exec_PROGRAMS)'; test -n "$(dbus_daemon_execdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dbus_daemon_execdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dbus_daemon_execdir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
......@@ -749,8 +774,11 @@ clean-dbus_daemon_execPROGRAMS:
rm -f $$list
install-libexecPROGRAMS: $(libexec_PROGRAMS)
@$(NORMAL_INSTALL)
test -z "$(libexecdir)" || $(MKDIR_P) "$(DESTDIR)$(libexecdir)"
@list='$(libexec_PROGRAMS)'; test -n "$(libexecdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(libexecdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libexecdir)" || exit 1; \
fi; \
for p in $$list; do echo "$$p $$p"; done | \
sed 's/$(EXEEXT)$$//' | \
while read p p1; do if test -f $$p || test -f $$p1; \
......@@ -819,8 +847,11 @@ dbus-daemon-launch-helper-test$(EXEEXT): $(dbus_daemon_launch_helper_test_OBJECT
$(AM_V_CCLD)$(LINK) $(dbus_daemon_launch_helper_test_OBJECTS) $(dbus_daemon_launch_helper_test_LDADD) $(LIBS)
install-binSCRIPTS: $(bin_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
@list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
......@@ -851,8 +882,11 @@ uninstall-binSCRIPTS:
dir='$(DESTDIR)$(bindir)'; $(am__uninstall_files_from_dir)
install-initdSCRIPTS: $(initd_SCRIPTS)
@$(NORMAL_INSTALL)
test -z "$(initddir)" || $(MKDIR_P) "$(DESTDIR)$(initddir)"
@list='$(initd_SCRIPTS)'; test -n "$(initddir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(initddir)'"; \
$(MKDIR_P) "$(DESTDIR)$(initddir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
......@@ -1185,8 +1219,11 @@ clean-libtool:
-rm -rf .libs _libs
install-agentDATA: $(agent_DATA)
@$(NORMAL_INSTALL)
test -z "$(agentdir)" || $(MKDIR_P) "$(DESTDIR)$(agentdir)"
@list='$(agent_DATA)'; test -n "$(agentdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(agentdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(agentdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
......@@ -1203,8 +1240,11 @@ uninstall-agentDATA:
dir='$(DESTDIR)$(agentdir)'; $(am__uninstall_files_from_dir)
install-configDATA: $(config_DATA)
@$(NORMAL_INSTALL)
test -z "$(configdir)" || $(MKDIR_P) "$(DESTDIR)$(configdir)"
@list='$(config_DATA)'; test -n "$(configdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(configdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(configdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
......@@ -1221,8 +1261,11 @@ uninstall-configDATA:
dir='$(DESTDIR)$(configdir)'; $(am__uninstall_files_from_dir)
install-systemdsystemunitDATA: $(systemdsystemunit_DATA)
@$(NORMAL_INSTALL)
test -z "$(systemdsystemunitdir)" || $(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)"
@list='$(systemdsystemunit_DATA)'; test -n "$(systemdsystemunitdir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(systemdsystemunitdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(systemdsystemunitdir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
......
......@@ -606,8 +606,8 @@ bus_connections_setup_connection (BusConnections *connections,
d->connections = connections;
d->connection = connection;
_dbus_get_current_time (&d->connection_tv_sec,
&d->connection_tv_usec);
_dbus_get_monotonic_time (&d->connection_tv_sec,
&d->connection_tv_usec);
_dbus_assert (connection_data_slot >= 0);
......@@ -776,7 +776,7 @@ bus_connections_expire_incomplete (BusConnections *connections)
DBusList *link;
int auth_timeout;
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_monotonic_time (&tv_sec, &tv_usec);
auth_timeout = bus_context_get_auth_timeout (connections->context);
link = _dbus_list_get_first_link (&connections->incomplete);
......@@ -1772,8 +1772,8 @@ bus_connections_expect_reply (BusConnections *connections,
cprd->pending = pending;
cprd->connections = connections;
_dbus_get_current_time (&pending->expire_item.added_tv_sec,
&pending->expire_item.added_tv_usec);
_dbus_get_monotonic_time (&pending->expire_item.added_tv_sec,
&pending->expire_item.added_tv_usec);
_dbus_verbose ("Added pending reply %p, replier %p receiver %p serial %u\n",
pending,
......
......@@ -123,9 +123,9 @@ bus_expire_list_recheck_immediately (BusExpireList *list)
}
static int
do_expiration_with_current_time (BusExpireList *list,
long tv_sec,
long tv_usec)
do_expiration_with_monotonic_time (BusExpireList *list,
long tv_sec,
long tv_usec)
{
DBusList *link;
int next_interval, min_wait_time, items_to_expire;
......@@ -194,9 +194,9 @@ bus_expirelist_expire (BusExpireList *list)
{
long tv_sec, tv_usec;
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_monotonic_time (&tv_sec, &tv_usec);
next_interval = do_expiration_with_current_time (list, tv_sec, tv_usec);
next_interval = do_expiration_with_monotonic_time (list, tv_sec, tv_usec);
}
bus_expire_timeout_set_interval (list->timeout, next_interval);
......@@ -340,7 +340,7 @@ bus_expire_list_test (const DBusString *test_data_dir)
test_expire_func, NULL);
_dbus_assert (list != NULL);
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_monotonic_time (&tv_sec, &tv_usec);
tv_sec_not_expired = tv_sec;
tv_usec_not_expired = tv_usec;
......@@ -367,22 +367,22 @@ bus_expire_list_test (const DBusString *test_data_dir)
_dbus_assert_not_reached ("out of memory");
next_interval =
do_expiration_with_current_time (list, tv_sec_not_expired,
tv_usec_not_expired);
do_expiration_with_monotonic_time (list, tv_sec_not_expired,
tv_usec_not_expired);
_dbus_assert (item->expire_count == 0);
_dbus_verbose ("next_interval = %d\n", next_interval);
_dbus_assert (next_interval == 1);
next_interval =
do_expiration_with_current_time (list, tv_sec_expired,
tv_usec_expired);
do_expiration_with_monotonic_time (list, tv_sec_expired,
tv_usec_expired);
_dbus_assert (item->expire_count == 1);
_dbus_verbose ("next_interval = %d\n", next_interval);
_dbus_assert (next_interval == -1);
next_interval =
do_expiration_with_current_time (list, tv_sec_past,
tv_usec_past);
do_expiration_with_monotonic_time (list, tv_sec_past,
tv_usec_past);
_dbus_assert (item->expire_count == 1);
_dbus_verbose ("next_interval = %d\n", next_interval);
_dbus_assert (next_interval == 1000 + EXPIRE_AFTER);
......
This diff is collapsed.
......@@ -2,8 +2,8 @@ dnl -*- mode: m4 -*-
AC_PREREQ([2.63])
m4_define([dbus_major_version], [1])
m4_define([dbus_minor_version], [5])
m4_define([dbus_micro_version], [12])
m4_define([dbus_minor_version], [6])
m4_define([dbus_micro_version], [0])
m4_define([dbus_version],
[dbus_major_version.dbus_minor_version.dbus_micro_version])
AC_INIT([dbus],[dbus_version],[https://bugs.freedesktop.org/enter_bug.cgi?product=dbus],[dbus])
......@@ -36,7 +36,7 @@ LT_CURRENT=10
## increment any time the source changes; set to
## 0 if you increment CURRENT
LT_REVISION=0
LT_REVISION=1
## increment if any interfaces have been added; set to 0
## if any interfaces have been changed or removed. removal has
......
# Makefile.in generated by automake 1.11.3 from Makefile.am.
# Makefile.in generated by automake 1.11.5 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
......@@ -18,6 +18,23 @@
VPATH = @srcdir@
am__make_dryrun = \
{ \
am__dry=no; \
case $$MAKEFLAGS in \
*\\[\ \ ]*) \
echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
| grep '^AM OK$$' >/dev/null || am__dry=yes;; \
*) \
for am__flg in $$MAKEFLAGS; do \
case $$am__flg in \
*=*|--*) ;; \
*n*) am__dry=yes; break;; \
esac; \
done;; \
esac; \
test $$am__dry = yes; \
}
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
pkglibdir = $(libdir)/@PACKAGE@
......@@ -350,6 +367,11 @@ SOURCES = $(libdbus_1_la_SOURCES) $(libdbus_internal_la_SOURCES) \
$(dbus_test_SOURCES)
DIST_SOURCES = $(am__libdbus_1_la_SOURCES_DIST) \
$(am__libdbus_internal_la_SOURCES_DIST) $(dbus_test_SOURCES)
am__can_run_installinfo = \
case $$AM_UPDATE_INFO_DIR in \
n|no|NO) false;; \
*) (install-info --version) >/dev/null 2>&1;; \
esac
HEADERS = $(dbusinclude_HEADERS) $(nodist_dbusarchinclude_HEADERS)
ETAGS = etags
CTAGS = ctags
......@@ -861,7 +883,6 @@ dbus-arch-deps.h: $(top_builddir)/config.status $(srcdir)/dbus-arch-deps.h.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
install-libLTLIBRARIES: $(lib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
list2=; for p in $$list; do \
if test -f $$p; then \
......@@ -869,6 +890,8 @@ install-libLTLIBRARIES: $(lib_LTLIBRARIES)
else :; fi; \
done; \
test -z "$$list2" || { \
echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
$(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
}
......@@ -2016,8 +2039,11 @@ clean-libtool:
-rm -rf .libs _libs
install-dbusincludeHEADERS: $(dbusinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(dbusincludedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusincludedir)"
@list='$(dbusinclude_HEADERS)'; test -n "$(dbusincludedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dbusincludedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dbusincludedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
......@@ -2034,8 +2060,11 @@ uninstall-dbusincludeHEADERS:
dir='$(DESTDIR)$(dbusincludedir)'; $(am__uninstall_files_from_dir)
install-nodist_dbusarchincludeHEADERS: $(nodist_dbusarchinclude_HEADERS)
@$(NORMAL_INSTALL)
test -z "$(dbusarchincludedir)" || $(MKDIR_P) "$(DESTDIR)$(dbusarchincludedir)"
@list='$(nodist_dbusarchinclude_HEADERS)'; test -n "$(dbusarchincludedir)" || list=; \
if test -n "$$list"; then \
echo " $(MKDIR_P) '$(DESTDIR)$(dbusarchincludedir)'"; \
$(MKDIR_P) "$(DESTDIR)$(dbusarchincludedir)" || exit 1; \
fi; \
for p in $$list; do \
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
echo "$$d$$p"; \
......
......@@ -2388,7 +2388,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
* below
*/
timeout = _dbus_pending_call_get_timeout_unlocked (pending);
_dbus_get_current_time (&start_tv_sec, &start_tv_usec);
_dbus_get_monotonic_time (&start_tv_sec, &start_tv_usec);
if (timeout)
{
timeout_milliseconds = dbus_timeout_get_interval (timeout);
......@@ -2445,7 +2445,7 @@ _dbus_connection_block_pending_call (DBusPendingCall *pending)
return;
}
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_monotonic_time (&tv_sec, &tv_usec);
elapsed_milliseconds = (tv_sec - start_tv_sec) * 1000 +
(tv_usec - start_tv_usec) / 1000;
......
......@@ -660,7 +660,10 @@ _dbus_generate_uuid (DBusGUID *uuid)
{
long now;
_dbus_get_current_time (&now, NULL);
/* don't use monotonic time because the UUID may be saved to disk, e.g.
* it may persist across reboots
*/
_dbus_get_real_time (&now, NULL);
uuid->as_uint32s[DBUS_UUID_LENGTH_WORDS - 1] = DBUS_UINT32_TO_BE (now);
......
......@@ -353,7 +353,7 @@ add_new_key (DBusKey **keys_p,
goto out;
}
_dbus_get_current_time (&timestamp, NULL);
_dbus_get_real_time (&timestamp, NULL);
keys[n_keys-1].id = id;
keys[n_keys-1].creation_time = timestamp;
......@@ -428,7 +428,7 @@ _dbus_keyring_reload (DBusKeyring *keyring,
retval = FALSE;
have_lock = FALSE;
_dbus_get_current_time (&now, NULL);
_dbus_get_real_time (&now, NULL);
if (add_new)
{
......@@ -908,7 +908,7 @@ find_recent_key (DBusKeyring *keyring)
int i;
long tv_sec, tv_usec;
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_real_time (&tv_sec, &tv_usec);
i = 0;
while (i < keyring->n_keys)
......
......@@ -91,8 +91,8 @@ timeout_callback_new (DBusTimeout *timeout)
return NULL;
cb->timeout = timeout;
_dbus_get_current_time (&cb->last_tv_sec,
&cb->last_tv_usec);
_dbus_get_monotonic_time (&cb->last_tv_sec,
&cb->last_tv_usec);
return cb;
}
......@@ -619,7 +619,7 @@ _dbus_loop_iterate (DBusLoop *loop,
unsigned long tv_sec;
unsigned long tv_usec;
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_monotonic_time (&tv_sec, &tv_usec);
link = _dbus_list_get_first_link (&loop->timeouts);
while (link != NULL)
......@@ -728,7 +728,7 @@ _dbus_loop_iterate (DBusLoop *loop,
unsigned long tv_sec;
unsigned long tv_usec;
_dbus_get_current_time (&tv_sec, &tv_usec);
_dbus_get_monotonic_time (&tv_sec, &tv_usec);
/* It'd be nice to avoid this O(n) thingy here */
link = _dbus_list_get_first_link (&loop->timeouts);
......
......@@ -57,33 +57,7 @@ _dbus_server_listen_platform_specific (DBusAddressEntry *entry,
method = dbus_address_entry_get_method (entry);
if (strcmp (method, "nonce-tcp") == 0)
{
const char *host;
const char *port;
const char *bind;
const char *family;
host = dbus_address_entry_get_value (entry, "host");
bind = dbus_address_entry_get_value (entry, "bind");
port = dbus_address_entry_get_value (entry, "port");
family = dbus_address_entry_get_value (entry, "family");
*server_p = _dbus_server_new_for_tcp_socket (host, bind, port,
family, error, TRUE);
if (*server_p)
{
_DBUS_ASSERT_ERROR_IS_CLEAR(error);
return DBUS_SERVER_LISTEN_OK;
}
else
{
_DBUS_ASSERT_ERROR_IS_SET(error);
return DBUS_SERVER_LISTEN_DID_NOT_CONNECT;
}
}
else if (strcmp (method, "autolaunch") == 0)
if (strcmp (method, "autolaunch") == 0)
{
const char *host = "localhost";
const char *bind = "localhost";
......
......@@ -2598,11 +2598,11 @@ _dbus_poll (DBusPollFD *fds,
* available, to avoid problems when the system time changes.
*
* @param tv_sec return location for number of seconds
* @param tv_usec return location for number of microseconds (thousandths)
* @param tv_usec return location for number of microseconds
*/
void
_dbus_get_current_time (long *tv_sec,
long *tv_usec)
_dbus_get_monotonic_time (long *tv_sec,
long *tv_usec)
{
#ifdef HAVE_MONOTONIC_CLOCK
struct timespec ts;
......@@ -2624,6 +2624,27 @@ _dbus_get_current_time (long *tv_sec,
#endif
}
/**
* Get current time, as in gettimeofday(). Never uses the monotonic
* clock.
*
* @param tv_sec return location for number of seconds
* @param tv_usec return location for number of microseconds
*/
void
_dbus_get_real_time (long *tv_sec,
long *tv_usec)
{
struct timeval t;
gettimeofday (&t, NULL);
if (tv_sec)
*tv_sec = t.tv_sec;
if (tv_usec)
*tv_usec = t.tv_usec;
}
/**
* Creates a directory; succeeds if the directory
* is created or already existed.
......
......@@ -1872,14 +1872,15 @@ _dbus_sleep_milliseconds (int milliseconds)
/**
* Get current time, as in gettimeofday().
* Get current time, as in gettimeofday(). Never uses the monotonic
* clock.
*
* @param tv_sec return location for number of seconds
* @param tv_usec return location for number of microseconds
*/
void
_dbus_get_current_time (long *tv_sec,
long *tv_usec)
_dbus_get_real_time (long *tv_sec,
long *tv_usec)
{
FILETIME ft;
dbus_uint64_t time64;
......@@ -1901,6 +1902,20 @@ _dbus_get_current_time (long *tv_sec,
*tv_usec = time64 % 1000000;
}
/**
* Get current time, as in gettimeofday(). Use the monotonic clock if
* available, to avoid problems when the system time changes.
*
* @param tv_sec return location for number of seconds
* @param tv_usec return location for number of microseconds
*/
void
_dbus_get_monotonic_time (long *tv_sec,
long *tv_usec)
{
/* no implementation yet, fall back to wall-clock time */
_dbus_get_real_time (tv_sec, tv_usec);
}
/**
* signal (SIGPIPE, SIG_IGN);
......
......@@ -508,7 +508,7 @@ _dbus_generate_pseudorandom_bytes_buffer (char *buffer,
_dbus_verbose ("Falling back to pseudorandom for %d bytes\n",
n_bytes);
_dbus_get_current_time (NULL, &tv_usec);
_dbus_get_real_time (NULL, &tv_usec);
srand (tv_usec);
i = 0;
......
......@@ -308,8 +308,11 @@ int _dbus_poll (DBusPollFD *fds,
void _dbus_sleep_milliseconds (int milliseconds);
void _dbus_get_current_time (long *tv_sec,
long *tv_usec);
void _dbus_get_monotonic_time (long *tv_sec,
long *tv_usec);
void _dbus_get_real_time (long *tv_sec,
long *tv_usec);
/**
* directory interface
......
......@@ -1337,12 +1337,12 @@ _dbus_transport_new_for_tcp_socket (const char *host,
goto error;
if (family != NULL &&
(!_dbus_string_append (&address, "family=") ||
(!_dbus_string_append (&address, ",family=") ||
!_dbus_string_append (&address, family)))
goto error;