Skip to content

Commit

Permalink
tm: exposed t_reply_error() to intermodule API
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Nov 3, 2023
1 parent 21eeb97 commit 2097922
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/modules/tm/t_reply.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ int t_reply_str(struct cell *t, struct sip_msg *, unsigned int, str *);
int t_reply_unsafe(struct cell *t, struct sip_msg *, unsigned int, char *);
int t_reply_str_unsafe(struct cell *t, struct sip_msg *, unsigned int, str *);

int ki_t_reply_error(sip_msg_t *msg);


enum rps relay_reply(struct cell *t, struct sip_msg *p_msg, int branch,
unsigned int msg_status, struct cancel_info *cancel_data,
Expand Down
2 changes: 1 addition & 1 deletion src/modules/tm/tm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1596,7 +1596,7 @@ int w_t_reply_wrp(struct sip_msg *msg, unsigned int code, char *txt)
/**
* kemi function to send reply based on internal error code
*/
static int ki_t_reply_error(sip_msg_t *msg)
int ki_t_reply_error(sip_msg_t *msg)
{
char err_buffer[128];
str reason;
Expand Down
1 change: 1 addition & 0 deletions src/modules/tm/tm_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ int load_tm(struct tm_binds *tmb)
tmb->set_fr = t_set_fr;
tmb->t_release_transaction = t_release_transaction;
tmb->t_uas_request_clean_parsed = t_uas_request_clean_parsed;
tmb->t_reply_error = ki_t_reply_error;
return 1;
}

Expand Down
7 changes: 4 additions & 3 deletions src/modules/tm/tm_load.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
/* export not usable from scripts */
#define NO_SCRIPT -1

typedef void (*t_on_route_f)(unsigned int);
typedef int (*t_no_param_f)(struct sip_msg *);

struct tm_binds
{
register_tmcb_f register_tmcb;
Expand Down Expand Up @@ -127,6 +130,7 @@ struct tm_binds
tset_fr_f set_fr;
trelease_t t_release_transaction;
t_uas_request_clean_parsed_f t_uas_request_clean_parsed;
t_no_param_f t_reply_error;
};

typedef struct tm_binds tm_api_t;
Expand Down Expand Up @@ -165,9 +169,6 @@ static inline int tm_load_api(tm_api_t *tmb)
* eXtra API - not common used in other modules
*/

typedef void (*t_on_route_f)(unsigned int);
typedef int (*t_no_param_f)(struct sip_msg *);

int t_check_trans(struct sip_msg *msg);
int t_is_canceled(struct sip_msg *msg);

Expand Down

0 comments on commit 2097922

Please sign in to comment.