diff mbox series

[FFmpeg-devel,1/1] Patch for adding Documentation of ff_http_match_no_proxy

Message ID CACd3CmQ9+QKBv1zbL9qS2B6Y8zebUFeJCMvWKVCwnXGs1ekAbQ@mail.gmail.com
State New
Headers show
Series [FFmpeg-devel,1/1] Patch for adding Documentation of ff_http_match_no_proxy | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Sourabh Sharma Feb. 29, 2020, 11:37 a.m. UTC
Patch for adding Documentation of ff_http_match_no_proxy

Function ff_http_match_no_proxy check for host of proxy address
matches with hostname or not.
---
 libavformat/network.h | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

Comments

Michael Niedermayer Feb. 29, 2020, 9:19 p.m. UTC | #1
On Sat, Feb 29, 2020 at 05:07:30PM +0530, Sourabh Sharma wrote:
> Patch for adding Documentation of ff_http_match_no_proxy
> 
> Function ff_http_match_no_proxy check for host of proxy address
> matches with hostname or not.
> ---
>  libavformat/network.h | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)
> 
> diff --git a/libavformat/network.h b/libavformat/network.h
> index 71347e815b..cd533a7cbc 100644
> --- a/libavformat/network.h
> +++ b/libavformat/network.h
> @@ -302,7 +302,13 @@ int ff_accept(int fd, int timeout, URLContext *h);
>  int ff_listen_connect(int fd, const struct sockaddr *addr,
>                        socklen_t addrlen, int timeout,
>                        URLContext *h, int will_try_next);
> -

> +/**
> + * It Check for host of proxy address matches with hostname or not.

This has some english grammer issues.
Also look at how other similar function doxy is worded


> + *
> + * @param no_proxy URL of proxy address
> + * @param hostname URL of hostname

I dont think the function would be understood from just this


thx

[...]
Sourabh Sharma March 2, 2020, 3:02 p.m. UTC | #2
Patch for adding Documentation of ff_http_match_no_proxy
Function ff_http_match_no_proxy check for host of proxy address matches with
 the hostname or not.

---
 libavformat/network.h | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/libavformat/network.h b/libavformat/network.h
index 71347e815b..7c93375ae5 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -303,6 +303,13 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
                       socklen_t addrlen, int timeout,
                       URLContext *h, int will_try_next);

+/**
+ * It Checks for a host of proxy address matches with the hostname or not.
+ *
+ * @param no_proxy Server address of proxy server e.g. example.domain.com
+ * @param hostname Server address of hostname e.g. domain.com
+ * @return         0 if don't match, 1 for exactly match
+*/
 int ff_http_match_no_proxy(const char *no_proxy, const char *hostname);

 int ff_socket(int domain, int type, int protocol);
Michael Niedermayer March 2, 2020, 10:16 p.m. UTC | #3
On Mon, Mar 02, 2020 at 08:32:10PM +0530, Sourabh Sharma wrote:
> Patch for adding Documentation of ff_http_match_no_proxy
> Function ff_http_match_no_proxy check for host of proxy address matches with
>  the hostname or not.
> 
> ---
>  libavformat/network.h | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/libavformat/network.h b/libavformat/network.h
> index 71347e815b..7c93375ae5 100644
> --- a/libavformat/network.h
> +++ b/libavformat/network.h
> @@ -303,6 +303,13 @@ int ff_listen_connect(int fd, const struct sockaddr *addr,
>                        socklen_t addrlen, int timeout,
>                        URLContext *h, int will_try_next);
> 
> +/**
> + * It Checks for a host of proxy address matches with the hostname or not.
> + *
> + * @param no_proxy Server address of proxy server e.g. example.domain.com
> + * @param hostname Server address of hostname e.g. domain.com
> + * @return         0 if don't match, 1 for exactly match
> +*/
>  int ff_http_match_no_proxy(const char *no_proxy, const char *hostname);

maybe looking at how this function is used makes it clearer what it does

for example
libavformat/http.c:    use_proxy  = !ff_http_match_no_proxy(getenv("no_proxy"), hostname) &&
libavformat/http.c-                 proxy_path && av_strstart(proxy_path, "http://", NULL);


but basically
no_proxy, is a list of addresses for which not to use the proxy server,
these may be local addresses



[...]
Sourabh Sharma March 4, 2020, 2:28 p.m. UTC | #4
On Tue, Mar 3, 2020 at 3:47 AM Michael Niedermayer <michaelni@gmx.at> wrote:

> On Mon, Mar 02, 2020 at 08:32:10PM +0530, Sourabh Sharma wrote:
> > Patch for adding Documentation of ff_http_match_no_proxy
> > Function ff_http_match_no_proxy check for host of proxy address matches
> with
> >  the hostname or not.
> >
> > ---
> >  libavformat/network.h | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/libavformat/network.h b/libavformat/network.h
> > index 71347e815b..7c93375ae5 100644
> > --- a/libavformat/network.h
> > +++ b/libavformat/network.h
> > @@ -303,6 +303,13 @@ int ff_listen_connect(int fd, const struct sockaddr
> *addr,
> >                        socklen_t addrlen, int timeout,
> >                        URLContext *h, int will_try_next);
> >
> > +/**
> > + * It Checks for a host of proxy address matches with the hostname or
> not.
> > + *
> > + * @param no_proxy Server address of proxy server e.g.
> example.domain.com
> > + * @param hostname Server address of hostname e.g. domain.com
> > + * @return         0 if don't match, 1 for exactly match
> > +*/
> >  int ff_http_match_no_proxy(const char *no_proxy, const char *hostname);
>
> maybe looking at how this function is used makes it clearer what it does
>
> for example
> libavformat/http.c:    use_proxy  =
> !ff_http_match_no_proxy(getenv("no_proxy"), hostname) &&
> libavformat/http.c-                 proxy_path && av_strstart(proxy_path,
> "http://", NULL);
>
>
> but basically
> no_proxy, is a list of addresses for which not to use the proxy server,
> these may be local addresses
>

Thanks
I will correct it soon.

>
>
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> When you are offended at any man's fault, turn to yourself and study your
> own failings. Then you will forget your anger. -- Epictetus
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavformat/network.h b/libavformat/network.h
index 71347e815b..cd533a7cbc 100644
--- a/libavformat/network.h
+++ b/libavformat/network.h
@@ -302,7 +302,13 @@  int ff_accept(int fd, int timeout, URLContext *h);
 int ff_listen_connect(int fd, const struct sockaddr *addr,
                       socklen_t addrlen, int timeout,
                       URLContext *h, int will_try_next);
-
+/**
+ * It Check for host of proxy address matches with hostname or not.
+ *
+ * @param no_proxy URL of proxy address
+ * @param hostname URL of hostname
+ * @return         0 if don't match, 1 for exactly match
+*/
 int ff_http_match_no_proxy(const char *no_proxy, const char *hostname);

 int ff_socket(int domain, int type, int protocol);