Skip to content

Commit

Permalink
trace api: change param type to str for add_extra_correlation_f
Browse files Browse the repository at this point in the history
  • Loading branch information
rvlad-patrascu authored and liviuchircu committed Apr 4, 2019
1 parent 4bbfb0c commit a3f6353
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion trace_api.h
Expand Up @@ -93,7 +93,7 @@ typedef int (add_chunk_f)(trace_message message, void* data, int len,
* @param3 the value of the new correlation element
* @return 0 for success -1 in case of failure
*/
typedef int (add_extra_correlation_f)(trace_message message, char* key, str* value);
typedef int (add_extra_correlation_f)(trace_message message, str* key, str* value);

/*
* add payload elements other than the basic paylod added when creating the message
Expand Down
3 changes: 2 additions & 1 deletion xlog.c
Expand Up @@ -168,6 +168,7 @@ static inline void add_xlog_data(trace_message message, void* param)
{
str str_level;
xl_trace_t* xtrace_param = param;
static str sip_str = str_init("sip");


switch (xlog_print_level) {
Expand Down Expand Up @@ -202,7 +203,7 @@ static inline void add_xlog_data(trace_message message, void* param)

tprot.add_payload_part( message, "text", &xtrace_param->buf);

tprot.add_extra_correlation( message, "sip", &xtrace_param->msg->callid->body );
tprot.add_extra_correlation( message, &sip_str, &xtrace_param->msg->callid->body );
}

static inline int trace_xlog(struct sip_msg* msg, char* buf, int len)
Expand Down

0 comments on commit a3f6353

Please sign in to comment.