Skip to content

Commit

Permalink
Add note about g_free transaction with handle_message in plugin inter…
Browse files Browse the repository at this point in the history
…face documentation
  • Loading branch information
vincentfretin committed May 20, 2024
1 parent fdd90a5 commit 4bccd18
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/plugins/plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ struct janus_plugin {
* @param[out] error An integer that may contain information about any error */
void (* const create_session)(janus_plugin_session *handle, int *error);
/*! \brief Method to handle an incoming message/request from a peer
* @note The Janus core increases the references to both the message and jsep
* json_t objects. This means that you'll have to decrease your own
* reference yourself with a \c json_decref when you're done with it.
* You'll also have to free transaction with \c g_free.
* @param[in] handle The plugin/gateway session used for this peer
* @param[in] transaction The transaction identifier for this message/request
* @param[in] message The json_t object containing the message/request JSON
Expand Down

0 comments on commit 4bccd18

Please sign in to comment.