[Ffmpeg-cvslog] r8834 - in trunk/libavformat: os_support.c tcp.c

Diego Biurrun diego
Thu Apr 26 21:29:22 CEST 2007


On Thu, Apr 26, 2007 at 08:04:42PM +0200, alex wrote:
> 
> Log:
> move resolve_host from tcp.c to os_support.c as it is used widely
> 
> --- trunk/libavformat/os_support.c	(original)
> +++ trunk/libavformat/os_support.c	Thu Apr 26 20:04:42 2007
> @@ -97,7 +99,22 @@ done:
>  
> +/* resolve host with also IP address parsing */
> +int resolve_host(struct in_addr *sin_addr, const char *hostname)
> +{
> +    struct hostent *hp;
> +    
> +    if (!inet_aton(hostname, sin_addr)) {
> +	hp = gethostbyname(hostname);
> +	if (!hp)
> +	    return -1;
> +	memcpy(sin_addr, hp->h_addr, sizeof(struct in_addr));
> +    }
> +    return 0;
> +}

Ooops, somehow the pre-commit script got disabled because after the
upgrade the new /bin/sh is more strict about POSIX compliance.  Fixed.

Diego




More information about the ffmpeg-cvslog mailing list