diff options
author | Yves-Alexis Perez <corsac@debian.org> | 2014-07-11 07:23:31 +0200 |
---|---|---|
committer | Yves-Alexis Perez <corsac@debian.org> | 2014-07-11 07:23:31 +0200 |
commit | 81c63b0eed39432878f78727f60a1e7499645199 (patch) | |
tree | 82387d8fecd1c20788fd8bd784a9b0bde091fb6b /src/libstrongswan/fetcher | |
parent | c5ebfc7b9c16551fe825dc1d79c3f7e2f096f6c9 (diff) | |
download | vyos-strongswan-81c63b0eed39432878f78727f60a1e7499645199.tar.gz vyos-strongswan-81c63b0eed39432878f78727f60a1e7499645199.zip |
Imported Upstream version 5.2.0
Diffstat (limited to 'src/libstrongswan/fetcher')
-rw-r--r-- | src/libstrongswan/fetcher/fetcher.h | 6 | ||||
-rw-r--r-- | src/libstrongswan/fetcher/fetcher_manager.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/libstrongswan/fetcher/fetcher.h b/src/libstrongswan/fetcher/fetcher.h index 890258c3c..6043dac2e 100644 --- a/src/libstrongswan/fetcher/fetcher.h +++ b/src/libstrongswan/fetcher/fetcher.h @@ -82,6 +82,12 @@ enum fetcher_option_t { FETCH_TIMEOUT, /** + * Sets a pointer to a variable that receives the request's response code. + * Additional argument is a u_int*. + */ + FETCH_RESPONSE_CODE, + + /** * Callback to invoke with each chunk of data. * Additional argument fetch_callback_t. * If this option is not given, the fetcher_default_callback is used, diff --git a/src/libstrongswan/fetcher/fetcher_manager.c b/src/libstrongswan/fetcher/fetcher_manager.c index 2fad486e0..f36cfcf82 100644 --- a/src/libstrongswan/fetcher/fetcher_manager.c +++ b/src/libstrongswan/fetcher/fetcher_manager.c @@ -113,6 +113,10 @@ METHOD(fetcher_manager_t, fetch, status_t, good = fetcher->set_option(fetcher, opt, va_arg(args, fetcher_callback_t)); continue; + case FETCH_RESPONSE_CODE: + good = fetcher->set_option(fetcher, opt, + va_arg(args, u_int*)); + continue; case FETCH_SOURCEIP: host = va_arg(args, host_t*); if (host && !host->is_anyaddr(host)) |