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

Function print_rs

modules/tm/t_msgbuilder.c:382–411  ·  view source on GitHub ↗

* Print the route set */

Source from the content-addressed store, hash-verified

380 * Print the route set
381 */
382static inline char* print_rs(char* p, struct rte* list, str* contact)
383{
384 struct rte* ptr;
385
386 if (list || contact) {
387 append_string(p, ROUTE_PREFIX, ROUTE_PREFIX_LEN);
388 } else {
389 return p;
390 }
391
392 ptr = list;
393 while(ptr) {
394 if (ptr != list) {
395 append_string(p, ROUTE_SEPARATOR, ROUTE_SEPARATOR_LEN);
396 }
397
398 append_string(p, ptr->ptr->nameaddr.name.s, ptr->ptr->len);
399 ptr = ptr->next;
400 }
401
402 if (contact) {
403 if (list) append_string(p, ROUTE_SEPARATOR, ROUTE_SEPARATOR_LEN);
404 *p++ = '<';
405 append_string(p, contact->s, contact->len);
406 *p++ = '>';
407 }
408
409 append_string(p, CRLF, CRLF_LEN);
410 return p;
411}
412
413
414/*

Callers 1

build_dlg_ackFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected