Changing the CPPUnit defines broke linking of syncevolution in Moblin
(--enable-integration-tests): test.cpp then depends on CPPUnit libs
and was linked into syncevolution and syncevo-dbus-server, causing link
failures.
Made inclusion of test.cpp conditional on actually having unit tests
inside the library. Only then do syncevolution and syncevo-dbus-server
have to link against CPPUnit.
As requested by Mark, the webURL was changed from
sync.scheduleworld.com to www.scheduleworld.com, which is the
official entry point for browerser. IMHO sync.scheduleworld.com
has always worked, though, and currently still does.
Goosync provides access to Google calendar, tasks and contacts
via SyncML. Google itself only supports contacts. Memos are not
supported by either of them.
This patch only adds the template with the necessary configuration
parameters. We have done no testing with the service, so it is
not marked as "consumer ready" at this time.
The template uses an unspecific "https://your.company/mobilesync/server"
syncURL. The hope is that users just have to replace "your.company"
in many cases.
https is chosen because apparently, many installations are restricted
to that.
The recent fix for extracting broken calendar events introduced
icalproperty_remove_parameter_by_kind(), which has to be added to
the EDS wrapper to avoid hard library dependencies.
When an instance was deleted while it had a pending message and
active timeout/abort events, those event sources were not removed.
Using the new smart pointer type for GLib event handles avoids that.
According to the documentation, a handle is always > 0, so initializing
it with 0 as GLibEvent is more appropriate than the -1 used previously
in the code here.
There might still be one problem left: what if wait() is left by
throwing an exception? Should the two event sources be cleared in that
case?
A SyncML server cannot resend a message. With HTTP, a reply simply
cannot be sent, for other transports the D-Bus API doesn't support it.
Therefore RetryInterval is ignored and only RetryDuration is used as
the final timeout after which the session is aborted.
The same transport callback is used for client and server. It was
changed to log the timeout duration (sent in via its parameter). The
rest of the logic is in the caller of TransportAgent::wait().
While touching the timeout code in initSAN(), the resending of the SAN
message was removed. This makes the code consistent with the HTTP
SyncML client case, where the initial message is also not resent.
The new test-dbus.py TestConnection.testTimeoutSync covers thus timeout
handling. It depends on setting RetryDuration to 10 in the server-side
config of the sc-api-nat device.
The timeout will be needed for connections to clients which stop
sending messages or died without telling the server stub (HTTP
server). A test will be added once the server mode properly supports
such timeouts.
When the timeout is triggered, we need to get out of the
g_main_loop_run() called indirectly by DBusTransportAgent::wait(). We don't
want to interfere with other calls to that function, so g_main_loop_quit()
is only called when waiting in the agent. Otherwise the timeout is
remembered and reported the next time wait() is called.
The "cancel on false from callback" feature is not implemented. It is not
used and thus would be impossible to test. Remove this feature?
A GLib guint event handle can be compared to 0 (the invalid handle),
just like a pointer. Previously, eptr didn't support this because the
template was parameterized with a class and then used pointers to it.
This patch changes the base template so that both pointers and
integral types can be tracked. The base template was renamed to
SmartPtr. eptr became a source compatibility class with the previous
"track pointers" semantic.
GLibEvent is a specialization which uses g_source_remove() to free
the event associated with a guint handle.
I just noticed that the statistics table had "0" for all cells, despite having
local changes and items.
This broke during the backend API migration towards Boost function pointers.
The implementation in TrackingSyncSource did not have enough parameters and did
not fill the SyncSourceReport passed in as parameter with the values.
I'm not sure why the old code compiled, I would have expected type errors
because boost::bind() with only "this" as parameter should not have matched
m_checkStatus. Anyway, now the item counts are copied into the report.
There might be exceptions or other problems making sync completed
unnormally without setting 'waiting' as false. So we always set
the 'waiting' as false since sync is done and no longer waiting
any I/O events anymore.
It scanned "peers" inside the top .config/syncevolution directory
instead of looking inside the current context. This showed up as
failure in test-dbus.py testSourceRemovalGlobal.
SyncSource::createTestingSource() has to create sources using a
default configuration. It did that by using the "testing" config name.
Since introducing shared configs, that config happened to use shared
source properties from the "default" context.
This broke testing on my laptop after setting "evolutionsource" for a
specific peer in that context. Now "testing@testing" is used as config
name, which should be unique again.
libsoup does not use http_proxy set in environment. SyncConfig reads
http_proxy from environment and returns it. If it is not avilable in
the environment, then configured value is returned.
"http_proxy" set to an empty value disables the use
of a proxy.
Older automake doesn't have --with-docdir and thus no
way of installing our docs in that dir. As a workaround,
check right before generating Makefiles whether $docdir
is empty and set it if necessary.
This happens for corrupt calendar data where a VEVENT refers to a
VTIMEZONE that is not available. Work around this by removing the
broken TZID in case of failure, then retrying the encoding.
This treats such events as if they were using local time without
timezone information, which is also how the Evolution GUI deals
with such events. It is correct as long as users only deal with
such broken events in their own timezone.
Mobical has many regressions due to 'priority' property.
Mobical doesn't send 'priority' when its value is '0'. This has
been recorded in the README.mobical. The root cause of regressions
is due to changes in synccompare for nokia_7210c.
'=~' is miswritten as '= ~' so $nokia_7210c is always true, thus
it changes all priority values into '[...]'. As a result, removal
of 'priority:0' won't happen. This causes the comparisons failed.
The reason is that the update config contains 'password', which
save passwords in keyring. Usually, it pops up a dialog which
prevents testing. Change update the property from 'password' to
'username'.
In Session.GetConfig, when checking whether a given config exists,
configs set temporarily should be concerned. Otherwise, the given
config will be treated as a non-existing one though it has been
set temporarily.
Previous implementation only applies temporary configs when the config
exists on disk. This is not expected.
Also write a test case(testGetConfigWithTempConfig) for this scenario:
first set up a config with temporary configs, and then call GetConfig
to get configs from it. This will be failed in the previous version and
successful now.
The test case will check the password and ask it from dbus clients.
The test follows the working flow to send response to dbus server.
There might be a gnome-keyring-ask process popped out for dbus server
will ask password from gnome-keyring first. To remove this problem,
a timeout function is regularly called and kill that process to force
dbus server sending request to dbus clients.
Implement the info exchange mechanism when the dbus server wants
any information that only dbus clients can provide.
The dbus server uses the class 'InfoReq' to handle the requested
information from it and get response from dbus clients. The main
processing logic is referred to dbus api document.
To allow multiple info requests, the DBusServer uses a map to manage
all pending info requests and dispatches responses to the corresponding
info request. Also DBusServer.createInfoReq() is provided to create
info requests.
For InfoRequest callers, A series of methods in 'InfoReq' are provided:
check - check whether the required response is gotten
cancel - cancel the info request
wait - wait until timeout, abort or suspend
getResponse - get the response result provided by dbus clients.
All methods here are asynchronous except 'wait', which waits for
response explicitly.
Generate and send source statuses and progress to dbus clients.
For source modes in statuses, 'restore-from-backup' is sent once
a source is restored. For progress, the granularity is source level.
Thus, the progress is simply calculated based on the number of
sources and how many of them that have been completed.
To report source status and progress, SyncContext::restore
should have a mechanism to give out events to dbus server.
Here 'displaySourceProgress' is re-used. Some synthesis events are
simulated in restore. To follow up the way of 'displaySourceProgress',
a pseudo mode 'SYNC_RESTORE_FROM_BACKUP' is defined for source sync
mode. This is treated as a special sync mode only for restore from
backup.
Also add test code in testRestoreByRef to check source
status and progress.
"setupFiles" should be called firstly before others, for
it will clean up xdg_root directory. Thus 'setupConfigs'
won't take effect for its flushed results will be wiped
out by "setupFiles".
Fixed some signal handling problems:
1) Save the underlying resource before calling cancel() avoiding a segfault.
2) Abort directly without sending the Disconnect cmd.
The underlying openobex library will fail directly during select() if SIGINT is
delivered. Since we already handle SIGINT in application layer, do not fail in
the transport layer.
Checking SoupTransportAgent and CurlTransportAgent both have same mechanism
built in the library layer.
Added --enable-bluetooth let the user explictly enable bluetooth, in this case
the configure process will fail if the dependent library is not installed.
If the option is not set, bluetooth is enabled by default anyway; however if
user don't have necessary library installed it will not attemt to built with
bluetooth support.
Added a summary to display whether the bluetooth support is enabled.
2 test cases are added to test Session.Restore.
1) testRestoreByRef: test restore with the data before
and after a given session
2) testSecondRestore: test restore with an inactive
session. The right error should be thrown.