[tor-commits] [flashproxy/master] Use uniform patch naming.

dcf at torproject.org dcf at torproject.org
Fri Jun 17 17:10:09 UTC 2011


commit 98d58fdd87e5485de522810ffe98642c9b011441
Author: David Fifield <david at bamsoftware.com>
Date:   Fri Jun 17 10:10:32 2011 -0700

    Use uniform patch naming.
    
    Use extension .patch rather than .diff. Use a lower-case "cumulus".
---
 Cumulus-no-manage-log.patch     |   39 ---------------------------------------
 README                          |    2 +-
 cumulus-no-manage-log.patch     |   39 +++++++++++++++++++++++++++++++++++++++
 tor-ignore-bridge-failure.diff  |   19 -------------------
 tor-ignore-bridge-failure.patch |   19 +++++++++++++++++++
 5 files changed, 59 insertions(+), 59 deletions(-)

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/README b/README
index 773d3cb..ef7e826 100644
--- a/README
+++ b/README
@@ -108,7 +108,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 < 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
new file mode 100644
index 0000000..810b52d
--- /dev/null
+++ b/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/tor-ignore-bridge-failure.diff b/tor-ignore-bridge-failure.diff
deleted file mode 100644
index fa50366..0000000
--- a/tor-ignore-bridge-failure.diff
+++ /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;
- 
diff --git a/tor-ignore-bridge-failure.patch b/tor-ignore-bridge-failure.patch
new file mode 100644
index 0000000..fa50366
--- /dev/null
+++ b/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;
+ 



More information about the tor-commits mailing list