You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.4 KiB
59 lines
1.4 KiB
--- scripts/innwatch.in.dist Wed Dec 4 15:02:05 2002 |
|
+++ scripts/innwatch.in Wed Dec 4 15:05:21 2002 |
|
@@ -126,7 +126,12 @@ |
|
NEXTSLEEP=1 |
|
HASEXITED=false |
|
|
|
-while { sleep ${NEXTSLEEP} & wait; } ; : ; do |
|
+SLEEPTINY=4 |
|
+while { sleep ${SLEEPTINY} & wait; } ; : ; do |
|
+ NEXTSLEEP=`expr ${NEXTSLEEP} - ${SLEEPTINY}` |
|
+ if [ $NEXTSLEEP -gt 0 ]; then |
|
+ continue; |
|
+ fi |
|
NEXTSLEEP=${INNWATCHSLEEPTIME} |
|
|
|
## If news.daily is running, idle: we don't want to change the |
|
|
|
--- storage/ovdb/ovdb-private.h.orig 2004-01-07 23:47:19.000000000 +0100 |
|
+++ storage/ovdb/ovdb-private.h 2004-01-08 12:07:08.000000000 +0100 |
|
@@ -188,8 +188,7 @@ |
|
|
|
#define TRYAGAIN EAGAIN |
|
|
|
-#else |
|
-/* version 3 */ |
|
+#elif DB_VERSION_MAJOR == 3 |
|
|
|
#define TXN_START(label, tid) \ |
|
label: { \ |
|
@@ -209,6 +208,28 @@ |
|
|
|
#define TRYAGAIN DB_LOCK_DEADLOCK |
|
|
|
+#elif DB_VERSION_MAJOR == 4 |
|
+ |
|
+#define TXN_START(label, tid) \ |
|
+label: { \ |
|
+ int txn_ret; \ |
|
+ txn_ret = OVDBenv->txn_begin(OVDBenv, NULL, &tid, 0); \ |
|
+ if (txn_ret != 0) { \ |
|
+ syslog(L_ERROR, "OVDB: " #label " txn_begin: %s", db_strerror(ret)); \ |
|
+ tid = NULL; \ |
|
+ } \ |
|
+} |
|
+ |
|
+#define TXN_RETRY(label, tid) \ |
|
+{ tid->abort(tid); goto label; } |
|
+ |
|
+#define TXN_ABORT(label, tid) tid->abort(tid) |
|
+#define TXN_COMMIT(label, tid) tid->commit(tid, 0) |
|
+ |
|
+#define TRYAGAIN DB_LOCK_DEADLOCK |
|
+ |
|
+#else |
|
+#error "unknown DB_VERSION_MAJOR" |
|
#endif /* DB_VERSION_MAJOR == 2 */ |
|
|
|
#endif /* USE_BERKELEY_DB */ |
|
|
|
|