Skip to content

Commit

Permalink
acc: Fix time_t cast
Browse files Browse the repository at this point in the history
CID #417449, #417515, #417685, #417763
  • Loading branch information
oanatitoc committed Sep 18, 2024
1 parent f4aa974 commit d48c7a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/acc/acc.c
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ int acc_log_request( struct sip_msg *rq, struct sip_msg *rpl)

if (ctx) {
/* get created value from context */
_created = (unsigned int)ctx->created;
_created = (unsigned int)(unsigned long)ctx->created;
_setup_time = time(NULL) - _created;
}

Expand Down Expand Up @@ -862,7 +862,7 @@ int acc_aaa_request( struct sip_msg *req, struct sip_msg *rpl)
}

if (ctx) {
_created = (unsigned int)ctx->created;
_created = (unsigned int)(unsigned long)ctx->created;
_setup_time = time(NULL) - _created;
}

Expand Down Expand Up @@ -1012,7 +1012,7 @@ int acc_aaa_cdrs(struct dlg_cell *dlg, struct sip_msg *msg, acc_ctx_t* ctx)
ADD_AAA_AVPAIR( offset + nr_leg_vals + 2, &av_type, -1);

/* Sip-Call-Created (229) */
av_type = (uint32_t)ctx->created;
av_type = (uint32_t)(unsigned long)ctx->created;
ADD_AAA_AVPAIR( offset + nr_leg_vals + 3, &av_type, -1);

/* Sip-Call-MSDuration (230) */
Expand Down Expand Up @@ -1234,7 +1234,7 @@ int acc_evi_request( struct sip_msg *rq, struct sip_msg *rpl, int missed_flag)
return 1;

if (ctx) {
_created = (unsigned int)ctx->created;
_created = (unsigned int)(unsigned long)ctx->created;
_setup_time = time(NULL) - _created;
}

Expand Down

0 comments on commit d48c7a6

Please sign in to comment.