Skip to content

Commit

Permalink
sipsess: add sipsess_msg getter function (#1225)
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 authored Dec 11, 2024
1 parent 1057937 commit aeea831
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions include/re_sipsess.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,4 +83,5 @@ void sipsess_close_all(struct sipsess_sock *sock);
struct sip_dialog *sipsess_dialog(const struct sipsess *sess);
void sipsess_abort(struct sipsess *sess);
bool sipsess_ack_pending(const struct sipsess *sess);
const struct sip_msg *sipsess_msg(const struct sipsess *sess);
enum sdp_neg_state sipsess_sdp_neg_state(const struct sipsess *sess);
11 changes: 11 additions & 0 deletions src/sipsess/sess.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,17 @@ bool sipsess_ack_pending(const struct sipsess *sess)
}


/**
* Get the SIP message of a SIP Session
*
* @param sess SIP Session
* @return SIP Message
*/
const struct sip_msg *sipsess_msg(const struct sipsess *sess)
{
return sess ? sess->msg : NULL;
}

/**
* Get the SDP negotiation state of a SIP Session
*
Expand Down

0 comments on commit aeea831

Please sign in to comment.