Skip to content

Instantly share code, notes, and snippets.

View guruz's full-sized avatar

Markus Goetz guruz

View GitHub Profile
From 67f5e1651e09be3f3c62203893567b630de5e4f4 Mon Sep 17 00:00:00 2001
From: Markus Goetz <markus@woboq.com>
Date: Sun, 18 Aug 2013 11:38:12 +0200
Subject: [PATCH] Try improving local stating
---
src/csync_update.c | 6 +++++-
src/vio/csync_vio_local.c | 55 +++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 56 insertions(+), 5 deletions(-)
diff --git a/src/mirall/syncengine.cpp b/src/mirall/syncengine.cpp
index 1d87b3b..db632d2 100644
--- a/src/mirall/syncengine.cpp
+++ b/src/mirall/syncengine.cpp
@@ -325,7 +325,9 @@ int SyncEngine::treewalkFile( TREE_WALK_FILE *file, bool remote )
item._modtime = file->modtime;
} else {
if (file->instruction != CSYNC_INSTRUCTION_NONE) {
+ qDebug() << "ERROR: Instruction" << item._instruction << "vs" << file->instruction << "for" << fileUtf8;
Q_ASSERT(!"Instructions are both unequal NONE");
* thread #7: tid = 0xd7009, 0x00000001001ad236 libQt5Network_debug.5.dylib`QHttpProtocolHandler::sendRequest(this=0x000000010130d0e0) + 134 at qhttpprotocolhandler.cpp:253, name = 'Qt HTTP thread', stop reason = breakpoint 1.1
* frame #0: 0x00000001001ad236 libQt5Network_debug.5.dylib`QHttpProtocolHandler::sendRequest(this=0x000000010130d0e0) + 134 at qhttpprotocolhandler.cpp:253
frame #1: 0x00000001001a52c2 libQt5Network_debug.5.dylib`QHttpNetworkConnectionChannel::sendRequest(this=0x00000001030877a8) + 114 at qhttpnetworkconnectionchannel.cpp:197
frame #2: 0x00000001001a9d25 libQt5Network_debug.5.dylib`QHttpNetworkConnectionChannel::_q_uploadDataReadyRead(this=0x00000001030877a8) + 21 at qhttpnetworkconnectionchannel.cpp:923
frame #3: 0x00000001001aa90f libQt5Network_debug.5.dylib`QHttpNetworkConnectionChannel::qt_static_metacall(_o=0x00000001030877a8, _c=InvokeMetaMethod, _id=7, _a=0x0000000104f80580) + 239 at moc_qhttpnetworkconnectionchannel_p.cpp:122
frame #4: 0x000000010094b004 libQt5
abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghij
#include <QNetworkAccessManager>
#include <QEventLoop>
#include <QUrl>
#include <QDebug>
#include <QNetworkRequest>
#include <QNetworkReply>
#include <QObject>
#include <QCoreApplication>
#include <QTimer>
int main(int argc, char**argv) {
diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp
index 49c6793..09d70e0 100644
--- a/src/network/access/qhttpnetworkconnectionchannel.cpp
+++ b/src/network/access/qhttpnetworkconnectionchannel.cpp
@@ -839,6 +839,10 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket
}
errorCode = QNetworkReply::RemoteHostClosedError;
+ } else if (state == QHttpNetworkConnectionChannel::IdleState && !reply) {
+ // This is a perfectly fine thing to happen by "Connection: close" webservers, just retry.
Contributor Agreement
Thank you for your interest in contributing to Woboq Code Browser ("We" or "Us").
The purpose of this contributor agreement ("Agreement") is to clarify and
document the rights granted by contributors to Us.
1. DEFINITIONS "You" means the Individual Copyright owner who submits a
Contribution to Us. If You are an employee and submit the Contribution as part
of your employment, You have had Your employer approve this Agreement or sign
Contributor Agreement
Thank you for your interest in contributing to a Woboq software ("We" or "Us").
The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.
DEFINITIONS "You" means the Individual Copyright owner who submits a Contribution to Us. If You are an employee and submit the Contribution as part of your employment, You have had Your employer approve this Agreement or sign the Entity version of this document.
Contribution means any original work of authorship (software and/or documentation) including any modifications or additions to an existing work, Submitted by You to Us, in which You own the Copyright. If You do not own the Copyright in the entire work of authorship, please contact Us at contact@woboq.com.
Copyright means all rights protecting works of authorship owned or controlled by You, including copyright, moral and neighboring rights, as appropriate, for the full term of their existence including any extensions by You.
Contributor Agreement
Thank you for your interest in contributing to Woboq iQuassel ("We" or "Us").
The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us.
DEFINITIONS "You" means the Individual Copyright owner who submits a Contribution to Us. If You are an employee and submit the Contribution as part of your employment, You have had Your employer approve this Agreement or sign the Entity version of this document.