mirror of
				https://github.com/PurpleI2P/i2pd.git
				synced 2025-11-04 08:30:46 +00:00 
			
		
		
		
	fix shutdown from webconsole in windows
This commit is contained in:
		
							parent
							
								
									7a857e08c1
								
							
						
					
					
						commit
						dde4643e77
					
				
					 2 changed files with 11 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -908,7 +908,11 @@ namespace http {
 | 
			
		|||
			i2p::win32::StopGracefulShutdown ();
 | 
			
		||||
#endif
 | 
			
		||||
		} else if (cmd == HTTP_COMMAND_SHUTDOWN_NOW) {
 | 
			
		||||
#ifndef WIN32_APP
 | 
			
		||||
			Daemon.running = false;
 | 
			
		||||
#else
 | 
			
		||||
			i2p::win32::StopWin32App ();
 | 
			
		||||
#endif
 | 
			
		||||
		} else {
 | 
			
		||||
			res.code = 400;
 | 
			
		||||
			ShowError(s, "Unknown command: " + cmd);
 | 
			
		||||
| 
						 | 
				
			
			@ -951,8 +955,8 @@ namespace http {
 | 
			
		|||
		if (needAuth && pass == "") {
 | 
			
		||||
			uint8_t random[16];
 | 
			
		||||
			char alnum[] = "0123456789"
 | 
			
		||||
			  "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 | 
			
		||||
			  "abcdefghijklmnopqrstuvwxyz";
 | 
			
		||||
				"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
 | 
			
		||||
				"abcdefghijklmnopqrstuvwxyz";
 | 
			
		||||
			pass.resize(sizeof(random));
 | 
			
		||||
			RAND_bytes(random, sizeof(random));
 | 
			
		||||
			for (size_t i = 0; i < sizeof(random); i++) {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue