Selaa lähdekoodia

automatische speicherabbild erstellung bei server crashes

Kolja Strohm 6 vuotta sitten
vanhempi
commit
78b5a3638f
3 muutettua tiedostoa jossa 10 lisäystä ja 6 poistoa
  1. 4 5
      HistorieServer/Datenbank.h
  2. 1 1
      HistorieServer/HistorieServer.cpp
  3. 5 0
      HistorieServer/main.cpp

+ 4 - 5
HistorieServer/Datenbank.h

@@ -10,11 +10,10 @@ using namespace sql;
 
 namespace Admin_Recht
 {
-	const int HSStarten = 0x00000029;
-	const int HSBeenden = 0x0000002A;
-	const int HSPausieren = 0x0000002B;
-	const int HSMCChange = 0x0000002C;
-	const int HSMSChange = 0x0000002D;
+	const int HSStarten = 41;
+	const int HSBeenden = 42;
+	const int HSPausieren = 43;
+	const int HSMSChange = 44;
 }
 
 class HSDatenbank

+ 1 - 1
HistorieServer/HistorieServer.cpp

@@ -533,7 +533,7 @@ void HSAKlient::thread()
 					}
 				}
 				break;
-			case 0xB: // maximale Anzahl der Spiele setzen
+			case 0xA: // maximale Anzahl der Spiele setzen
 				if( !adminId )
 					errorZuKlient( "Du musst dich einloggen." );
 				else

+ 5 - 0
HistorieServer/main.cpp

@@ -3,9 +3,14 @@
 #include <iostream>
 #include <fstream>
 #include <Globals.h>
+#include <sys/resource.h>
 
 int main()
 {
+	struct rlimit core_limits;
+	core_limits.rlim_cur = core_limits.rlim_max = RLIM_INFINITY;
+	setrlimit(RLIMIT_CORE, &core_limits);
+
     Framework::initFramework();
 	Zeit *z = getZeit();
 	Text *pfad = new Text( "../log/historie/" );