commit b6be6a5217212b9455e44aaa3940716484caef27 Author: David Fifield david@bamsoftware.com Date: Sun Oct 16 12:43:31 2011 -0700
Move patches into a subdirectory. --- README | 2 +- cumulus-no-manage-log.patch | 39 ------------------------------- patches/cumulus-no-manage-log.patch | 39 +++++++++++++++++++++++++++++++ patches/tor-ignore-bridge-failure.patch | 19 +++++++++++++++ tor-ignore-bridge-failure.patch | 19 --------------- 5 files changed, 59 insertions(+), 59 deletions(-)
diff --git a/README b/README index 933895a..fa6bf1d 100644 --- a/README +++ b/README @@ -127,7 +127,7 @@ Follow these steps to install the Cumulus server. You need to open port 1935/udp in the firewall. $ git clone git://github.com/OpenRTMFP/Cumulus.git $ cd Cumulus - $ patch -p0 < cumulus-no-manage-log.patch + $ patch -p0 < ~/flashproxy/patches/cumulus-no-manage-log.patch $ cd CumulusLib $ make LIBS=./ # cp libCumulus.so /usr/local/lib diff --git a/cumulus-no-manage-log.patch b/cumulus-no-manage-log.patch deleted file mode 100644 index 810b52d..0000000 --- a/cumulus-no-manage-log.patch +++ /dev/null @@ -1,39 +0,0 @@ -Don't try to re-open log files. This avoids a failure after --daemon -causes a chdir to /. - -diff --git a/CumulusService/sources/main.cpp b/CumulusService/sources/main.cpp -index 891621f..39ea4eb 100644 ---- a/CumulusService/sources/main.cpp -+++ b/CumulusService/sources/main.cpp -@@ -132,7 +132,6 @@ protected: - void dumpHandler(const char* data,int size) { - cout.write(data,size); - _logStream.write(data,size); -- manageLogFile(); - } - - void logHandler(Thread::TID threadId,const std::string& threadName,Priority priority,const char *filePath,long line, const char *text) { -@@ -140,23 +139,6 @@ protected: - _logStream << DateTimeFormatter::format(LocalDateTime(),"%d/%m %H:%M:%S.%c ") - << g_logPriorities[priority-1] << '\t' << threadName << '(' << threadId << ")\t" - << Path(filePath).getFileName() << '[' << line << "] " << text << std::endl; -- manageLogFile(); -- } -- -- void manageLogFile() { -- if(_logFile.getSize()>LOG_SIZE) { -- _logStream.close(); -- int num = 10; -- File file(LOG_FILE(10)); -- if(file.exists()) -- file.remove(); -- while(--num>=0) { -- file = LOG_FILE_VAR(num); -- if(file.exists()) -- file.renameTo(LOG_FILE_VAR(num+1)); -- } -- _logStream.open(LOG_FILE(0),ios::in | ios::ate); -- } - } - - bool onConnection(Client& client) { diff --git a/patches/cumulus-no-manage-log.patch b/patches/cumulus-no-manage-log.patch new file mode 100644 index 0000000..810b52d --- /dev/null +++ b/patches/cumulus-no-manage-log.patch @@ -0,0 +1,39 @@ +Don't try to re-open log files. This avoids a failure after --daemon +causes a chdir to /. + +diff --git a/CumulusService/sources/main.cpp b/CumulusService/sources/main.cpp +index 891621f..39ea4eb 100644 +--- a/CumulusService/sources/main.cpp ++++ b/CumulusService/sources/main.cpp +@@ -132,7 +132,6 @@ protected: + void dumpHandler(const char* data,int size) { + cout.write(data,size); + _logStream.write(data,size); +- manageLogFile(); + } + + void logHandler(Thread::TID threadId,const std::string& threadName,Priority priority,const char *filePath,long line, const char *text) { +@@ -140,23 +139,6 @@ protected: + _logStream << DateTimeFormatter::format(LocalDateTime(),"%d/%m %H:%M:%S.%c ") + << g_logPriorities[priority-1] << '\t' << threadName << '(' << threadId << ")\t" + << Path(filePath).getFileName() << '[' << line << "] " << text << std::endl; +- manageLogFile(); +- } +- +- void manageLogFile() { +- if(_logFile.getSize()>LOG_SIZE) { +- _logStream.close(); +- int num = 10; +- File file(LOG_FILE(10)); +- if(file.exists()) +- file.remove(); +- while(--num>=0) { +- file = LOG_FILE_VAR(num); +- if(file.exists()) +- file.renameTo(LOG_FILE_VAR(num+1)); +- } +- _logStream.open(LOG_FILE(0),ios::in | ios::ate); +- } + } + + bool onConnection(Client& client) { diff --git a/patches/tor-ignore-bridge-failure.patch b/patches/tor-ignore-bridge-failure.patch new file mode 100644 index 0000000..fa50366 --- /dev/null +++ b/patches/tor-ignore-bridge-failure.patch @@ -0,0 +1,19 @@ +This patch causes Tor to ignore bridge reachability failures. This is +helpful when the bridge is only intermittently available, as when +connecting through a flash proxy. + +diff --git src/or/circuitbuild.c src/or/circuitbuild.c +index ac0df91..1794634 100644 +--- src/or/circuitbuild.c ++++ src/or/circuitbuild.c +@@ -3855,6 +3855,10 @@ entry_guard_register_connect_status(const char *digest, int succeeded, + int idx = -1; + char buf[HEX_DIGEST_LEN+1]; + ++ /* Ignore bridge reachability problems. */ ++ if (! succeeded) ++ return 0; ++ + if (! entry_guards) + return 0; + diff --git a/tor-ignore-bridge-failure.patch b/tor-ignore-bridge-failure.patch deleted file mode 100644 index fa50366..0000000 --- a/tor-ignore-bridge-failure.patch +++ /dev/null @@ -1,19 +0,0 @@ -This patch causes Tor to ignore bridge reachability failures. This is -helpful when the bridge is only intermittently available, as when -connecting through a flash proxy. - -diff --git src/or/circuitbuild.c src/or/circuitbuild.c -index ac0df91..1794634 100644 ---- src/or/circuitbuild.c -+++ src/or/circuitbuild.c -@@ -3855,6 +3855,10 @@ entry_guard_register_connect_status(const char *digest, int succeeded, - int idx = -1; - char buf[HEX_DIGEST_LEN+1]; - -+ /* Ignore bridge reachability problems. */ -+ if (! succeeded) -+ return 0; -+ - if (! entry_guards) - return 0; -
tor-commits@lists.torproject.org