Age | Commit message (Collapse) | Author | Files | Lines |
|
set/getenv() are not thread-safe, and a recent bug report via private
email shows that this does cause segfaults:
Thread 4 (Thread 19251):
....
Thread 1 (Thread 19311):
...
In this case, DLT was used and the setenv call was setting the
LIBSYNTHESIS_<context> variables.
The solution is to avoid setenv() in code which might run in parallel
to other threads:
- DLT-related variables are set at the beginning of
syncevo-dbus-server startup which then gets inherited
by syncevo-dbus-helper and in the environment prepared
for syncevo-local-sync (because the latter might run with
a different log level)
- the default for SYNCEVOLUTION_PBAP_SYNC is now "incremental"
everywhere and SyncContext is told about the special
mode where it needs to keep photo data differently, i.e. setting
SYNCEVOLUTION_PBAP_SYNC in dbus-sync.cpp for PBAP syncing is
no longer necessary
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
This is meant to be used by automated testing, with gdb acting as
wrapper around a command so that stack traces are created
automatically when something goes wrong.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Recent EDS started to exhibit race conditions when opening a database (for
example, https://bugzilla.gnome.org/show_bug.cgi?id=791306). Opening was
already tried again for a certain known error in some old EDS version. Now it
is tried five times with a delay of one second for all errors.
The advantage is that this does not depend on accurately detecting the race
condition error.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
When libcurl was selected instead of libsoup, compilation failed
because the necessary header file was missing and the direct assignment
of a plain pointer to the shared_ptr failed.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Suppressing the warning for all code hid the deprecation warning
about auto_ptr, which is something that should have been fixed
before.
Now only some code still suppresses the warning (GTK UI, Akonadi)
because there is no time to also update and test that part.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
This allows us to get rid of deprecated function calls. We no longer
need to set a default proxy either, the newer libsoup does that itself
by default
(https://developer.gnome.org/libsoup/stable/libsoup-session-porting.html).
Not mentioned in the porting guide is that the based soup session now
has a 60s timeout by default. We don't want to time out.
We also need to quit the event loop explicitly when timing out. Somehow
that wasn't necessary before.
When using the generic SoupSession, it is no longer guaranteed that canceling
an operation invokes the callbacks before returning. Therefore we have to be
prepared for callbacks occuring after destructing the SoupTransportAgent. This
is achieved by storing all SoupTransportAgent in a boost::shared_ptr and
letting the instance know about that with a weak_ptr, which then can be used
by the callbacks.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The helper class is also useful outside of the D-Bus server,
for example in the glib-based SoupTransportAgent.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
auto_ptr has been deprecated for a while now. unique_ptr can
be taken for granted now, so use that instead.
GDBusMessage requires a custom deleter. Not sure how auto_ptr
handled that before.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
This makes it possible to use C++11 features. Choosing C++14 when available
gives us advance warning when something might break under C++14. Test builds
on a system with only C++11 and another with C++14 are needed to ensure that
both really works.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Without them, --enable-warnings=fatal was ignored for the D-Bus test
program, causing deprecation warnings about auto_ptr to be printed
without aborting the build.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Stand-alone events with RECURRENCE-ID get mangled by the server:
it converts the RECURRENCE-ID time to UTC. Reported in:
https://stackoverflow.com/questions/47811670/detached-recurrence-without-parent-event
For now we ignore the error (googlecalendar source) or avoid it (testItems).
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The server started to re-encode the image, thus breaking the strict
comparison that is done for these tests. Normal testing allows such
changes for the Google server by ignoring PHOTO data, but in these
tests we want comparison to be strict, so we have to change the test
data.
The downside is less test coverage.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
shlibs.local was used in combination with explicit ebook/ecal/ical
dependencies to replace the automatic dependencies. It needs to
be maintained together with those explicit dependencies, so it
makes more sense to use a file provided by the code which
calls make to build releases.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
When building and installing backends on additional build platforms, linking
the binaries is both unnecessary and sometimes problematic (for example,
helper libraries not available in a version that works).
Therefore configure arguments can be used to disable linking of the binaries.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
While not necessary (attributes are not read for NOP event), it's
still cleaner to also initialize them. Found with cppcheck.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
It's a local variable in the implementation. Found with cppcheck.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The result of shifting a signed int is undefined. Better operate
on unsigned int of the same size.
Found by clang or cppcheck.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
This is a cut-and-paste error from upstream libsynthesis: an error
code was returned in an error case where a boolean should have been
returned.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Found with clang and/or cppcheck.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
It's good practice to implement the copy operator, even if not needed
at the moment.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Building with recent Clang in C++ mode fails when using the non-standard
typeof operator. We can't rely on the new(ish) decltype yet, so use
the Boost implementation instead.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The only actual error was incorrect nesting of ifdef/endif and comments.
The iterator change avoids a false positive where cppcheck's for correct
begin()/end() comparisons fail. It's also a bit shorter and cleaner.
The copy operator is not needed.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Recent cppcheck warns about m_source not being initialized, which is a false
positive (it's a reference and gets initialized). Inline suppressions did not
work, so instead disable the entire warning for SyncSource.h.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The "waiting for daemon to connect to D-Bus" loop did not check whether daemon
was still running at all, causing testing to get stuck occasionally when the
daemon failed.
THe loop waiting for output already checked that, but can be simplified.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
Sometimes GNOME keyring and libsecret fail to set up the right temporary keys
(https://bugzilla.gnome.org/show_bug.cgi?id=778357). This has been fixed
upstream, but still breaks with the distros used by the automated testing
occassionally.
Retrying the operations after disconnecting from the server is an attempt
to recover from this sporadic error.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The GNOME keyring library has been obsoleted for a long time now,
long enough that the replacement libsecret is available on all
supported distros. Therefore we can switch unconditionally.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
libical v3 removes some deprecated functions (like icaltime_from_timet)
and removes the "is_utc" member from icaltimetype. The replacement
code works with old and new libical and thus needs no ifdefs.
However, that struct is part of the ABI, which impacts the tricks that
syncevolution.org binaries use to get built against libical v2 and then
run with more recent libs like libical v3.
Depending on the platform ABI, it may still be okay, because the calling code
in SyncEvolution reserves and copies enough bytes for the icaltimetype
instances and because that code never directly accesses any member (is_date,
is_daylight, zone) whose offset changes.
Original author: Milan Crha <mcrha@redhat.com>
Slightly modified it so that icaltime_t.zone is not set.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
autotools started creating that after the recent update to Ubuntu
Trusty as main build platform.
|
|
|
|
Mention the TDE desktop, today's date added.
|
|
Switching the testing to Exchange 2016 revealed a slightly
different time zone mangling than before:
- the "US & C" time zone name already gets truncated before the C
- due to recent rules on the server (?), several TZNAMEs get
changed
Updating the data again...
|
|
The more recent activesyncd uses GSetting schema files. We
need to set an env variable if they are nor installed in the
default system location.
|
|
When the TDE notes backend was disabled, the code didn't compile
because the SE_END_CXX wasn't nested properly inside the ifdef/endif.
|
|
The account data was unreferenced once too often, or rather, a suitable ref
count increase was missing. A debug build of glib detects that ("GLib:
g_variant_unref: assertion 'value->ref_count > 0' failed"), but without that
check the code might also crash.
|
|
Prevents the wallet backend from crashing SyncEvolution when
enabled. Functionality not really tested, though.
PIM backend had compile problems when enabled.
|
|
|
|
When a backend is inactive, it is meant to ignore generic types like
"calendar". The idea behind that is that typically users install or
compile just the backends they want, and then ask for the "calendar"
backend using the generic sync templates or instructions.
When adding the TDEPIM calendar backend, that broke because it also
instantiated itself for those terms when active. The other TDEPIM
backends already did this as intended.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The latest activesyncd contains GSettings schema files
which get installed by the top-level makefile, therefore
we have to install everything.
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The *Register.cpp files and everything they include must compile
without hard dependencies on header files which are TDE specific,
so add some ifdefs. Compiling with TDE backends disabled broke
because of this.
When enabled (untested!), it is unclear how some of these *Register.cpp
could have worked without including the header file that defines the
class they instantiate. Added the necessary includes.
A closing } was missing (found by cppcheck, which tests all variations
of the code, not just those currently enabled).
Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
|
|
The notes API changed in TDE 14.1. Also includes several other
enhancements (error checking, testing).
|
|
This is the code for TDE < 14.1.
|
|
|
|
The CreateSource instance can be big, so passing by reference definitely
is better. Found with cppcheck.
|
|
dbus-launch is considered deprecated because of the X11 dependency.
See https://lists.debian.org/debian-devel/2016/08/msg00554.html "Mass bug
filing: use and misuse of dbus-launch (dbus-x11)"
The script still needs to start the D-Bus daemon when used in the nightly
testing, so the code now does it as in
https://github.com/flatpak/flatpak/commit/6cc8062cfb3f9410d54a27e7ccca77c103e441e8
syncevo-http-server still has some usage of dbus-launch left, but that's
strictly for systems which don't have the more modern D-Bus.
|
|
With the recent change ("Add a systemd user service as a backend for the D-Bus
session services"), activating syncevo-dbus-server via D-Bus will integrate
better with systemd. When auto-starting via the .desktop file, we can do the
same by activating via D-Bus.
We use dbus-send for that, if available. A recent busctl from systemd could
also be used, but for example the one in Debian Jessie is still to old. Better
use dbus-send. Directly starting the binary is used as fallback.
Based on a patch from Simon McVittie.
|
|
On systems with a systemd user session and a D-Bus user bus that
uses it for activation, this ensures that syncevo-dbus-server ends
up in its own cgroup, instead of being treated as part of dbus.service.
If org._01.pim.contacts and org.syncevolution are activated in quick
succession, it also prevents a race condition that would make one of
the activations fail, similar to
<https://bugs.freedesktop.org/show_bug.cgi?id=53220> in
telepathy-mission-control.
|
|
Apparently there's a race condition in the OBEX transport that causes the
connection to phones via Bluetooth to be shut down prematurely. Some phones
react by doing a slow sync instead of an incremental sync the next time.
Waiting during shutdown should address the problem (however, it was not
possible to confirm this).
|