MCPcopy Create free account
hub / github.com/OpenSIPS/opensips / calc_routeset_len

Function calc_routeset_len

modules/tm/t_msgbuilder.c:350–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

348
349
350static inline int calc_routeset_len(struct rte* list, str* contact)
351{
352 struct rte* ptr;
353 int ret;
354
355 if (list || contact) {
356 ret = ROUTE_PREFIX_LEN + CRLF_LEN;
357 } else {
358 return 0;
359 }
360
361 ptr = list;
362 while(ptr) {
363 if (ptr != list) {
364 ret += ROUTE_SEPARATOR_LEN;
365 }
366 ret += ptr->ptr->len;
367 ptr = ptr->next;
368 }
369
370 if (contact) {
371 if (list) ret += ROUTE_SEPARATOR_LEN;
372 ret += 2 + contact->len;
373 }
374
375 return ret;
376}
377
378
379/*

Callers 1

build_dlg_ackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected