git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@299 ec53bebd-3082-4978-b11e-865c3cabbd6b
		
			
				
	
	
		
			18 lines
		
	
	
		
			377 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			377 B
		
	
	
	
		
			C
		
	
	
	
	
	
#include <krb5_locl.h>
 | 
						|
 | 
						|
int
 | 
						|
krb5_getportbyname (const char *service,
 | 
						|
		    const char *proto,
 | 
						|
		    int default_port)
 | 
						|
{
 | 
						|
    struct servent *sp;
 | 
						|
 | 
						|
    if ((sp = getservbyname (service, proto)) == NULL) {
 | 
						|
	 fprintf (stderr, "%s/%s unknown service, "
 | 
						|
		  "using default port %d\n", service, proto,
 | 
						|
		  ntohs(default_port));
 | 
						|
	 return default_port;
 | 
						|
    } else
 | 
						|
	 return sp->s_port;
 | 
						|
}
 |