Commit 2cd4a475 authored by Sven Neumann's avatar Sven Neumann Committed by Zeeshan Ali (Khattak)
Browse files

Add sanity checks to GUPnPServiceProxyAction API

Check that a GUPnPServiceProxyAction is used with the
GUPnPServiceProxy object that it was created for.
parent 2053cbb6
......@@ -1229,6 +1229,7 @@ gupnp_service_proxy_end_action_valist (GUPnPServiceProxy *proxy,
g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE);
g_return_val_if_fail (action, FALSE);
g_return_val_if_fail (proxy == action->proxy, FALSE);
/* Check for saved error from begin_action() */
if (action->error) {
......@@ -1321,6 +1322,7 @@ gupnp_service_proxy_end_action_list (GUPnPServiceProxy *proxy,
g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE);
g_return_val_if_fail (action, FALSE);
g_return_val_if_fail (proxy == action->proxy, FALSE);
/* Check for saved error from begin_action() */
if (action->error) {
......@@ -1391,6 +1393,7 @@ gupnp_service_proxy_end_action_hash (GUPnPServiceProxy *proxy,
g_return_val_if_fail (GUPNP_IS_SERVICE_PROXY (proxy), FALSE);
g_return_val_if_fail (action, FALSE);
g_return_val_if_fail (proxy == action->proxy, FALSE);
/* Check for saved error from begin_action() */
if (action->error) {
......@@ -1439,6 +1442,7 @@ gupnp_service_proxy_cancel_action (GUPnPServiceProxy *proxy,
g_return_if_fail (GUPNP_IS_SERVICE_PROXY (proxy));
g_return_if_fail (action);
g_return_if_fail (proxy == action->proxy);
if (action->msg != NULL) {
context = gupnp_service_info_get_context
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment