summaryrefslogtreecommitdiff
path: root/src/plugins
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2021-06-01 21:16:53 +0200
committerSébastien Helleu <flashcode@flashtux.org>2021-06-01 21:17:13 +0200
commit8c57e8abd3474a23d8117ef38160b486e9a49538 (patch)
tree5f87034b151f08ca96862258e2d59b106ca4bfb1 /src/plugins
parente365e66eebeeb01ad88f0b9e3f17b135c21afc82 (diff)
downloadweechat-8c57e8abd3474a23d8117ef38160b486e9a49538.zip
irc: add comments about parameter sasl_error (issue #1628)
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/irc/irc-sasl.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/plugins/irc/irc-sasl.c b/src/plugins/irc/irc-sasl.c
index b9ed8a542..48eb26c0b 100644
--- a/src/plugins/irc/irc-sasl.c
+++ b/src/plugins/irc/irc-sasl.c
@@ -90,8 +90,8 @@ irc_sasl_mechanism_plain (const char *sasl_username, const char *sasl_password)
* Builds answer for SASL authentication, using mechanism
* "SCRAM-SHA-1", "SCRAM-SHA-256" or "SCRAM-SHA-512".
*
- * If an error is received from the server and sasl_error is not NULL,
- * *sasl_error is set to the error and must be freed after use.
+ * If an error occurs or is received from the server, and if sasl_error is
+ * not NULL, *sasl_error is set to the error and must be freed after use.
*
* Note: result must be freed after use.
*/
@@ -456,6 +456,9 @@ end:
/*
* Returns the content of file with SASL key.
*
+ * If the file is not found and sasl_error is not NULL, *sasl_error is set to
+ * the error and must be freed after use.
+ *
* Note: result must be freed after use.
*/
@@ -502,6 +505,9 @@ irc_sasl_get_key_content (const char *sasl_key, char **sasl_error)
* Builds answer for SASL authentication, using mechanism
* "ECDSA-NIST256P-CHALLENGE".
*
+ * If an error occurs and if sasl_error is not NULL, *sasl_error is set to the
+ * error and must be freed after use.
+ *
* Note: result must be freed after use.
*/
@@ -709,6 +715,9 @@ irc_sasl_mechanism_ecdsa_nist256p_challenge (struct t_irc_server *server,
/*
* Reads key sent by server (Diffie-Hellman key exchange).
*
+ * If an error occurs and if sasl_error is not NULL, *sasl_error is set to the
+ * error and must be freed after use.
+ *
* Returns:
* 1: OK
* 0: error
@@ -839,6 +848,9 @@ end:
* 2. a generator number
* 3. server-generated public key
*
+ * If an error occurs and if sasl_error is not NULL, *sasl_error is set to the
+ * error and must be freed after use.
+ *
* Note: result must be freed after use.
*/
@@ -949,6 +961,9 @@ end:
* 2. a generator number
* 3. server-generated public key
*
+ * If an error occurs and if sasl_error is not NULL, *sasl_error is set to the
+ * error and must be freed after use.
+ *
* Note: result must be freed after use.
*/