mirror of
				https://github.com/lxsang/ant-http
				synced 2025-10-31 18:35:44 +01:00 
			
		
		
		
	fix setsockopt
This commit is contained in:
		
							
								
								
									
										
											BIN
										
									
								
								dist/antd-1.0.6b.tar.gz
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										
											BIN
										
									
								
								dist/antd-1.0.6b.tar.gz
									
									
									
									
										vendored
									
									
								
							
										
											Binary file not shown.
										
									
								
							| @@ -673,7 +673,6 @@ int startup(unsigned *port) | ||||
| { | ||||
| 	int httpd = 0; | ||||
| 	struct sockaddr_in name; | ||||
| 	uint8_t on = 1; | ||||
| 	httpd = socket(PF_INET, SOCK_STREAM, 0); | ||||
| 	if (httpd == -1) | ||||
| 	{ | ||||
| @@ -681,7 +680,7 @@ int startup(unsigned *port) | ||||
| 		return -1; | ||||
| 	} | ||||
| 	 | ||||
| 	if (setsockopt(httpd, SOL_SOCKET, SO_REUSEADDR, (char *)&on, sizeof(on)) == -1) | ||||
| 	if (setsockopt(httpd, SOL_SOCKET, SO_REUSEADDR, &(int){1}, sizeof(int)) == -1) | ||||
| 	{ | ||||
| 		ERROR("Unable to set reuse address on port %d - setsockopt: %s", *port, strerror(errno)); | ||||
| 	} | ||||
|   | ||||
		Reference in New Issue
	
	Block a user