BB#106: remove now unused extract_ssl_url.
Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
		
							parent
							
								
									9f43cfd488
								
							
						
					
					
						commit
						0f18e4fc3a
					
				
							
								
								
									
										25
									
								
								src/reqs.c
									
									
									
									
									
								
							
							
						
						
									
										25
									
								
								src/reqs.c
									
									
									
									
									
								
							@ -243,31 +243,6 @@ ERROR_EXIT:
 | 
			
		||||
        return -1;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Extract the URL from a SSL connection.
 | 
			
		||||
 */
 | 
			
		||||
static int extract_ssl_url (const char *url, struct request_s *request)
 | 
			
		||||
{
 | 
			
		||||
        request->host = (char *) safemalloc (strlen (url) + 1);
 | 
			
		||||
        if (!request->host)
 | 
			
		||||
                return -1;
 | 
			
		||||
 | 
			
		||||
        if (sscanf (url, "%[^:]:%hu", request->host, &request->port) == 2) ;
 | 
			
		||||
        else if (sscanf (url, "%s", request->host) == 1)
 | 
			
		||||
                request->port = HTTP_PORT_SSL;
 | 
			
		||||
        else {
 | 
			
		||||
                log_message (LOG_ERR, "extract_ssl_url: Can't parse URL.");
 | 
			
		||||
 | 
			
		||||
                safefree (request->host);
 | 
			
		||||
                return -1;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        /* Remove the username/password if they're present */
 | 
			
		||||
        strip_username_password (request->host);
 | 
			
		||||
 | 
			
		||||
        return 0;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
 * Create a connection for HTTP connections.
 | 
			
		||||
 */
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user