/* is this reply of interest for accounting ? */ static inline int should_acc_reply(struct sip_msg *req, struct sip_msg *rpl, int code) { unsigned int i; /* negative transactions reported otherwise only if explicitly * demanded */ if (code >= 300) { if (!is_failed_acc_on(req)) return 0; i = 0; while (failed_filter[i] != 0) { if (failed_filter[i] == code) return 0; i++; } return 1; } if ( !is_acc_on(req) ) return 0; if ( code<200 && !(early_media && parse_headers(rpl,HDR_CONTENTLENGTH_F, 0) == 0 && rpl->content_length && get_content_length(rpl) > 0)) return 0; return 1; /* seed is through, we will account this reply */ }
/* is this reply of interest for accounting ? */ static inline int should_acc_reply(struct sip_msg *req,struct sip_msg *rpl, int code) { /* negative transactions reported otherwise only if explicitly * demanded */ if ( !is_failed_acc_on(req) && code >=300 ) return 0; if ( !is_acc_on(req) ) return 0; if ( code<200 && !(early_media && rpl!=FAKED_REPLY && parse_headers(rpl,HDR_CONTENTLENGTH_F, 0)==0 && rpl->content_length && get_content_length(rpl)>0 ) ) return 0; return 1; /* seed is through, we will account this reply */ }