diff options
author | Simon Josefsson <simon@josefsson.org> | 2008-03-06 17:41:47 +0100 |
---|---|---|
committer | Simon Josefsson <simon@josefsson.org> | 2008-03-06 17:41:47 +0100 |
commit | d5041665ac09f349b92d554c689f016a115f54e8 (patch) | |
tree | 3bc8db8fbeb00e23dc521f267c5f273a60f569e1 | |
parent | c0cf935257be205d4a9d2d957dd77b23fe4551ed (diff) | |
download | gnutls-d5041665ac09f349b92d554c689f016a115f54e8.tar.gz |
Doc fix.
-rw-r--r-- | lib/gnutls_alert.c | 78 |
1 files changed, 41 insertions, 37 deletions
diff --git a/lib/gnutls_alert.c b/lib/gnutls_alert.c index ce448b65d3..b435727a45 100644 --- a/lib/gnutls_alert.c +++ b/lib/gnutls_alert.c @@ -77,14 +77,14 @@ static const gnutls_alert_entry sup_alerts[] = { #define GNUTLS_ALERT_ID_LOOP(a) \ GNUTLS_ALERT_LOOP( if(p->alert == alert) { a; break; }) - /** * gnutls_alert_get_name - Returns a string describing the alert number given * @alert: is an alert number #gnutls_session_t structure. * * This function will return a string that describes the given alert - * number or NULL. See gnutls_alert_get(). + * number, or %NULL. See gnutls_alert_get(). * + * Returns: string corresponding to #gnutls_alert_description_t value. **/ const char * gnutls_alert_get_name (gnutls_alert_description_t alert) @@ -97,22 +97,23 @@ gnutls_alert_get_name (gnutls_alert_description_t alert) } /** - * gnutls_alert_send - send an alert message to the peer - * @session: is a #gnutls_session_t structure. - * @level: is the level of the alert - * @desc: is the alert description - * - * This function will send an alert to the peer in order to inform - * him of something important (eg. his Certificate could not be verified). - * If the alert level is Fatal then the peer is expected to close the - * connection, otherwise he may ignore the alert and continue. - * - * The error code of the underlying record send function will be returned, - * so you may also receive GNUTLS_E_INTERRUPTED or GNUTLS_E_AGAIN as well. - * - * Returns 0 on success. - * - **/ + * gnutls_alert_send - send an alert message to the peer + * @session: is a #gnutls_session_t structure. + * @level: is the level of the alert + * @desc: is the alert description + * + * This function will send an alert to the peer in order to inform + * him of something important (eg. his Certificate could not be verified). + * If the alert level is Fatal then the peer is expected to close the + * connection, otherwise he may ignore the alert and continue. + * + * The error code of the underlying record send function will be + * returned, so you may also receive %GNUTLS_E_INTERRUPTED or + * %GNUTLS_E_AGAIN as well. + * + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise + * an error code is returned. + **/ int gnutls_alert_send (gnutls_session_t session, gnutls_alert_level_t level, gnutls_alert_description_t desc) @@ -252,22 +253,23 @@ gnutls_error_to_alert (int err, int *level) return ret; } - /** * gnutls_alert_send_appropriate - send an alert to the peer depending on the error code * @session: is a #gnutls_session_t structure. * @err: is an integer * - * Sends an alert to the peer depending on the error code returned by a gnutls - * function. This function will call gnutls_error_to_alert() to determine - * the appropriate alert to send. + * Sends an alert to the peer depending on the error code returned by + * a gnutls function. This function will call gnutls_error_to_alert() + * to determine the appropriate alert to send. * - * This function may also return GNUTLS_E_AGAIN, or GNUTLS_E_INTERRUPTED. + * This function may also return %GNUTLS_E_AGAIN, or + * %GNUTLS_E_INTERRUPTED. * - * If the return value is GNUTLS_E_INVALID_REQUEST, then no alert has + * If the return value is %GNUTLS_E_INVALID_REQUEST, then no alert has * been sent to the peer. * - * Returns zero on success. + * Returns: On success, %GNUTLS_E_SUCCESS (0) is returned, otherwise + * an error code is returned. */ int gnutls_alert_send_appropriate (gnutls_session_t session, int err) @@ -285,18 +287,20 @@ gnutls_alert_send_appropriate (gnutls_session_t session, int err) } /** - * gnutls_alert_get - Returns the last alert number received. - * @session: is a #gnutls_session_t structure. - * - * This function will return the last alert number received. This - * function should be called if GNUTLS_E_WARNING_ALERT_RECEIVED or - * GNUTLS_E_FATAL_ALERT_RECEIVED has been returned by a gnutls - * function. The peer may send alerts if he thinks some things were - * not right. Check gnutls.h for the available alert descriptions. - * - * If no alert has been received the returned value is undefined. - * - **/ + * gnutls_alert_get - Returns the last alert number received. + * @session: is a #gnutls_session_t structure. + * + * This function will return the last alert number received. This + * function should be called if %GNUTLS_E_WARNING_ALERT_RECEIVED or + * %GNUTLS_E_FATAL_ALERT_RECEIVED has been returned by a gnutls + * function. The peer may send alerts if he thinks some things were + * not right. Check gnutls.h for the available alert descriptions. + * + * If no alert has been received the returned value is undefined. + * + * Returns: returns the last alert received, a + * #gnutls_alert_description_t value. + **/ gnutls_alert_description_t gnutls_alert_get (gnutls_session_t session) { |