Skip to content

Commit f946776

Browse files
committed
doc UPDATE add missing doxygen
1 parent dc96bb9 commit f946776

File tree

1 file changed

+24
-12
lines changed

1 file changed

+24
-12
lines changed

src/session_server.c

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1477,11 +1477,16 @@ nc_server_notif_send(struct nc_session *session, struct nc_server_notif *notif,
14771477
return ret;
14781478
}
14791479

1480-
/* must be called holding the session RPC lock! IO lock will be acquired as needed
1481-
* returns: NC_PSPOLL_ERROR,
1482-
* NC_PSPOLL_ERROR | NC_PSPOLL_REPLY_ERROR,
1483-
* NC_PSPOLL_REPLY_ERROR,
1484-
* 0
1480+
/**
1481+
* @brief Send a reply acquiring IO lock as needed.
1482+
* Session RPC lock must be held!
1483+
*
1484+
* @param[in] session Session to use.
1485+
* @param[in] io_timeout Timeout to use for acquiring IO lock.
1486+
* @param[in] rpc RPC to sent.
1487+
* @return 0 on success.
1488+
* @return Bitmask of NC_PSPOLL_ERROR (any fatal error) and NC_PSPOLL_REPLY_ERROR (reply failed to be sent).
1489+
* @return NC_PSPOLL_ERROR on other errors.
14851490
*/
14861491
static int
14871492
nc_server_send_reply_io(struct nc_session *session, int io_timeout, const struct nc_server_rpc *rpc)
@@ -1550,13 +1555,20 @@ nc_server_send_reply_io(struct nc_session *session, int io_timeout, const struct
15501555
return ret;
15511556
}
15521557

1553-
/* session must be running and session RPC lock held!
1554-
* returns: NC_PSPOLL_SESSION_TERM | NC_PSPOLL_SESSION_ERROR, (msg filled)
1555-
* NC_PSPOLL_ERROR, (msg filled)
1556-
* NC_PSPOLL_TIMEOUT,
1557-
* NC_PSPOLL_RPC (some application data available),
1558-
* NC_PSPOLL_SSH_CHANNEL,
1559-
* NC_PSPOLL_SSH_MSG
1558+
/**
1559+
* @brief Poll a session from pspoll acquiring IO lock as needed.
1560+
* Session must be running and session RPC lock held!
1561+
*
1562+
* @param[in] session Session to use.
1563+
* @param[in] io_timeout Timeout to use for acquiring IO lock.
1564+
* @param[in] now_mono Current monotonic timestamp.
1565+
* @param[in,out] msg Message to fill in case of an error.
1566+
* @return NC_PSPOLL_RPC if some application data are available.
1567+
* @return NC_PSPOLL_TIMEOUT if a timeout elapsed.
1568+
* @return NC_PSPOLL_SSH_CHANNEL if a new SSH channel has been created.
1569+
* @return NC_PSPOLL_SSH_MSG if just an SSH message has been processed.
1570+
* @return NC_PSPOLL_SESSION_TERM | NC_PSPOLL_SESSION_ERROR if session has been terminated (@p msg filled).
1571+
* @return NC_PSPOLL_ERROR on other fatal errors (@p msg filled).
15601572
*/
15611573
static int
15621574
nc_ps_poll_session_io(struct nc_session *session, int io_timeout, time_t now_mono, char *msg)

0 commit comments

Comments
 (0)