summaryrefslogtreecommitdiff
path: root/src/nm-auth-utils.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-04-09 11:52:55 +0200
committerThomas Haller <thaller@redhat.com>2018-04-13 09:09:46 +0200
commit50b74731f668067d445a28d7e545a169bf9d25c8 (patch)
tree5e1e829c5acbf76d8292e06f99008be530eb0421 /src/nm-auth-utils.h
parentbfaa291d89c02ee68780aa28eb7f19e1a925954f (diff)
downloadNetworkManager-50b74731f668067d445a28d7e545a169bf9d25c8.tar.gz
auth-chain/trivial: rename nm_auth_chain_unref() to nm_auth_chain_destroy()
NMAuthChain is not really ref-counted. True, we have an internal ref-counter to ensure that the instance stays alive while the callback is invoked. However, the user cannot take additional references as there is no nm_auth_chain_ref(). When the user wants to get rid of the auth-chain, with the current API it is important that the callback won't be called after that point. From the name nm_auth_chain_unref(), it sounds like that there could be multiple references to the auth-chain, and merely unreferencing the object might not guarantee that the callback is canceled. However, that is luckily not the case, because there is no real ref-counting involved here. Just rename the destroy function to make this clearer.
Diffstat (limited to 'src/nm-auth-utils.h')
-rw-r--r--src/nm-auth-utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nm-auth-utils.h b/src/nm-auth-utils.h
index 335edb5b36..808da86a51 100644
--- a/src/nm-auth-utils.h
+++ b/src/nm-auth-utils.h
@@ -62,7 +62,7 @@ void nm_auth_chain_add_call (NMAuthChain *chain,
const char *permission,
gboolean allow_interaction);
-void nm_auth_chain_unref (NMAuthChain *chain);
+void nm_auth_chain_destroy (NMAuthChain *chain);
/* Caller must free returned error description */
gboolean nm_auth_is_subject_in_acl (NMConnection *connection,