summaryrefslogtreecommitdiff
path: root/libgupnp
diff options
context:
space:
mode:
authorJens Georg <mail@jensge.org>2022-06-05 23:23:51 +0200
committerJens Georg <mail@jensge.org>2022-06-05 23:23:51 +0200
commit7722d352895616cf38948cf56b1a4699e62ec0f6 (patch)
tree2bb8530308220fc25a1c3e6180377d19748157d5 /libgupnp
parent3fc3a1b4eba60cc0e475723e3efe08f4dcf02f6f (diff)
downloadgupnp-7722d352895616cf38948cf56b1a4699e62ec0f6.tar.gz
ServiceProxy: Fix Soap error handling in sync call
Diffstat (limited to 'libgupnp')
-rw-r--r--libgupnp/gupnp-service-proxy.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/libgupnp/gupnp-service-proxy.c b/libgupnp/gupnp-service-proxy.c
index 3c08c93..5159d6a 100644
--- a/libgupnp/gupnp-service-proxy.c
+++ b/libgupnp/gupnp-service-proxy.c
@@ -1592,7 +1592,6 @@ gupnp_service_proxy_call_action (GUPnPServiceProxy *proxy,
{
GUPnPContext *context = NULL;
SoupSession *session = NULL;
- GError *internal_error = NULL;
g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), NULL);
g_return_val_if_fail (!action->pending, NULL);
@@ -1606,9 +1605,9 @@ gupnp_service_proxy_call_action (GUPnPServiceProxy *proxy,
action->response = soup_session_send_and_read (session,
action->msg,
cancellable,
- &internal_error);
+ &action->error);
- if (internal_error != NULL) {
+ if (action->error != NULL) {
goto out;
}
@@ -1618,21 +1617,24 @@ gupnp_service_proxy_call_action (GUPnPServiceProxy *proxy,
if (prepare_action_msg (proxy,
action,
"M-POST",
- &internal_error)) {
+ &action->error)) {
g_bytes_unref (action->response);
action->response =
soup_session_send_and_read (session,
action->msg,
cancellable,
- error);
+ &action->error);
}
}
+ if (action->error == NULL)
+ gupnp_service_proxy_action_check_response (action);
+
out:
- if (internal_error != NULL) {
- action->error = g_error_copy (internal_error);
- g_propagate_error (error, internal_error);
+
+ if (action->error != NULL) {
+ g_propagate_error (error, g_error_copy (action->error));
return NULL;
}