IMPORTANT NOTE - even if the function prints and returns a static buffer, it * has built-in support for PV_PRINTF_BUF_NO levels of nesting * (or concurrent usage). If you think it's not enough for you, either use * pv_printf() directly, either increase PV_PRINT_BUF_NO --bogdan */
| 5750 | * (or concurrent usage). If you think it's not enough for you, either use |
| 5751 | * pv_printf() directly, either increase PV_PRINT_BUF_NO --bogdan */ |
| 5752 | int pv_printf_s(struct sip_msg* msg, pv_elem_p list, str *s) |
| 5753 | { |
| 5754 | static int buf_itr = 0; |
| 5755 | |
| 5756 | if (list->next==0 && list->spec.getf==0) { |
| 5757 | *s = list->text; |
| 5758 | return 0; |
| 5759 | } else { |
| 5760 | *s = pv_print_buf[buf_itr]; |
| 5761 | buf_itr = (buf_itr + 1) % PV_PRINT_BUF_NO; |
| 5762 | return pv_printf(msg, list, s->s, &s->len); |
| 5763 | } |
| 5764 | } |
| 5765 | |
| 5766 | void pv_spec_free(pv_spec_t *spec) |
| 5767 | { |
no test coverage detected