-
-
Notifications
You must be signed in to change notification settings - Fork 60
Do not use Soup.Status.get_phrase #333
Description
Hi, Debian fails to build from source
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=993088
../../src/Services/Network.vala:69.19-69.40: error: The name `get_phrase' does not exist in the context of `Soup.Status' (libsoup-2.4)
var reason = Soup.Status.get_phrase (code);
^^^^^^^^^^^^^^^^^^^^^^
I don't know why that code is not available, according to the API docs it should be. However, the docs describe the API as
**"There is no reason for you to ever use this function."**
(https://valadoc.org/libsoup-2.4/Soup.Status.get_phrase.html).
Instead "you should just look at the message's reason_phrase". Given that the function network.describe_error() is only used twice, it should be easy to replace it:
-
tootle/src/Services/Cache/ImageCache.vala
Line 10 in cb7a179
var error = network.describe_error (code);
instead of network.describe_error (code), we can use the msg that is available in that function. and -
tootle/src/Services/Network/Network.vala
Line 59 in ddba63d
ecb ((int32) status, describe_error ((int32) status));
same, we also have the message available in that function and can use the "reason_phrase". This brings tootle in line with the recommended API as per the libsoup authors.