Since the QLocalServer parent of the QLocalSockets gets destroyed
after the _listeners QList, onLostConnection might try to update
an already destroyed list.
Fix the issue by simply making sure that _localServer is destroyed
first.
Also, use the mirall version for ocsync.
Currently, the csync engine part and the Qt part have different UAs,
and this makes debugging (i.e. reading access logs) difficult. On
top, we haven't increased the ocsync version number in ages. So
as a consequence, I think it would be the best to have ocsync
and the rest share the same version number, and make them identify
with the same user agent.
To ease debugging for our side, we'll still append "(csyncoC)"
for calls made by csync.
For issue #3106
1) Always use the actual timestamp from the file in the file system
to create the conflict file. This is important because if one edit a
file several time, they should have different name. Also it makes more
sens to have the mtime of the modified file.
2) Give the correct size to the job so we know when the temporary file
is complete in case of resuming.
Because file system like FAT only have two second accuracy and would result
in a upload if the mtime in the database is not the same as the one that was
downloaded
Issue #3103
csync_reconcile.c:159:26: warning: address of array 'tmp->path' will always evaluate to 'true' [-Wpointer-bool-conversion]
if( tmp->path ) {
~~ ~~~~~^~~~
csync_file_stat_s::path is an array so it is never null
What was meant here is to check if the string was not empty
In some cryptic cases where the getetag property wasn't returned by
the server, we might be trying to c_strdup a null pointer in
csync_vio_file_stat_copy.
At least avoid crashing in this case by looking for
CSYNC_VIO_FILE_STAT_FIELDS_ETAG, like csync_vio_file_stat_destroy
does.
The default constructor of the iterator points to NULL, which makes
it != end() but invalid to dereference.
Use an integer index instead to keep 0 as a valid default value that
can always correctly be checked against size().
Also make sure that no data is shared between threads by making the
csync_vio_file_stat_t copyable and passing it as const.