"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "common/flatpak-utils-http.c" between
flatpak-1.8.2.tar.xz and flatpak-1.8.3.tar.xz

About: Flatpak is a Linux application sandboxing and distribution framework.

flatpak-utils-http.c  (flatpak-1.8.2.tar.xz):flatpak-utils-http.c  (flatpak-1.8.3.tar.xz)
skipping to change at line 464 skipping to change at line 464
case SOUP_STATUS_CANCELLED: case SOUP_STATUS_CANCELLED:
code = G_IO_ERROR_CANCELLED; code = G_IO_ERROR_CANCELLED;
break; break;
case SOUP_STATUS_CANT_RESOLVE: case SOUP_STATUS_CANT_RESOLVE:
case SOUP_STATUS_CANT_CONNECT: case SOUP_STATUS_CANT_CONNECT:
code = G_IO_ERROR_HOST_NOT_FOUND; code = G_IO_ERROR_HOST_NOT_FOUND;
break; break;
case SOUP_STATUS_INTERNAL_SERVER_ERROR:
/* The server did return something, but it was useless to us, so that’
s basically equivalent to not returning */
code = G_IO_ERROR_HOST_UNREACHABLE;
break;
case SOUP_STATUS_IO_ERROR: case SOUP_STATUS_IO_ERROR:
#if !GLIB_CHECK_VERSION(2, 44, 0) #if !GLIB_CHECK_VERSION(2, 44, 0)
code = G_IO_ERROR_BROKEN_PIPE; code = G_IO_ERROR_BROKEN_PIPE;
#else #else
code = G_IO_ERROR_CONNECTION_CLOSED; code = G_IO_ERROR_CONNECTION_CLOSED;
#endif #endif
break; break;
default: default:
code = G_IO_ERROR_FAILED; code = G_IO_ERROR_FAILED;
skipping to change at line 560 skipping to change at line 565
* some retries left. The retry count is set when the operation is first * some retries left. The retry count is set when the operation is first
* created, and must be decremented by the caller. (@n_retries_remaining == 0) * created, and must be decremented by the caller. (@n_retries_remaining == 0)
* will always return %FALSE from this function. * will always return %FALSE from this function.
* *
* This code is copied from libostree's _ostree_fetcher_should_retry_request() * This code is copied from libostree's _ostree_fetcher_should_retry_request()
*/ */
static gboolean static gboolean
flatpak_http_should_retry_request (const GError *error, flatpak_http_should_retry_request (const GError *error,
guint n_retries_remaining) guint n_retries_remaining)
{ {
if (error == NULL)
g_debug ("%s: error: unset, n_retries_remaining: %u",
G_STRFUNC, n_retries_remaining);
else
g_debug ("%s: error: %u:%u %s, n_retries_remaining: %u",
G_STRFUNC, error->domain, error->code, error->message,
n_retries_remaining);
if (error == NULL || n_retries_remaining == 0) if (error == NULL || n_retries_remaining == 0)
return FALSE; return FALSE;
/* Return TRUE for transient errors. */ /* Return TRUE for transient errors. */
if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT) || if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND) || g_error_matches (error, G_IO_ERROR, G_IO_ERROR_HOST_NOT_FOUND) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) || g_error_matches (error, G_IO_ERROR, G_IO_ERROR_HOST_UNREACHABLE) ||
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PARTIAL_INPUT) || g_error_matches (error, G_IO_ERROR, G_IO_ERROR_PARTIAL_INPUT) ||
#if !GLIB_CHECK_VERSION(2, 44, 0) #if !GLIB_CHECK_VERSION(2, 44, 0)
g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE) || g_error_matches (error, G_IO_ERROR, G_IO_ERROR_BROKEN_PIPE) ||
 End of changes. 2 change blocks. 
8 lines changed or deleted 6 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)