rtpp_hash_table.c:XXH_INLINE_XXH64:
 1935|    692|{
 1936|       |#if 0
 1937|       |    /* Simple version, good for code maintenance, but unfortunately slow for small inputs */
 1938|       |    XXH64_state_t state;
 1939|       |    XXH64_reset(&state, seed);
 1940|       |    XXH64_update(&state, (const xxh_u8*)input, len);
 1941|       |    return XXH64_digest(&state);
 1942|       |
 1943|       |#else
 1944|       |
 1945|    692|    if (XXH_FORCE_ALIGN_CHECK) {
  ------------------
  |  |  850|    692|#    define XXH_FORCE_ALIGN_CHECK 0
  |  |  ------------------
  |  |  |  Branch (850:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1946|      0|        if ((((size_t)input) & 7)==0) {  /* Input is aligned, let's leverage the speed advantage */
  ------------------
  |  Branch (1946:13): [True: 0, False: 0]
  ------------------
 1947|      0|            return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_aligned);
 1948|      0|    }   }
 1949|       |
 1950|    692|    return XXH64_endian_align((const xxh_u8*)input, len, seed, XXH_unaligned);
 1951|       |
 1952|    692|#endif
 1953|    692|}
rtpp_hash_table.c:XXH64_endian_align:
 1893|    692|{
 1894|    692|    const xxh_u8* bEnd = input + len;
 1895|    692|    xxh_u64 h64;
 1896|       |
 1897|       |#if defined(XXH_ACCEPT_NULL_INPUT_POINTER) && (XXH_ACCEPT_NULL_INPUT_POINTER>=1)
 1898|       |    if (input==NULL) {
 1899|       |        len=0;
 1900|       |        bEnd=input=(const xxh_u8*)(size_t)32;
 1901|       |    }
 1902|       |#endif
 1903|       |
 1904|    692|    if (len>=32) {
  ------------------
  |  Branch (1904:9): [True: 18, False: 674]
  ------------------
 1905|     18|        const xxh_u8* const limit = bEnd - 32;
 1906|     18|        xxh_u64 v1 = seed + XXH_PRIME64_1 + XXH_PRIME64_2;
 1907|     18|        xxh_u64 v2 = seed + XXH_PRIME64_2;
 1908|     18|        xxh_u64 v3 = seed + 0;
 1909|     18|        xxh_u64 v4 = seed - XXH_PRIME64_1;
 1910|       |
 1911|    763|        do {
 1912|    763|            v1 = XXH64_round(v1, XXH_get64bits(input)); input+=8;
  ------------------
  |  | 1754|    763|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  ------------------
 1913|    763|            v2 = XXH64_round(v2, XXH_get64bits(input)); input+=8;
  ------------------
  |  | 1754|    763|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  ------------------
 1914|    763|            v3 = XXH64_round(v3, XXH_get64bits(input)); input+=8;
  ------------------
  |  | 1754|    763|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  ------------------
 1915|    763|            v4 = XXH64_round(v4, XXH_get64bits(input)); input+=8;
  ------------------
  |  | 1754|    763|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  ------------------
 1916|    763|        } while (input<=limit);
  ------------------
  |  Branch (1916:18): [True: 745, False: 18]
  ------------------
 1917|       |
 1918|     18|        h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18);
  ------------------
  |  | 1104|     18|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
                      h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18);
  ------------------
  |  | 1104|     18|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
                      h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18);
  ------------------
  |  | 1104|     18|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
                      h64 = XXH_rotl64(v1, 1) + XXH_rotl64(v2, 7) + XXH_rotl64(v3, 12) + XXH_rotl64(v4, 18);
  ------------------
  |  | 1104|     18|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
 1919|     18|        h64 = XXH64_mergeRound(h64, v1);
 1920|     18|        h64 = XXH64_mergeRound(h64, v2);
 1921|     18|        h64 = XXH64_mergeRound(h64, v3);
 1922|     18|        h64 = XXH64_mergeRound(h64, v4);
 1923|       |
 1924|    674|    } else {
 1925|    674|        h64  = seed + XXH_PRIME64_5;
 1926|    674|    }
 1927|       |
 1928|    692|    h64 += (xxh_u64) len;
 1929|       |
 1930|    692|    return XXH64_finalize(h64, input, len, align);
 1931|    692|}
rtpp_hash_table.c:XXH64_round:
 1728|  3.17k|{
 1729|  3.17k|    acc += input * XXH_PRIME64_2;
 1730|  3.17k|    acc  = XXH_rotl64(acc, 31);
  ------------------
  |  | 1104|  3.17k|#  define XXH_rotl64 __builtin_rotateleft64
  ------------------
 1731|  3.17k|    acc *= XXH_PRIME64_1;
 1732|  3.17k|    return acc;
 1733|  3.17k|}
rtpp_hash_table.c:XXH_readLE64_align:
 1703|  3.10k|{
 1704|  3.10k|    if (align==XXH_unaligned)
  ------------------
  |  Branch (1704:9): [True: 3.10k, False: 0]
  ------------------
 1705|  3.10k|        return XXH_readLE64(ptr);
 1706|      0|    else
 1707|      0|        return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u64*)ptr : XXH_swap64(*(const xxh_u64*)ptr);
  ------------------
  |  | 1066|      0|#    define XXH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (1066:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1708|  3.10k|}
rtpp_hash_table.c:XXH_readLE64:
 1691|  3.10k|{
 1692|  3.10k|    return XXH_CPU_LITTLE_ENDIAN ? XXH_read64(ptr) : XXH_swap64(XXH_read64(ptr));
  ------------------
  |  | 1066|  3.10k|#    define XXH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (1066:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1693|  3.10k|}
rtpp_hash_table.c:XXH_read64:
 1633|  3.10k|{
 1634|  3.10k|    xxh_u64 val;
 1635|  3.10k|    memcpy(&val, memPtr, sizeof(val));
 1636|  3.10k|    return val;
 1637|  3.10k|}
rtpp_hash_table.c:XXH64_mergeRound:
 1736|     72|{
 1737|     72|    val  = XXH64_round(0, val);
 1738|     72|    acc ^= val;
 1739|     72|    acc  = acc * XXH_PRIME64_1 + XXH_PRIME64_4;
 1740|     72|    return acc;
 1741|     72|}
rtpp_hash_table.c:XXH64_finalize:
 1758|    692|{
 1759|    692|#define XXH_PROCESS1_64 do {                                   \
 1760|    692|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
 1761|    692|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
 1762|    692|} while (0)
 1763|       |
 1764|    692|#define XXH_PROCESS4_64 do {                                   \
 1765|    692|    h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;      \
 1766|    692|    ptr += 4;                                              \
 1767|    692|    h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;     \
 1768|    692|} while (0)
 1769|       |
 1770|    692|#define XXH_PROCESS8_64 do {                                   \
 1771|    692|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
 1772|    692|    ptr += 8;                                              \
 1773|    692|    h64 ^= k1;                                             \
 1774|    692|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
 1775|    692|} while (0)
 1776|       |
 1777|       |    /* Rerolled version for 32-bit targets is faster and much smaller. */
 1778|    692|    if (XXH_REROLL || XXH_REROLL_XXH64) {
  ------------------
  |  |  895|  1.38k|#    define XXH_REROLL 0
  |  |  ------------------
  |  |  |  Branch (895:24): [Folded - Ignored]
  |  |  ------------------
  ------------------
                  if (XXH_REROLL || XXH_REROLL_XXH64) {
  ------------------
  |  | 1595|      0|#    define XXH_REROLL_XXH64 0
  |  |  ------------------
  |  |  |  Branch (1595:30): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1779|      0|        len &= 31;
 1780|      0|        while (len >= 8) {
  ------------------
  |  Branch (1780:16): [True: 0, False: 0]
  ------------------
 1781|      0|            XXH_PROCESS8_64;
  ------------------
  |  | 1770|      0|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      0|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      0|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      0|    ptr += 8;                                              \
  |  | 1773|      0|    h64 ^= k1;                                             \
  |  | 1774|      0|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      0|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1782|      0|            len -= 8;
 1783|      0|        }
 1784|      0|        if (len >= 4) {
  ------------------
  |  Branch (1784:13): [True: 0, False: 0]
  ------------------
 1785|      0|            XXH_PROCESS4_64;
  ------------------
  |  | 1764|      0|#define XXH_PROCESS4_64 do {                                   \
  |  | 1765|      0|    h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;      \
  |  |  ------------------
  |  |  |  | 1272|      0|#define XXH_get32bits(p) XXH_readLE32_align(p, align)
  |  |  ------------------
  |  | 1766|      0|    ptr += 4;                                              \
  |  | 1767|      0|    h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;     \
  |  |  ------------------
  |  |  |  | 1104|      0|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1768|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (1768:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1786|      0|            len -= 4;
 1787|      0|        }
 1788|      0|        while (len > 0) {
  ------------------
  |  Branch (1788:16): [True: 0, False: 0]
  ------------------
 1789|      0|            XXH_PROCESS1_64;
  ------------------
  |  | 1759|      0|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      0|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      0|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      0|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      0|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1790|      0|            --len;
 1791|      0|        }
 1792|      0|         return  XXH64_avalanche(h64);
 1793|    692|    } else {
 1794|    692|        switch(len & 31) {
  ------------------
  |  Branch (1794:16): [True: 0, False: 692]
  ------------------
 1795|      1|           case 24: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1795:12): [True: 1, False: 691]
  ------------------
 1796|       |                         /* fallthrough */
 1797|      2|           case 16: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1797:12): [True: 1, False: 691]
  ------------------
 1798|       |                         /* fallthrough */
 1799|      4|           case  8: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      4|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      4|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      4|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      4|    ptr += 8;                                              \
  |  | 1773|      4|    h64 ^= k1;                                             \
  |  | 1774|      4|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      4|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1799:12): [True: 2, False: 690]
  ------------------
 1800|      4|                    return XXH64_avalanche(h64);
 1801|       |
 1802|      2|           case 28: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1802:12): [True: 2, False: 690]
  ------------------
 1803|       |                         /* fallthrough */
 1804|      3|           case 20: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      3|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      3|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      3|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      3|    ptr += 8;                                              \
  |  | 1773|      3|    h64 ^= k1;                                             \
  |  | 1774|      3|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1804:12): [True: 1, False: 691]
  ------------------
 1805|       |                         /* fallthrough */
 1806|      4|           case 12: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      4|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      4|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      4|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      4|    ptr += 8;                                              \
  |  | 1773|      4|    h64 ^= k1;                                             \
  |  | 1774|      4|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      4|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1806:12): [True: 1, False: 691]
  ------------------
 1807|       |                         /* fallthrough */
 1808|      6|           case  4: XXH_PROCESS4_64;
  ------------------
  |  | 1764|      6|#define XXH_PROCESS4_64 do {                                   \
  |  | 1765|      6|    h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;      \
  |  |  ------------------
  |  |  |  | 1272|      6|#define XXH_get32bits(p) XXH_readLE32_align(p, align)
  |  |  ------------------
  |  | 1766|      6|    ptr += 4;                                              \
  |  | 1767|      6|    h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;     \
  |  |  ------------------
  |  |  |  | 1104|      6|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1768|      6|} while (0)
  |  |  ------------------
  |  |  |  Branch (1768:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1808:12): [True: 2, False: 690]
  ------------------
 1809|      6|                    return XXH64_avalanche(h64);
 1810|       |
 1811|      1|           case 25: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1811:12): [True: 1, False: 691]
  ------------------
 1812|       |                         /* fallthrough */
 1813|      2|           case 17: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1813:12): [True: 1, False: 691]
  ------------------
 1814|       |                         /* fallthrough */
 1815|      3|           case  9: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      3|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      3|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      3|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      3|    ptr += 8;                                              \
  |  | 1773|      3|    h64 ^= k1;                                             \
  |  | 1774|      3|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1815:12): [True: 1, False: 691]
  ------------------
 1816|      3|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      3|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      3|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      3|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1817|      3|                    return XXH64_avalanche(h64);
 1818|       |
 1819|      1|           case 29: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1819:12): [True: 1, False: 691]
  ------------------
 1820|       |                         /* fallthrough */
 1821|      2|           case 21: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1821:12): [True: 1, False: 691]
  ------------------
 1822|       |                         /* fallthrough */
 1823|      4|           case 13: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      4|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      4|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      4|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      4|    ptr += 8;                                              \
  |  | 1773|      4|    h64 ^= k1;                                             \
  |  | 1774|      4|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      4|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1823:12): [True: 2, False: 690]
  ------------------
 1824|       |                         /* fallthrough */
 1825|      5|           case  5: XXH_PROCESS4_64;
  ------------------
  |  | 1764|      5|#define XXH_PROCESS4_64 do {                                   \
  |  | 1765|      5|    h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;      \
  |  |  ------------------
  |  |  |  | 1272|      5|#define XXH_get32bits(p) XXH_readLE32_align(p, align)
  |  |  ------------------
  |  | 1766|      5|    ptr += 4;                                              \
  |  | 1767|      5|    h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;     \
  |  |  ------------------
  |  |  |  | 1104|      5|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1768|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (1768:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1825:12): [True: 1, False: 691]
  ------------------
 1826|      5|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      5|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      5|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      5|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      5|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1827|      5|                    return XXH64_avalanche(h64);
 1828|       |
 1829|      1|           case 26: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1829:12): [True: 1, False: 691]
  ------------------
 1830|       |                         /* fallthrough */
 1831|      2|           case 18: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1831:12): [True: 1, False: 691]
  ------------------
 1832|       |                         /* fallthrough */
 1833|      3|           case 10: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      3|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      3|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      3|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      3|    ptr += 8;                                              \
  |  | 1773|      3|    h64 ^= k1;                                             \
  |  | 1774|      3|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1833:12): [True: 1, False: 691]
  ------------------
 1834|      3|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      3|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      3|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      3|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1835|      3|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      3|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      3|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      3|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1836|      3|                    return XXH64_avalanche(h64);
 1837|       |
 1838|      1|           case 30: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1838:12): [True: 1, False: 691]
  ------------------
 1839|       |                         /* fallthrough */
 1840|      3|           case 22: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      3|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      3|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      3|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      3|    ptr += 8;                                              \
  |  | 1773|      3|    h64 ^= k1;                                             \
  |  | 1774|      3|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1840:12): [True: 2, False: 690]
  ------------------
 1841|       |                         /* fallthrough */
 1842|      4|           case 14: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      4|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      4|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      4|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      4|    ptr += 8;                                              \
  |  | 1773|      4|    h64 ^= k1;                                             \
  |  | 1774|      4|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      4|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1842:12): [True: 1, False: 691]
  ------------------
 1843|       |                         /* fallthrough */
 1844|      5|           case  6: XXH_PROCESS4_64;
  ------------------
  |  | 1764|      5|#define XXH_PROCESS4_64 do {                                   \
  |  | 1765|      5|    h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;      \
  |  |  ------------------
  |  |  |  | 1272|      5|#define XXH_get32bits(p) XXH_readLE32_align(p, align)
  |  |  ------------------
  |  | 1766|      5|    ptr += 4;                                              \
  |  | 1767|      5|    h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;     \
  |  |  ------------------
  |  |  |  | 1104|      5|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1768|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (1768:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1844:12): [True: 1, False: 691]
  ------------------
 1845|      5|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      5|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      5|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      5|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      5|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1846|      5|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      5|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      5|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      5|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      5|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      5|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1847|      5|                    return XXH64_avalanche(h64);
 1848|       |
 1849|      1|           case 27: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1849:12): [True: 1, False: 691]
  ------------------
 1850|       |                         /* fallthrough */
 1851|      2|           case 19: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1851:12): [True: 1, False: 691]
  ------------------
 1852|       |                         /* fallthrough */
 1853|      3|           case 11: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      3|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      3|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      3|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      3|    ptr += 8;                                              \
  |  | 1773|      3|    h64 ^= k1;                                             \
  |  | 1774|      3|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1853:12): [True: 1, False: 691]
  ------------------
 1854|      3|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      3|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      3|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      3|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1855|      3|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      3|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      3|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      3|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1856|      3|                    XXH_PROCESS1_64;
  ------------------
  |  | 1759|      3|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      3|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      3|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1857|      3|                    return XXH64_avalanche(h64);
 1858|       |
 1859|      1|           case 31: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      1|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      1|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      1|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      1|    ptr += 8;                                              \
  |  | 1773|      1|    h64 ^= k1;                                             \
  |  | 1774|      1|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      1|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      1|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1859:12): [True: 1, False: 691]
  ------------------
 1860|       |                         /* fallthrough */
 1861|      2|           case 23: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      2|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      2|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      2|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      2|    ptr += 8;                                              \
  |  | 1773|      2|    h64 ^= k1;                                             \
  |  | 1774|      2|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      2|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      2|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1861:12): [True: 1, False: 691]
  ------------------
 1862|       |                         /* fallthrough */
 1863|      3|           case 15: XXH_PROCESS8_64;
  ------------------
  |  | 1770|      3|#define XXH_PROCESS8_64 do {                                   \
  |  | 1771|      3|    xxh_u64 const k1 = XXH64_round(0, XXH_get64bits(ptr)); \
  |  |  ------------------
  |  |  |  | 1754|      3|#define XXH_get64bits(p) XXH_readLE64_align(p, align)
  |  |  ------------------
  |  | 1772|      3|    ptr += 8;                                              \
  |  | 1773|      3|    h64 ^= k1;                                             \
  |  | 1774|      3|    h64  = XXH_rotl64(h64,27) * XXH_PRIME64_1 + XXH_PRIME64_4;     \
  |  |  ------------------
  |  |  |  | 1104|      3|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1775|      3|} while (0)
  |  |  ------------------
  |  |  |  Branch (1775:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1863:12): [True: 1, False: 691]
  ------------------
 1864|       |                         /* fallthrough */
 1865|      4|           case  7: XXH_PROCESS4_64;
  ------------------
  |  | 1764|      4|#define XXH_PROCESS4_64 do {                                   \
  |  | 1765|      4|    h64 ^= (xxh_u64)(XXH_get32bits(ptr)) * XXH_PRIME64_1;      \
  |  |  ------------------
  |  |  |  | 1272|      4|#define XXH_get32bits(p) XXH_readLE32_align(p, align)
  |  |  ------------------
  |  | 1766|      4|    ptr += 4;                                              \
  |  | 1767|      4|    h64 = XXH_rotl64(h64, 23) * XXH_PRIME64_2 + XXH_PRIME64_3;     \
  |  |  ------------------
  |  |  |  | 1104|      4|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1768|      4|} while (0)
  |  |  ------------------
  |  |  |  Branch (1768:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1865:12): [True: 1, False: 691]
  ------------------
 1866|       |                         /* fallthrough */
 1867|      6|           case  3: XXH_PROCESS1_64;
  ------------------
  |  | 1759|      6|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      6|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      6|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      6|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      6|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1867:12): [True: 2, False: 690]
  ------------------
 1868|       |                         /* fallthrough */
 1869|      9|           case  2: XXH_PROCESS1_64;
  ------------------
  |  | 1759|      9|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|      9|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|      9|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|      9|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|      9|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1869:12): [True: 3, False: 689]
  ------------------
 1870|       |                         /* fallthrough */
 1871|    648|           case  1: XXH_PROCESS1_64;
  ------------------
  |  | 1759|    648|#define XXH_PROCESS1_64 do {                                   \
  |  | 1760|    648|    h64 ^= (*ptr++) * XXH_PRIME64_5;                           \
  |  | 1761|    648|    h64 = XXH_rotl64(h64, 11) * XXH_PRIME64_1;                 \
  |  |  ------------------
  |  |  |  | 1104|    648|#  define XXH_rotl64 __builtin_rotateleft64
  |  |  ------------------
  |  | 1762|    648|} while (0)
  |  |  ------------------
  |  |  |  Branch (1762:10): [Folded - Ignored]
  |  |  ------------------
  ------------------
  |  Branch (1871:12): [True: 639, False: 53]
  ------------------
 1872|       |                         /* fallthrough */
 1873|    663|           case  0: return XXH64_avalanche(h64);
  ------------------
  |  Branch (1873:12): [True: 15, False: 677]
  ------------------
 1874|    692|        }
 1875|    692|    }
 1876|       |    /* impossible to reach */
 1877|      0|    XXH_ASSERT(0);
  ------------------
  |  |  973|      0|#  define XXH_ASSERT(c)   ((void)0)
  ------------------
 1878|      0|    return 0;  /* unreachable, but some compilers complain without it */
 1879|    692|}
rtpp_hash_table.c:XXH64_avalanche:
 1744|    692|{
 1745|    692|    h64 ^= h64 >> 33;
 1746|    692|    h64 *= XXH_PRIME64_2;
 1747|    692|    h64 ^= h64 >> 29;
 1748|    692|    h64 *= XXH_PRIME64_3;
 1749|    692|    h64 ^= h64 >> 32;
 1750|    692|    return h64;
 1751|    692|}
rtpp_hash_table.c:XXH_readLE32_align:
 1173|     20|{
 1174|     20|    if (align==XXH_unaligned) {
  ------------------
  |  Branch (1174:9): [True: 20, False: 0]
  ------------------
 1175|     20|        return XXH_readLE32(ptr);
 1176|     20|    } else {
 1177|      0|        return XXH_CPU_LITTLE_ENDIAN ? *(const xxh_u32*)ptr : XXH_swap32(*(const xxh_u32*)ptr);
  ------------------
  |  | 1066|      0|#    define XXH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (1066:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1178|      0|    }
 1179|     20|}
rtpp_hash_table.c:XXH_readLE32:
 1161|     20|{
 1162|     20|    return XXH_CPU_LITTLE_ENDIAN ? XXH_read32(ptr) : XXH_swap32(XXH_read32(ptr));
  ------------------
  |  | 1066|     20|#    define XXH_CPU_LITTLE_ENDIAN 1
  |  |  ------------------
  |  |  |  Branch (1066:35): [Folded - Ignored]
  |  |  ------------------
  ------------------
 1163|     20|}
rtpp_hash_table.c:XXH_read32:
 1038|     20|{
 1039|     20|    xxh_u32 val;
 1040|     20|    memcpy(&val, memPtr, sizeof(val));
 1041|     20|    return val;
 1042|     20|}

prdic_init:
   81|      4|{
   82|      4|    struct prdic_inst *pip;
   83|       |
   84|      4|    pip = malloc(sizeof(struct prdic_inst));
   85|      4|    if (pip == NULL) {
  ------------------
  |  Branch (85:9): [True: 0, False: 4]
  ------------------
   86|      0|        goto e0;
   87|      0|    }
   88|      4|    memset(pip, '\0', sizeof(struct prdic_inst));
   89|      4|    pip->root_band = malloc(sizeof(struct prdic_band));
   90|      4|    if (pip->root_band == NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 4]
  ------------------
   91|      0|        goto e1;
   92|      0|    }
   93|      4|    memset(pip->root_band, '\0', sizeof(struct prdic_band));
   94|      4|    pip->ab = pip->root_band;
   95|      4|    if (getttime(&pip->ab->epoch, 0) != 0) {
  ------------------
  |  Branch (95:9): [True: 0, False: 4]
  ------------------
   96|      0|        goto e2;
   97|      0|    }
   98|      4|    tplusdtime(&pip->ab->epoch, off_from_now);
   99|      4|    band_init(pip->ab, PRDIC_DET_FREQ, freq_hz);
  100|      4|    return ((void *)pip);
  101|      0|e2:
  102|      0|    free(pip->root_band);
  103|      0|e1:
  104|      0|    free(pip);
  105|      0|e0:
  106|      0|    return (NULL);
  107|      0|}
prdic_procrastinate:
  227|    128|{
  228|    128|    struct prdic_inst *pip;
  229|       |
  230|    128|    pip = (struct prdic_inst *)prdic_inst;
  231|    128|    switch (pip->ab->det_type) {
  232|    128|    case PRDIC_DET_FREQ:
  ------------------
  |  Branch (232:5): [True: 128, False: 0]
  ------------------
  233|    128|        return (_prdic_procrastinate_FD(pip));
  234|      0|    case PRDIC_DET_PHASE:
  ------------------
  |  Branch (234:5): [True: 0, False: 128]
  ------------------
  235|      0|        return (_prdic_procrastinate_PFD(pip));
  236|      0|    default:
  ------------------
  |  Branch (236:5): [True: 0, False: 128]
  ------------------
  237|      0|        abort();
  238|    128|    }
  239|    128|}
periodic.c:band_init:
   54|      4|{
   55|       |
   56|      4|    bp->det_type = dt;
   57|      4|    bp->freq_hz = freq_hz;
   58|      4|    bp->period = 1.0 / freq_hz;
   59|      4|    dtime2timespec(bp->period, &bp->tperiod);
  ------------------
  |  |   37|      4|    do {                                                           \
  |  |   38|      4|        SEC(tp) = trunc(d);                                        \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   39|      4|        NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   31|      4|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   32|      4|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   40|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   60|      4|    dtime2timespec(freq_hz, &bp->tfreq_hz);
  ------------------
  |  |   37|      4|    do {                                                           \
  |  |   38|      4|        SEC(tp) = trunc(d);                                        \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   39|      4|        NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   31|      4|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   32|      4|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   40|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|      4|    _prdic_recfilter_init(&bp->loop_error, 0.96, 1.0);
   62|      4|    _prdic_shmtrig_init(&bp->le_shmtrig, 1, 0.3, 0.7);
   63|      4|    bp->loop_error.procchain[0] = &(bp->le_shmtrig.link);
   64|      4|    _prdic_recfilter_init(&bp->add_delay_fltrd, 0.96, 1.0);
   65|      4|    _prdic_recfilter_init(&bp->sysload_fltrd, 0.997, 0.0);
   66|      4|    switch (dt) {
   67|      4|    case PRDIC_DET_FREQ:
  ------------------
  |  Branch (67:5): [True: 4, False: 0]
  ------------------
   68|      4|        _prdic_FD_init(&bp->detector.freq);
   69|      4|        break;
   70|      0|    case PRDIC_DET_PHASE:
  ------------------
  |  Branch (70:5): [True: 0, False: 4]
  ------------------
   71|      0|        _prdic_PFD_init(&bp->detector.phase);
   72|      0|        break;
   73|      0|    default:
  ------------------
  |  Branch (73:5): [True: 0, False: 4]
  ------------------
   74|      0|        abort();
   75|      4|    }
   76|       |
   77|      4|}

_prdic_FD_init:
   38|      4|{
   39|       |
   40|      4|    memset(fd_p, '\0', sizeof(struct _prdic_FD));
   41|      4|}
_prdic_FD_get_error:
   45|    124|{
   46|    124|    double err0r;
   47|    124|    struct timespec ttclk;
   48|       |
   49|    124|    if (timespeciszero(&fd_p->last_tclk)) {
  ------------------
  |  |   42|    124|#define timespeciszero(t) (SEC(t) == 0 && NSEC(t) == 0)
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |               #define timespeciszero(t) (SEC(t) == 0 && NSEC(t) == 0)
  |  |  ------------------
  |  |  |  |   31|      3|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |  |  Branch (42:28): [True: 3, False: 121]
  |  |  |  Branch (42:43): [True: 3, False: 0]
  |  |  ------------------
  ------------------
   50|      3|        fd_p->last_tclk = *tclk;
   51|      3|        return (0.0);
   52|      3|    }
   53|    121|    timespecsub2(&ttclk, tclk, &fd_p->last_tclk);
  ------------------
  |  |   71|    121|    do {                                                              \
  |  |   72|    121|        SEC(r) = SEC(v) - SEC(u);                                     \
  |  |  ------------------
  |  |  |  |   30|    121|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       SEC(r) = SEC(v) - SEC(u);                                     \
  |  |  ------------------
  |  |  |  |   30|    121|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       SEC(r) = SEC(v) - SEC(u);                                     \
  |  |  ------------------
  |  |  |  |   30|    121|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   73|    121|        NSEC(r) = NSEC(v) - NSEC(u);                                  \
  |  |  ------------------
  |  |  |  |   31|    121|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(r) = NSEC(v) - NSEC(u);                                  \
  |  |  ------------------
  |  |  |  |   31|    121|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(r) = NSEC(v) - NSEC(u);                                  \
  |  |  ------------------
  |  |  |  |   31|    121|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |   74|    121|        if (NSEC(r) < 0 && (SEC(r) > 0 || NSEC(r) <= -NSEC_IN_SEC)) { \
  |  |  ------------------
  |  |  |  |   31|    121|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       if (NSEC(r) < 0 && (SEC(r) > 0 || NSEC(r) <= -NSEC_IN_SEC)) { \
  |  |  ------------------
  |  |  |  |   30|     73|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       if (NSEC(r) < 0 && (SEC(r) > 0 || NSEC(r) <= -NSEC_IN_SEC)) { \
  |  |  ------------------
  |  |  |  |   31|      0|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       if (NSEC(r) < 0 && (SEC(r) > 0 || NSEC(r) <= -NSEC_IN_SEC)) { \
  |  |  ------------------
  |  |  |  |   32|      0|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |  |  Branch (74:13): [True: 73, False: 48]
  |  |  |  Branch (74:29): [True: 73, False: 0]
  |  |  |  Branch (74:43): [True: 0, False: 0]
  |  |  ------------------
  |  |   75|     73|            SEC(r)--;                                                 \
  |  |  ------------------
  |  |  |  |   30|     73|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   76|     73|            NSEC(r) += NSEC_IN_SEC;                                   \
  |  |  ------------------
  |  |  |  |   31|     73|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                           NSEC(r) += NSEC_IN_SEC;                                   \
  |  |  ------------------
  |  |  |  |   32|     73|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |   77|     73|        }                                                             \
  |  |   78|    121|    } while (0);
  |  |  ------------------
  |  |  |  Branch (78:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   54|    121|    err0r = timespec2dtime(&ttclk);
  ------------------
  |  |   34|    121|#define timespec2dtime(s) ((double)SEC(s) + \
  |  |  ------------------
  |  |  |  |   30|    121|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   35|    121|  (double)NSEC(s) / (double)NSEC_IN_SEC)
  |  |  ------------------
  |  |  |  |   31|    121|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                 (double)NSEC(s) / (double)NSEC_IN_SEC)
  |  |  ------------------
  |  |  |  |   32|    121|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  ------------------
   55|    121|    fd_p->last_tclk = *tclk;
   56|    121|    return (1.0 - err0r);
   57|    124|}

_prdic_do_procrastinate:
   51|    128|{
   52|    128|    struct timespec tsleep, tremain;
   53|    128|    int rval, nint;
   54|    128|    double add_delay;
   55|    128|    struct timespec eptime;
   56|       |
   57|    128|    if (pip->sip != NULL) {
  ------------------
  |  Branch (57:9): [True: 0, False: 128]
  ------------------
   58|      0|        prdic_CFT_serve(pip->sip);
   59|      0|        prdic_sign_unblock(pip->sip);
   60|      0|    }
   61|    128|    if (skipdelay) {
  ------------------
  |  Branch (61:9): [True: 0, False: 128]
  ------------------
   62|      0|        goto skipdelay;
   63|      0|    }
   64|       |
   65|    128|    add_delay = pip->ab->period * pip->ab->add_delay_fltrd.lastval;
   66|    128|    dtime2timespec(add_delay, &tremain);
  ------------------
  |  |   37|    128|    do {                                                           \
  |  |   38|    128|        SEC(tp) = trunc(d);                                        \
  |  |  ------------------
  |  |  |  |   30|    128|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   39|    128|        NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   31|    128|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   32|    128|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   30|    128|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   40|    128|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   67|       |
   68|    128|    do {
   69|    128|        unsigned int nsigns;
   70|       |
   71|    128|        tsleep = tremain;
   72|    128|        memset(&tremain, '\0', sizeof(tremain));
   73|    128|        if (pip->sip != NULL) {
  ------------------
  |  Branch (73:13): [True: 0, False: 128]
  ------------------
   74|      0|            nsigns = prdic_sign_getnrecv();
   75|      0|        }
   76|    128|        rval = nanosleep(&tsleep, &tremain);
   77|    128|        nint = (rval < 0 && errno == EINTR);
  ------------------
  |  Branch (77:17): [True: 0, False: 128]
  |  Branch (77:29): [True: 0, False: 0]
  ------------------
   78|    128|        if (pip->sip != NULL) {
  ------------------
  |  Branch (78:13): [True: 0, False: 128]
  ------------------
   79|      0|            if (nint && nsigns == prdic_sign_getnrecv()) {
  ------------------
  |  Branch (79:17): [True: 0, False: 0]
  |  Branch (79:25): [True: 0, False: 0]
  ------------------
   80|       |                /* Got some interrupt, but it was not *our* signal */
   81|      0|                break;
   82|      0|            }
   83|      0|            prdic_sign_block(pip->sip);
   84|      0|            prdic_CFT_serve(pip->sip);
   85|      0|            prdic_sign_unblock(pip->sip);
   86|      0|        }
   87|    128|    } while (nint && !timespeciszero(&tremain));
  ------------------
  |  |   42|      0|#define timespeciszero(t) (SEC(t) == 0 && NSEC(t) == 0)
  |  |  ------------------
  |  |  |  |   30|      0|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |               #define timespeciszero(t) (SEC(t) == 0 && NSEC(t) == 0)
  |  |  ------------------
  |  |  |  |   31|      0|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |  |  Branch (42:28): [True: 0, False: 0]
  |  |  |  Branch (42:43): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (87:14): [True: 0, False: 128]
  ------------------
   88|       |
   89|    124|skipdelay:
   90|    124|    if (pip->sip != NULL) {
  ------------------
  |  Branch (90:9): [True: 0, False: 124]
  ------------------
   91|      0|        prdic_sign_block(pip->sip);
   92|      0|    }
   93|    124|    getttime(&eptime, 1);
   94|       |
   95|    124|    timespecsub(&eptime, &pip->ab->epoch);
  ------------------
  |  |   61|    124|    do {                                \
  |  |   62|    124|        SEC(vvp) -= SEC(uvp);           \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       SEC(vvp) -= SEC(uvp);           \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   63|    124|        NSEC(vvp) -= NSEC(uvp);         \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(vvp) -= NSEC(uvp);         \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |   64|    124|        if (NSEC(vvp) < 0) {            \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |  |  Branch (64:13): [True: 113, False: 11]
  |  |  ------------------
  |  |   65|    113|            SEC(vvp)--;                 \
  |  |  ------------------
  |  |  |  |   30|    113|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   66|    113|            NSEC(vvp) += NSEC_IN_SEC;   \
  |  |  ------------------
  |  |  |  |   31|    113|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                           NSEC(vvp) += NSEC_IN_SEC;   \
  |  |  ------------------
  |  |  |  |   32|    113|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |   67|    113|        }                               \
  |  |   68|    124|    } while (0)
  |  |  ------------------
  |  |  |  Branch (68:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   96|    124|    timespecmul(&pip->ab->last_tclk, &eptime, &pip->ab->tfreq_hz);
  ------------------
  |  |   81|    124|    do {                                                           \
  |  |   82|    124|        long long tnsec;                                           \
  |  |   83|    124|        SEC(rvp) = SEC(vvp) * SEC(uvp);                            \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       SEC(rvp) = SEC(vvp) * SEC(uvp);                            \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       SEC(rvp) = SEC(vvp) * SEC(uvp);                            \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   84|    124|        tnsec = (long long)(NSEC(vvp) * NSEC(uvp)) / NSEC_IN_SEC;  \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       tnsec = (long long)(NSEC(vvp) * NSEC(uvp)) / NSEC_IN_SEC;  \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       tnsec = (long long)(NSEC(vvp) * NSEC(uvp)) / NSEC_IN_SEC;  \
  |  |  ------------------
  |  |  |  |   32|    124|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |   85|    124|        tnsec += (long long)(SEC(vvp) * NSEC(uvp));                \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       tnsec += (long long)(SEC(vvp) * NSEC(uvp));                \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |   86|    124|        tnsec += (long long)(SEC(uvp) * NSEC(vvp));                \
  |  |  ------------------
  |  |  |  |   30|    124|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       tnsec += (long long)(SEC(uvp) * NSEC(vvp));                \
  |  |  ------------------
  |  |  |  |   31|    124|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |   87|    124|        if (tnsec >= NSEC_IN_SEC) {                                \
  |  |  ------------------
  |  |  |  |   32|    124|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |  |  Branch (87:13): [True: 122, False: 2]
  |  |  ------------------
  |  |   88|    122|            SEC(rvp) += (tnsec / NSEC_IN_SEC);                     \
  |  |  ------------------
  |  |  |  |   30|    122|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                           SEC(rvp) += (tnsec / NSEC_IN_SEC);                     \
  |  |  ------------------
  |  |  |  |   32|    122|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |   89|    122|            NSEC(rvp) = (tnsec % NSEC_IN_SEC);                     \
  |  |  ------------------
  |  |  |  |   31|    122|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                           NSEC(rvp) = (tnsec % NSEC_IN_SEC);                     \
  |  |  ------------------
  |  |  |  |   32|    122|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |   90|    122|        } else {                                                   \
  |  |   91|      2|            NSEC(rvp) = tnsec;                                     \
  |  |  ------------------
  |  |  |  |   31|      2|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |   92|      2|        }                                                          \
  |  |   93|    124|    } while (0)
  |  |  ------------------
  |  |  |  Branch (93:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   97|    124|}

_prdic_procrastinate_FD:
   56|    128|{
   57|    128|    double eval, teval, add_delay;
   58|    128|    struct prdic_band *abp = pip->ab;
   59|       |#if PRD_DEBUG
   60|       |    static long long nrun = -1;
   61|       |
   62|       |    nrun += 1;
   63|       |#endif
   64|       |
   65|       |#if PRD_DEBUG
   66|       |    add_delay = abp->period * abp->add_delay_fltrd.lastval;
   67|       |    fprintf(stderr, "nrun=%lld add_delay=%f add_delay_fltrd=%f lastval=%f\n",
   68|       |      nrun, add_delay, abp->add_delay_fltrd.lastval,
   69|       |      abp->loop_error.lastval);
   70|       |    fflush(stderr);
   71|       |#endif
   72|       |
   73|    128|    _prdic_do_procrastinate(pip, abp->add_delay_fltrd.lastval <= 0);
   74|       |
   75|    128|    eval = _prdic_FD_get_error(&abp->detector.freq, &abp->last_tclk);
   76|    128|    eval = abp->loop_error.lastval + erf(eval - abp->loop_error.lastval);
   77|    128|    _prdic_recfilter_apply(&abp->loop_error, eval);
   78|    128|    add_delay = abp->add_delay_fltrd.lastval + eval;
   79|    128|    _prdic_recfilter_apply(&abp->add_delay_fltrd, add_delay);
   80|    128|    if (abp->add_delay_fltrd.lastval < 0.0) {
  ------------------
  |  Branch (80:9): [True: 0, False: 128]
  ------------------
   81|      0|        abp->add_delay_fltrd.lastval = 0;
   82|    128|    } else if (abp->add_delay_fltrd.lastval > 1.0) {
  ------------------
  |  Branch (82:16): [True: 25, False: 103]
  ------------------
   83|     25|        abp->add_delay_fltrd.lastval = 1.0;
   84|     25|    }
   85|    128|    if (abp->add_delay_fltrd.lastval > 0) {
  ------------------
  |  Branch (85:9): [True: 124, False: 4]
  ------------------
   86|    124|        teval = 1.0 - abp->add_delay_fltrd.lastval;
   87|    124|    } else {
   88|      4|        teval = 1.0 - abp->loop_error.lastval;
   89|      4|    }
   90|    128|    _prdic_recfilter_apply(&abp->sysload_fltrd, teval);
   91|       |
   92|       |#if PRD_DEBUG
   93|       |    fprintf(stderr, "run=%lld raw_error=%f filtered_error=%f teval=%f filtered_teval=%f\n", nrun,
   94|       |      eval, abp->loop_error.lastval, teval, abp->sysload_fltrd.lastval);
   95|       |    fflush(stderr);
   96|       |#endif
   97|       |
   98|       |#if PRD_DEBUG
   99|       |    fprintf(stderr, "error=%f\n", eval);
  100|       |    if (eval == 0.0 || 1) {
  101|       |        fprintf(stderr, "last=%lld target=%lld\n", SEC(&abp->last_tclk),
  102|       |          SEC(&abp->detector.freq.last_tclk));
  103|       |    }
  104|       |    fflush(stderr);
  105|       |#endif
  106|       |
  107|    128|    return (0);
  108|    128|}

_prdic_recfilter_apply:
   39|    372|{
   40|    372|    double chainval;
   41|       |
   42|    372|    f->lastval = f->a * x + f->b * f->lastval;
   43|    496|    for (int i = 0; f->procchain[i] != NULL; i++) {
  ------------------
  |  Branch (43:21): [True: 124, False: 372]
  ------------------
   44|    124|        struct _prdic_procchain *clnk;
   45|       |
   46|    124|        if (i == 0)
  ------------------
  |  Branch (46:13): [True: 124, False: 0]
  ------------------
   47|    124|            chainval = f->lastval;
   48|    124|        clnk = f->procchain[i];
   49|    124|        chainval = clnk->handle(clnk->arg, chainval);
   50|    124|    }
   51|    372|    return f->lastval;
   52|    372|}
_prdic_recfilter_init:
   56|     12|{
   57|       |
   58|     12|    f->lastval = initval;
   59|     12|    _prdic_recfilter_adjust(f, fcoef);
   60|     12|}
_prdic_recfilter_adjust:
   64|     12|{
   65|       |
   66|     12|    assert(fcoef < 1.0 && fcoef > 0.0);
   67|     12|    f->a = 1.0 - fcoef;
   68|     12|    f->b = fcoef;
   69|     12|}

_prdic_shmtrig_init:
   48|      4|{
   49|       |
   50|      4|    pub->currval = ival;
   51|      4|    pub->lTrs = lTrs;
   52|      4|    pub->hTrs = hTrs;
   53|      4|    pub->link.handle = _prdic_shmtrig_update;
   54|      4|    pub->link.arg = pub;
   55|      4|}
prdic_shmtrig.c:_prdic_shmtrig_update:
   33|    124|{
   34|    124|    struct _prdic_shmtrig *pub;
   35|       |
   36|    124|    pub = (struct _prdic_shmtrig *)arg;
   37|    124|    if (pub->currval && val < pub->lTrs) {
  ------------------
  |  Branch (37:9): [True: 52, False: 72]
  |  Branch (37:25): [True: 1, False: 51]
  ------------------
   38|      1|        pub->currval = 0;
   39|    123|    } else if (!pub->currval && val > pub->hTrs) {
  ------------------
  |  Branch (39:16): [True: 72, False: 51]
  |  Branch (39:33): [True: 0, False: 72]
  ------------------
   40|      0|        pub->currval = 1;
   41|      0|    }
   42|    124|    return (pub->currval);
   43|    124|}

periodic.c:getttime:
   33|      4|{
   34|       |
   35|      4|    if (clock_gettime(CLOCK_MONOTONIC, ttp) == -1) {
  ------------------
  |  Branch (35:9): [True: 0, False: 4]
  ------------------
   36|      0|        if (abort_on_fail)
  ------------------
  |  Branch (36:13): [True: 0, False: 0]
  ------------------
   37|      0|            abort();
   38|      0|        return (-1);
   39|      0|    }
   40|      4|    return (0);
   41|      4|}
periodic.c:tplusdtime:
   56|      4|{
   57|      4|    struct timespec tp;
   58|       |
   59|      4|    dtime2timespec(offset, &tp);
  ------------------
  |  |   37|      4|    do {                                                           \
  |  |   38|      4|        SEC(tp) = trunc(d);                                        \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   39|      4|        NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   31|      4|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   32|      4|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |                       NSEC(tp) = round((double)NSEC_IN_SEC * ((d) - SEC(tp)));   \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   40|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (40:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   60|      4|    timespecadd(ttp, &tp);
  ------------------
  |  |   48|      4|    do {                                \
  |  |   49|      4|        SEC(vvp) += SEC(uvp);           \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |                       SEC(vvp) += SEC(uvp);           \
  |  |  ------------------
  |  |  |  |   30|      4|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   50|      4|        NSEC(vvp) += NSEC(uvp);         \
  |  |  ------------------
  |  |  |  |   31|      4|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       NSEC(vvp) += NSEC(uvp);         \
  |  |  ------------------
  |  |  |  |   31|      4|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |   51|      4|        if (NSEC(vvp) >= NSEC_IN_SEC) { \
  |  |  ------------------
  |  |  |  |   31|      4|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                       if (NSEC(vvp) >= NSEC_IN_SEC) { \
  |  |  ------------------
  |  |  |  |   32|      4|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |  |  Branch (51:13): [True: 0, False: 4]
  |  |  ------------------
  |  |   52|      0|            SEC(vvp)++;                 \
  |  |  ------------------
  |  |  |  |   30|      0|#define SEC(x)      ((x)->tv_sec)
  |  |  ------------------
  |  |   53|      0|            NSEC(vvp) -= NSEC_IN_SEC;   \
  |  |  ------------------
  |  |  |  |   31|      0|#define NSEC(x)     ((x)->tv_nsec)
  |  |  ------------------
  |  |                           NSEC(vvp) -= NSEC_IN_SEC;   \
  |  |  ------------------
  |  |  |  |   32|      0|#define NSEC_IN_SEC 1000000000L
  |  |  ------------------
  |  |   54|      0|        }                               \
  |  |   55|      4|    } while (0)
  |  |  ------------------
  |  |  |  Branch (55:14): [Folded - Ignored]
  |  |  ------------------
  ------------------
   61|      4|}
prdic_main.c:getttime:
   33|    124|{
   34|       |
   35|    124|    if (clock_gettime(CLOCK_MONOTONIC, ttp) == -1) {
  ------------------
  |  Branch (35:9): [True: 0, False: 124]
  ------------------
   36|      0|        if (abort_on_fail)
  ------------------
  |  Branch (36:13): [True: 0, False: 0]
  ------------------
   37|      0|            abort();
   38|      0|        return (-1);
   39|      0|    }
   40|    124|    return (0);
   41|    124|}

rtpp_acct_csv.c:rtpp_acct_csv_open:
  181|      2|{
  182|      2|    char *buf;
  183|      2|    int len, pos;
  184|      2|    int r = 0;
  185|       |
  186|      2|    if (pvt->fd != -1) {
  ------------------
  |  Branch (186:9): [True: 0, False: 2]
  ------------------
  187|      0|        close(pvt->fd);
  188|      0|    }
  189|      2|    pvt->fd = open(pvt->fname, O_WRONLY | O_APPEND | O_CREAT, DEFFILEMODE);
  190|      2|    if (pvt->fd == -1) {
  ------------------
  |  Branch (190:9): [True: 0, False: 2]
  ------------------
  191|      0|        mod_elog(RTPP_LOG_ERR, "can't open '%s' for writing", pvt->fname);
  ------------------
  |  |  122|      0|#define mod_elog(args...) CALL_METHOD(RTPP_MOD_SELF.log, errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#define mod_elog(args...) CALL_METHOD(RTPP_MOD_SELF.log, errwrite, __FUNCTION__, \
  |  |  |  |  |  |  123|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  191|      0|        mod_elog(RTPP_LOG_ERR, "can't open '%s' for writing", pvt->fname);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  123|      0|  __LINE__, ## args)
  ------------------
  192|      0|        goto e0;
  193|      0|    }
  194|      2|    pos = rtpp_acct_csv_lockf(pvt->fd);
  195|      2|    if (pos < 0) {
  ------------------
  |  Branch (195:9): [True: 0, False: 2]
  ------------------
  196|      0|        mod_elog(RTPP_LOG_ERR, "can't lock '%s'", pvt->fname);
  ------------------
  |  |  122|      0|#define mod_elog(args...) CALL_METHOD(RTPP_MOD_SELF.log, errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#define mod_elog(args...) CALL_METHOD(RTPP_MOD_SELF.log, errwrite, __FUNCTION__, \
  |  |  |  |  |  |  123|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  196|      0|        mod_elog(RTPP_LOG_ERR, "can't lock '%s'", pvt->fname);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  123|      0|  __LINE__, ## args)
  ------------------
  197|      0|        goto e1;
  198|      0|    }
  199|      2|    if (fstat(pvt->fd, &pvt->stt) < 0) {
  ------------------
  |  Branch (199:9): [True: 0, False: 2]
  ------------------
  200|      0|        mod_elog(RTPP_LOG_ERR, "can't get stats for '%s'", pvt->fname);
  ------------------
  |  |  122|      0|#define mod_elog(args...) CALL_METHOD(RTPP_MOD_SELF.log, errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  122|      0|#define mod_elog(args...) CALL_METHOD(RTPP_MOD_SELF.log, errwrite, __FUNCTION__, \
  |  |  |  |  |  |  123|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  200|      0|        mod_elog(RTPP_LOG_ERR, "can't get stats for '%s'", pvt->fname);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  123|      0|  __LINE__, ## args)
  ------------------
  201|      0|        goto e2;
  202|      0|    }
  203|      2|    if (pvt->stt.st_size == 0) {
  ------------------
  |  Branch (203:9): [True: 1, False: 1]
  ------------------
  204|      1|        buf = NULL;
  205|      1|        len = mod_asprintf(&buf, RVER_NM SEP NID_NM SEP PID_NM SEP SID_NM
  ------------------
  |  |  115|      1|#define mod_asprintf(pp, fmt, args...) RTPP_MOD_SELF._asprintf((pp), (fmt), ## args)
  |  |  ------------------
  |  |  |  |   83|      1|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  206|      1|          SEP CID_NM SEP
  207|      1|          "from_tag,setup_ts,teardown_ts,first_rtp_ts_ino,last_rtp_ts_ino,"
  208|      1|          "first_rtp_ts_ina,last_rtp_ts_ina,rtp_npkts_ina,rtp_npkts_ino,"
  209|      1|          "rtp_nrelayed,rtp_ndropped,rtcp_npkts_ina,rtcp_npkts_ino,"
  210|      1|          "rtcp_nrelayed,rtcp_ndropped,rtpa_nsent_ino,rtpa_nrcvd_ino,"
  211|      1|          "rtpa_ndups_ino,rtpa_nlost_ino,rtpa_perrs_ino,"
  212|      1|          "rtpa_ssrc_last_ino,rtpa_ssrc_cnt_ino" SEP PT_NM_O SEP
  213|      1|          "rtpa_nsent_ina,rtpa_nrcvd_ina,rtpa_ndups_ina,rtpa_nlost_ina,"
  214|      1|          "rtpa_perrs_ina,rtpa_ssrc_last_ina,rtpa_ssrc_cnt_ina" SEP PT_NM_A SEP
  215|      1|          "rtpa_jitter_last_ino,rtpa_jitter_max_ino,rtpa_jitter_avg_ino,"
  216|      1|          "rtpa_jitter_last_ina,rtpa_jitter_max_ina,rtpa_jitter_avg_ina" SEP
  217|      1|          R_RM_NM_O SEP R_RM_PT_NM_O SEP R_RM_NM_A SEP R_RM_PT_NM_A SEP
  218|      1|          C_RM_NM_O SEP C_RM_PT_NM_O SEP C_RM_NM_A SEP C_RM_PT_NM_A SEP
  219|      1|          HLD_STS_NM_O SEP HLD_STS_NM_A SEP HLD_CNT_NM_O SEP HLD_CNT_NM_A "\n");
  220|      1|        if (len <= 0) {
  ------------------
  |  Branch (220:13): [True: 0, False: 1]
  ------------------
  221|      0|            if (len == 0 && buf != NULL) {
  ------------------
  |  Branch (221:17): [True: 0, False: 0]
  |  Branch (221:29): [True: 0, False: 0]
  ------------------
  222|      0|                goto e3;
  223|      0|            }
  224|      0|            goto e2;
  225|      0|        }
  226|       |
  227|      1|        do {
  228|      1|            r = write(pvt->fd, buf, len);
  229|      1|        } while (r < 0 && errno == EINTR);
  ------------------
  |  Branch (229:18): [True: 0, False: 1]
  |  Branch (229:27): [True: 0, False: 0]
  ------------------
  230|      1|        if (r > 0 && r < len)
  ------------------
  |  Branch (230:13): [True: 1, False: 0]
  |  Branch (230:22): [True: 0, False: 1]
  ------------------
  231|      0|            r = -1;
  232|      1|        mod_free(buf);
  ------------------
  |  |  112|      1|#define mod_free(p) RTPP_MOD_SELF._free((p))
  |  |  ------------------
  |  |  |  |   83|      1|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  233|      1|    }
  234|      2|    rtpp_acct_csv_unlockf(pvt->fd, pos);
  235|      2|    return (r);
  236|       |
  237|      0|e3:
  238|      0|    mod_free(buf);
  ------------------
  |  |  112|      0|#define mod_free(p) RTPP_MOD_SELF._free((p))
  |  |  ------------------
  |  |  |  |   83|      0|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  239|      0|e2:
  240|      0|    rtpp_acct_csv_unlockf(pvt->fd, pos);
  241|      0|e1:
  242|      0|    close(pvt->fd);
  243|      0|e0:
  244|      0|    return (-1);
  245|      0|}
rtpp_acct_csv.c:rtpp_acct_csv_lockf:
  384|      2|{
  385|      2|    struct flock l;
  386|      2|    int rval;
  387|       |
  388|      2|    memset(&l, '\0', sizeof(l));
  389|      2|    l.l_whence = SEEK_CUR;
  390|      2|    l.l_type = F_WRLCK;
  391|      2|    do {
  392|      2|        rval = fcntl(fd, F_SETLKW, &l);
  393|      2|    } while (rval == -1 && errno == EINTR);
  ------------------
  |  Branch (393:14): [True: 0, False: 2]
  |  Branch (393:28): [True: 0, False: 0]
  ------------------
  394|      2|    if (rval == -1) {
  ------------------
  |  Branch (394:9): [True: 0, False: 2]
  ------------------
  395|      0|        return (-1);
  396|      0|    }
  397|      2|    return lseek(fd, 0, SEEK_CUR);
  398|      2|}
rtpp_acct_csv.c:rtpp_acct_csv_unlockf:
  402|      2|{
  403|      2|    struct flock l;
  404|      2|    int rval;
  405|       |
  406|      2|    memset(&l, '\0', sizeof(l));
  407|      2|    l.l_whence = SEEK_SET;
  408|      2|    l.l_start = offset;
  409|      2|    l.l_type = F_UNLCK;
  410|      2|    do {
  411|      2|        rval = fcntl(fd, F_SETLKW, &l);
  412|      2|    } while (rval == -1 && errno == EINTR);
  ------------------
  |  Branch (412:14): [True: 0, False: 2]
  |  Branch (412:28): [True: 0, False: 0]
  ------------------
  413|      2|}
rtpp_acct_csv.c:rtpp_acct_csv_ctor:
  249|      2|{
  250|      2|    struct rtpp_module_priv *pvt;
  251|       |
  252|      2|    pvt = mod_zmalloc(sizeof(struct rtpp_module_priv));
  ------------------
  |  |  110|      2|#define mod_zmalloc(n) RTPP_MOD_SELF._zmalloc((n))
  |  |  ------------------
  |  |  |  |   83|      2|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  253|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (253:9): [True: 0, False: 2]
  ------------------
  254|      0|        goto e0;
  255|      0|    }
  256|      2|    pvt->pid = getpid();
  257|      2|    if (cfsp->cwd_orig == NULL) {
  ------------------
  |  Branch (257:9): [True: 2, False: 0]
  ------------------
  258|      2|        snprintf(pvt->fname, sizeof(pvt->fname), "%s", "rtpproxy_acct.csv");
  259|      2|    } else {
  260|      0|        snprintf(pvt->fname, sizeof(pvt->fname), "%s/%s", cfsp->cwd_orig,
  261|      0|          "rtpproxy_acct.csv");
  262|      0|    }
  263|      2|    if (gethostname(pvt->node_id, sizeof(pvt->node_id)) != 0) {
  ------------------
  |  Branch (263:9): [True: 0, False: 2]
  ------------------
  264|      0|        strcpy(pvt->node_id, "UNKNOWN");
  265|      0|    }
  266|      2|    pvt->fd = -1;
  267|      2|    if (rtpp_acct_csv_open(pvt) == -1) {
  ------------------
  |  Branch (267:9): [True: 0, False: 2]
  ------------------
  268|      0|        goto e1;
  269|      0|    }
  270|      2|    return (pvt);
  271|       |
  272|      0|e1:
  273|      0|    mod_free(pvt);
  ------------------
  |  |  112|      0|#define mod_free(p) RTPP_MOD_SELF._free((p))
  |  |  ------------------
  |  |  |  |   83|      0|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  274|      0|e0:
  275|      0|    return (NULL);
  276|      0|}

rtpp_catch_dtmf.c:rtpp_catch_dtmf_worker:
  180|      2|{
  181|      2|    struct rtpp_module_priv *pvt;
  182|      2|    struct rtpp_wi *wi;
  183|      2|    struct wipkt *wip;
  184|      2|    char buf[RTPP_MAX_NOTIFY_BUF];
  185|      2|    const char dtmf_events[] = "0123456789*#ABCD ";
  186|      2|    struct catch_dtmf_einfo *eip, ei;
  187|      2|    int i;
  188|       |
  189|      2|    pvt = wp->mpvt;
  190|      2|    for (;;) {
  191|      2|        wi = rtpp_queue_get_item(wp->mod_q, 0);
  192|      2|        if (wi == wp->sigterm) {
  ------------------
  |  Branch (192:13): [True: 0, False: 2]
  ------------------
  193|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|      0|            break;
  195|      0|        }
  196|      2|        wip = rtpp_wi_data_get_ptr(wi, sizeof(*wip), sizeof(*wip));
  197|       |
  198|      2|        struct rtp_dtmf_event *dtmf =
  199|      2|            (struct rtp_dtmf_event *)(wip->pkt->data.buf + sizeof(rtp_hdr_t));
  200|      2|        if (dtmf->event > sizeof(dtmf_events) - 1) {
  ------------------
  |  Branch (200:13): [True: 0, False: 2]
  ------------------
  201|      0|            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_DBUG, "Unhandled DTMF event %u", dtmf->event);
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  201|      0|            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_DBUG, "Unhandled DTMF event %u", dtmf->event);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|      0|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  202|      0|            goto skip;
  203|      0|        }
  204|      2|        ei.digit = dtmf_events[dtmf->event];
  205|      2|        ei.ts = ntohl(wip->pkt->data.header.ts);
  206|      2|        ei.duration = ntohs(dtmf->duration);
  207|      2|        eip = NULL;
  208|      2|        for (i = 1; i <= EINFO_HST_DPTH; i++) {
  ------------------
  |  |   80|      2|#define EINFO_HST_DPTH 4
  ------------------
  |  Branch (208:21): [True: 0, False: 2]
  ------------------
  209|      0|            int j = wip->edata->hst_next - i;
  210|      0|            if (j < 0)
  ------------------
  |  Branch (210:17): [True: 0, False: 0]
  ------------------
  211|      0|                j = EINFO_HST_DPTH + j;
  ------------------
  |  |   80|      0|#define EINFO_HST_DPTH 4
  ------------------
  212|      0|            if (wip->edata->hst[j].ts == ei.ts && wip->edata->hst[j].digit != -1) {
  ------------------
  |  Branch (212:17): [True: 0, False: 0]
  |  Branch (212:51): [True: 0, False: 0]
  ------------------
  213|      0|                eip = &wip->edata->hst[j];
  214|      0|                break;
  215|      0|            }
  216|      0|        }
  217|       |
  218|      2|        if (eip == NULL) {
  ------------------
  |  Branch (218:13): [True: 0, False: 2]
  ------------------
  219|       |            /* this is a new event */
  220|      0|            eip = &wip->edata->hst[wip->edata->hst_next];
  221|      0|            eip->ts = ei.ts;
  222|      0|            eip->pending = 1;
  223|      0|            eip->digit = ei.digit;
  224|      0|            eip->duration = ei.duration;
  225|      0|            wip->edata->hst_next += 1;
  226|      0|            if (wip->edata->hst_next == EINFO_HST_DPTH)
  ------------------
  |  |   80|      0|#define EINFO_HST_DPTH 4
  ------------------
  |  Branch (226:17): [True: 0, False: 0]
  ------------------
  227|      0|                wip->edata->hst_next = 0;
  228|      0|            goto skip;
  229|      0|        }
  230|      2|        if (!eip->pending) {
  ------------------
  |  Branch (230:13): [True: 0, False: 2]
  ------------------
  231|      0|            if (!dtmf->end && eip->duration <= ei.duration)
  ------------------
  |  Branch (231:17): [True: 0, False: 0]
  |  Branch (231:31): [True: 0, False: 0]
  ------------------
  232|      0|                RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_WARN, "Received DTMF for %c without "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  232|      0|                RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_WARN, "Received DTMF for %c without "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define	RTPP_LOG_WARN	LOG_WARNING
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  233|      0|                        "start %d", ei.digit, eip->pending);
  234|      0|            goto skip;
  235|      0|        }
  236|       |
  237|      2|        if (ei.digit != eip->digit) {
  ------------------
  |  Branch (237:13): [True: 0, False: 2]
  ------------------
  238|      0|            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_WARN, "Received DTMF for %c "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      0|            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_WARN, "Received DTMF for %c "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define	RTPP_LOG_WARN	LOG_WARNING
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  239|      0|                    "while processing %c", ei.digit, eip->digit);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  239|      0|                    "while processing %c", ei.digit, eip->digit);
  240|      0|            goto skip;
  241|      0|        }
  242|      2|        if (eip->duration < ei.duration)
  ------------------
  |  Branch (242:13): [True: 0, False: 2]
  ------------------
  243|      0|            eip->duration = ei.duration;
  244|       |
  245|      2|        if (!dtmf->end)
  ------------------
  |  Branch (245:13): [True: 0, False: 2]
  ------------------
  246|      0|            goto skip;
  247|       |        /* we received the end of the DTMF */
  248|       |        /* all good - send the notification */
  249|      2|        eip->pending = 0;
  250|      2|        rtpp_str_const_t notify_tag = {.s = buf};
  251|      2|        notify_tag.len = snprintf(buf, RTPP_MAX_NOTIFY_BUF, "%.*s %c %u %u %d",
  ------------------
  |  |  175|      2|#define RTPP_MAX_NOTIFY_BUF 512
  ------------------
  252|      2|          FMTSTR(wip->rtdp->notify_tag), ei.digit, dtmf->volume, eip->duration,
  ------------------
  |  |   68|      2|#define FMTSTR(sp) (int)(sp)->len, (sp)->s
  ------------------
  253|      2|          (wip->edata->side == RTPP_SSIDE_CALLER) ? 0 : 1);
  ------------------
  |  Branch (253:11): [True: 0, False: 2]
  ------------------
  254|      2|        CALL_METHOD(pvt->notifier, schedule, wip->rtdp->notify_target,
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  254|      2|        CALL_METHOD(pvt->notifier, schedule, wip->rtdp->notify_target,
  |  |  |  |  255|      2|          rtpp_str_fix(&notify_tag), notyfy_type);
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  255|      2|          rtpp_str_fix(&notify_tag), notyfy_type);
  256|       |
  257|      2|skip:
  258|      0|        RTPP_OBJ_DECREF(wip->edata);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  259|      0|        RTPP_OBJ_DECREF(wip->rtdp);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|      0|        RTPP_OBJ_DECREF(wip->pkt);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  261|      0|        RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  262|      0|    }
  263|      2|}
rtpp_catch_dtmf.c:rtpp_catch_dtmf_ctor:
  446|      2|{
  447|      2|    struct rtpp_module_priv *pvt;
  448|       |
  449|      2|    pvt = mod_zmalloc(sizeof(struct rtpp_module_priv));
  ------------------
  |  |  110|      2|#define mod_zmalloc(n) RTPP_MOD_SELF._zmalloc((n))
  |  |  ------------------
  |  |  |  |   83|      2|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  450|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (450:9): [True: 0, False: 2]
  ------------------
  451|      0|        goto e0;
  452|      0|    }
  453|      2|    pvt->notifier = cfsp->rtpp_notify_cf;
  454|      2|    return (pvt);
  455|       |
  456|      0|e0:
  457|      0|    return (NULL);
  458|      2|}

rtpp_dtls_ctor:
   83|      2|{
   84|      2|    struct rtpp_dtls_priv *pvt;
   85|       |
   86|      2|    pvt = mod_rzmalloc(sizeof(*pvt), PVT_RCOFFS(pvt));
  ------------------
  |  |  111|      2|#define mod_rzmalloc(n, m) RTPP_MOD_SELF._rzmalloc((n), m)
  |  |  ------------------
  |  |  |  |   83|      2|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
   87|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (87:9): [True: 0, False: 2]
  ------------------
   88|      0|        goto e0;
   89|      0|    }
   90|      2|    pvt->ctx = SSL_CTX_new(DTLS_method());
   91|      2|    if (pvt->ctx == NULL) {
  ------------------
  |  Branch (91:9): [True: 0, False: 2]
  ------------------
   92|      0|        ERR_clear_error();
   93|      0|        goto e1;
   94|      0|    }
   95|      2|    pvt->cert = tls_set_selfsigned_ec(pvt->ctx, cn, ecname);
   96|      2|    if (pvt->cert == NULL) {
  ------------------
  |  Branch (96:9): [True: 0, False: 2]
  ------------------
   97|      0|        ERR_clear_error();
   98|      0|        goto e2;
   99|      0|    }
  100|      2|    tls_set_verify_client(pvt->ctx);
  101|      2|    if (SSL_CTX_set_tlsext_use_srtp(pvt->ctx, srtp_profiles) != 0) {
  ------------------
  |  Branch (101:9): [True: 0, False: 2]
  ------------------
  102|      0|        ERR_clear_error();
  103|      0|        goto e3;
  104|      0|    }
  105|      2|    if (rtpp_dtls_fp_gen(pvt->cert, pvt->fingerprint,
  ------------------
  |  Branch (105:9): [True: 0, False: 2]
  ------------------
  106|      2|      sizeof(pvt->fingerprint)) != 0) {
  107|      0|        goto e3;
  108|      0|    }
  109|      2|    pvt->pub.fingerprint = pvt->fingerprint;
  110|      2|    pvt->pub.newconn = &rtpp_dtls_newconn;
  111|      2|    pvt->cfsp = cfsp;
  112|      2|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)rtpp_dtls_dtor, pvt);
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  113|      2|    return (&(pvt->pub));
  114|      0|e3:
  115|      0|    X509_free(pvt->cert);
  116|      0|e2:
  117|      0|    SSL_CTX_free(pvt->ctx);
  118|      0|e1:
  119|      0|    mod_free(pvt);
  ------------------
  |  |  112|      0|#define mod_free(p) RTPP_MOD_SELF._free((p))
  |  |  ------------------
  |  |  |  |   83|      0|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  120|      0|e0:
  121|      0|    return (NULL);
  122|      0|}
rtpp_dtls.c:tls_set_verify_client:
  161|      2|{
  162|       |
  163|      2|    SSL_CTX_set_verify_depth(ctx, 0);
  164|      2|    SSL_CTX_set_verify(ctx, SSL_VERIFY_PEER | SSL_VERIFY_CLIENT_ONCE,
  165|      2|      verify_trust_all);
  166|      2|}
rtpp_dtls.c:tls_set_selfsigned_ec:
  218|      2|{
  219|      2|#if OPENSSL_VERSION_MAJOR < 3
  220|      2|    EC_KEY *eckey;
  221|      2|    int eccgrp;
  222|      2|#endif
  223|      2|    EVP_PKEY *key;
  224|      2|    X509 *cert;
  225|      2|    int r;
  226|       |
  227|       |#if OPENSSL_VERSION_MAJOR >= 3
  228|       |    key = EVP_EC_gen(curve_n);
  229|       |    if (!key) {
  230|       |        goto e0;
  231|       |    }
  232|       |#else
  233|      2|    key = EVP_PKEY_new();
  234|      2|    if (!key)
  ------------------
  |  Branch (234:9): [True: 0, False: 2]
  ------------------
  235|      0|        goto e0;
  236|       |
  237|      2|    eccgrp = OBJ_txt2nid(curve_n);
  238|      2|    if (eccgrp == NID_undef)
  ------------------
  |  Branch (238:9): [True: 0, False: 2]
  ------------------
  239|      0|        goto e1;
  240|       |
  241|      2|    eckey = EC_KEY_new_by_curve_name(eccgrp);
  242|      2|    if (!eckey)
  ------------------
  |  Branch (242:9): [True: 0, False: 2]
  ------------------
  243|      0|        goto e1;
  244|       |
  245|      2|    if (!EC_KEY_generate_key(eckey))
  ------------------
  |  Branch (245:9): [True: 0, False: 2]
  ------------------
  246|      0|        goto e2;
  247|       |
  248|      2|#if OPENSSL_VERSION_NUMBER >= 0x10100000L
  249|      2|    EC_KEY_set_asn1_flag(eckey, OPENSSL_EC_NAMED_CURVE);
  250|       |#else
  251|       |    EC_KEY_set_asn1_flag(eckey, 0);
  252|       |#endif
  253|       |
  254|      2|    if (!EVP_PKEY_set1_EC_KEY(key, eckey))
  ------------------
  |  Branch (254:9): [True: 0, False: 2]
  ------------------
  255|      0|        goto e2;
  256|      2|#endif /* OPENSSL_VERSION_MAJOR */
  257|       |
  258|      2|    cert = tls_generate_cert(cn);
  259|      2|    if (cert == NULL)
  ------------------
  |  Branch (259:9): [True: 0, False: 2]
  ------------------
  260|      0|        goto e2;
  261|       |
  262|      2|    if (!X509_set_pubkey(cert, key))
  ------------------
  |  Branch (262:9): [True: 0, False: 2]
  ------------------
  263|      0|        goto e3;
  264|       |
  265|      2|    if (!X509_sign(cert, key, EVP_sha256()))
  ------------------
  |  Branch (265:9): [True: 0, False: 2]
  ------------------
  266|      0|        goto e3;
  267|       |
  268|      2|    r = SSL_CTX_use_certificate(ctx, cert);
  269|      2|    if (r != 1)
  ------------------
  |  Branch (269:9): [True: 0, False: 2]
  ------------------
  270|      0|        goto e3;
  271|       |
  272|      2|    r = SSL_CTX_use_PrivateKey(ctx, key);
  273|      2|    if (r != 1)
  ------------------
  |  Branch (273:9): [True: 0, False: 2]
  ------------------
  274|      0|        goto e3;
  275|       |
  276|      2|#if OPENSSL_VERSION_MAJOR < 3
  277|      2|    EC_KEY_free(eckey);
  278|      2|#endif
  279|      2|    EVP_PKEY_free(key);
  280|      2|    return cert;
  281|      0|e3:
  282|      0|    X509_free(cert);
  283|      0|e2:
  284|      0|#if OPENSSL_VERSION_MAJOR < 3
  285|      0|    EC_KEY_free(eckey);
  286|      0|e1:
  287|      0|#endif
  288|      0|    EVP_PKEY_free(key);
  289|      0|e0:
  290|      0|    return (NULL);
  291|      0|}
rtpp_dtls.c:tls_generate_cert:
  170|      2|{
  171|      2|    X509 *cert;
  172|      2|    X509_NAME *subj;
  173|       |
  174|      2|    cert = X509_new();
  175|      2|    if (!cert)
  ------------------
  |  Branch (175:9): [True: 0, False: 2]
  ------------------
  176|      0|        goto e0;
  177|       |
  178|      2|    if (!X509_set_version(cert, 2))
  ------------------
  |  Branch (178:9): [True: 0, False: 2]
  ------------------
  179|      0|        goto e1;
  180|       |
  181|      2|    if (!ASN1_INTEGER_set(X509_get_serialNumber(cert), rand_u32()))
  ------------------
  |  Branch (181:9): [True: 0, False: 2]
  ------------------
  182|      0|        goto e1;
  183|       |
  184|      2|    subj = X509_NAME_new();
  185|      2|    if (!subj)
  ------------------
  |  Branch (185:9): [True: 0, False: 2]
  ------------------
  186|      0|        goto e1;
  187|       |
  188|      2|    if (!X509_NAME_add_entry_by_txt(subj, "CN", MBSTRING_ASC,
  ------------------
  |  Branch (188:9): [True: 0, False: 2]
  ------------------
  189|      2|        (unsigned char *)cn, (int)strlen(cn), -1, 0))
  190|      0|        goto e2;
  191|       |
  192|      2|    if (!X509_set_issuer_name(cert, subj) ||
  ------------------
  |  Branch (192:9): [True: 0, False: 2]
  ------------------
  193|      2|      !X509_set_subject_name(cert, subj))
  ------------------
  |  Branch (193:7): [True: 0, False: 2]
  ------------------
  194|      0|        goto e2;
  195|       |
  196|      2|#if OPENSSL_VERSION_NUMBER >= 0x10100000L
  197|      2|    if (!X509_gmtime_adj(X509_getm_notBefore(cert), -3600*24*365) ||
  ------------------
  |  Branch (197:9): [True: 0, False: 2]
  ------------------
  198|      2|      !X509_gmtime_adj(X509_getm_notAfter(cert),   3600*24*365*10))
  ------------------
  |  Branch (198:7): [True: 0, False: 2]
  ------------------
  199|      0|        goto e2;
  200|       |#else
  201|       |    if (!X509_gmtime_adj(X509_get_notBefore(cert), -3600*24*365) ||
  202|       |      !X509_gmtime_adj(X509_get_notAfter(cert),   3600*24*365*10))
  203|       |        goto e2;
  204|       |#endif
  205|       |
  206|      2|    X509_NAME_free(subj);
  207|      2|    return (cert);
  208|      0|e2:
  209|      0|    X509_NAME_free(subj);
  210|      0|e1:
  211|      0|    X509_free(cert);
  212|      0|e0:
  213|      0|    return (NULL);
  214|      0|}
rtpp_dtls.c:rand_u32:
  142|      2|{
  143|      2|    uint32_t v;
  144|       |
  145|      2|    v = 0;
  146|      2|    assert(RAND_bytes((unsigned char *)&v, sizeof(v)) == 1);
  147|      2|    return v;
  148|      2|}

rtpp_dtls_gw.c:rtpp_dtls_gw_worker:
  140|      2|{
  141|      2|    struct rtpp_wi *wi;
  142|      2|    struct wipkt *wip;
  143|      2|    int res;
  144|       |
  145|      2|    for (;;) {
  146|      2|        wi = rtpp_queue_get_item(wp->mod_q, 0);
  147|      2|        if (wi == wp->sigterm) {
  ------------------
  |  Branch (147:13): [True: 0, False: 2]
  ------------------
  148|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  149|      0|            break;
  150|      0|        }
  151|      2|        wip = rtpp_wi_data_get_ptr(wi, sizeof(*wip), sizeof(*wip));
  152|      2|        switch (wip->edata.direction) {
  153|      0|        case DTLS_IN:
  ------------------
  |  Branch (153:9): [True: 0, False: 2]
  ------------------
  154|       |#if 0
  155|       |            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_DBUG, "Packet from DTLS");
  156|       |#endif
  157|      0|            CALL_METHOD(wip->edata.dtls_conn, dtls_recv, wip->pktx.pktp);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  158|      0|            res = 1;
  159|      0|            break;
  160|      0|        case SRTP_IN:
  ------------------
  |  Branch (160:9): [True: 0, False: 2]
  ------------------
  161|       |#if 0
  162|       |            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_DBUG, "DTLS: packet SRTP->RTP");
  163|       |#endif
  164|      0|            res = CALL_METHOD(wip->edata.dtls_conn, srtp_recv, &wip->pktx);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  165|      0|            break;
  166|      0|        case RTP_OUT:
  ------------------
  |  Branch (166:9): [True: 0, False: 2]
  ------------------
  167|       |#if 0
  168|       |            RTPP_LOG(RTPP_MOD_SELF.log, RTPP_LOG_DBUG, "DTLS: packet RTP->SRTP");
  169|       |#endif
  170|      0|            res = CALL_METHOD(wip->edata.dtls_conn, rtp_send, &wip->pktx);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  171|      0|            break;
  172|      0|        default:
  ------------------
  |  Branch (172:9): [True: 0, False: 2]
  ------------------
  173|      0|            abort();
  174|      2|        }
  175|      0|        if (res != 0) {
  ------------------
  |  Branch (175:13): [True: 0, False: 0]
  ------------------
  176|      0|            switch (wip->edata.direction) {
  ------------------
  |  Branch (176:21): [True: 0, False: 0]
  ------------------
  177|      0|            case DTLS_IN:
  ------------------
  |  Branch (177:13): [True: 0, False: 0]
  ------------------
  178|      0|                break;
  179|      0|            case SRTP_IN:
  ------------------
  |  Branch (179:13): [True: 0, False: 0]
  ------------------
  180|      0|                CALL_SMETHOD(wip->pktx.strmp_in->pcnt_strm, reg_pktin, wip->pktx.pktp);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  181|       |                /* Fallthrouth */
  182|      0|            case RTP_OUT:
  ------------------
  |  Branch (182:13): [True: 0, False: 0]
  ------------------
  183|      0|                CALL_SMETHOD(wip->pktx.strmp_in->pcount, reg_drop);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  184|      0|                CALL_SMETHOD(wip->pktx.strmp_in->pproc_manager, reg_drop);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  185|      0|                break;
  186|      0|            }
  187|      0|            RTPP_OBJ_DECREF(wip->pktx.pktp);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|      0|        }
  189|      0|        RTPP_OBJ_DECREF(wip->pktx.strmp_in);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|      0|        if (wip->pktx.strmp_out != NULL)
  ------------------
  |  Branch (190:13): [True: 0, False: 0]
  ------------------
  191|      0|            RTPP_OBJ_DECREF(wip->pktx.strmp_out);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  192|      0|        RTPP_OBJ_DECREF(wip->edata.dtls_conn);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  193|      0|        RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  194|      0|    }
  195|      2|}
rtpp_dtls_gw.c:rtpp_dtls_gw_ctor:
  520|      2|{
  521|      2|    struct rtpp_module_priv *pvt;
  522|       |
  523|      2|    pvt = mod_zmalloc(sizeof(struct rtpp_module_priv));
  ------------------
  |  |  110|      2|#define mod_zmalloc(n) RTPP_MOD_SELF._zmalloc((n))
  |  |  ------------------
  |  |  |  |   83|      2|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  524|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (524:9): [True: 0, False: 2]
  ------------------
  525|      0|        goto e0;
  526|      0|    }
  527|      2|    pvt->dtls_ctx = rtpp_dtls_ctor(cfsp);
  528|      2|    if (pvt->dtls_ctx == NULL) {
  ------------------
  |  Branch (528:9): [True: 0, False: 2]
  ------------------
  529|      0|        goto e1;
  530|      0|    }
  531|      2|    if (srtp_init() != 0) {
  ------------------
  |  Branch (531:9): [True: 0, False: 2]
  ------------------
  532|      0|        goto e2;
  533|      0|    }
  534|      2|    pvt->cfsp = cfsp;
  535|      2|    return (pvt);
  536|      0|e2:
  537|      0|    RTPP_OBJ_DECREF(pvt->dtls_ctx);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  538|      0|e1:
  539|      0|    mod_free(pvt);
  ------------------
  |  |  112|      0|#define mod_free(p) RTPP_MOD_SELF._free((p))
  |  |  ------------------
  |  |  |  |   83|      0|#define RTPP_MOD_SELF (*(rtpp_modules.RTPP_MOD_NAME))
  |  |  ------------------
  ------------------
  540|      0|e0:
  541|      0|    return (NULL);
  542|      0|}

rtpp_dtls_fp_gen:
   36|      2|{
   37|      2|    uint8_t fp[FP_DIGEST_LEN];
   38|      2|    unsigned int fp_len, i;
   39|       |
   40|      2|    if (len < FP_DIGEST_STRBUF_LEN)
  ------------------
  |  |   33|      2|#define FP_DIGEST_STRBUF_LEN (FP_DIGEST_STR_LEN + 1)
  |  |  ------------------
  |  |  |  |   31|      2|#define FP_DIGEST_STR_LEN ((sizeof(FP_DIGEST_ALG) - 1) + 1 + \
  |  |  |  |  ------------------
  |  |  |  |  |  |   27|      2|#define FP_DIGEST_ALG "SHA-256"
  |  |  |  |  ------------------
  |  |  |  |   32|      2|  FP_FINGERPRINT_STR_LEN)
  |  |  |  |  ------------------
  |  |  |  |  |  |   30|      2|#define FP_FINGERPRINT_STR_LEN ((FP_DIGEST_LEN * 2) + (FP_DIGEST_LEN - 1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   29|      2|#define FP_DIGEST_LEN 32
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define FP_FINGERPRINT_STR_LEN ((FP_DIGEST_LEN * 2) + (FP_DIGEST_LEN - 1))
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   29|      2|#define FP_DIGEST_LEN 32
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  |  Branch (40:9): [True: 0, False: 2]
  ------------------
   41|      0|        return (-1);
   42|      2|    fp_len = sizeof(fp);
   43|      2|    if (X509_digest(cert, EVP_sha256(), fp, &fp_len) != 1) {
  ------------------
  |  Branch (43:9): [True: 0, False: 2]
  ------------------
   44|      0|        ERR_clear_error();
   45|      0|        return (-1);
   46|      0|    }
   47|      2|    memcpy(buf, FP_DIGEST_ALG, sizeof(FP_DIGEST_ALG) - 1);
  ------------------
  |  |   27|      2|#define FP_DIGEST_ALG "SHA-256"
  ------------------
                  memcpy(buf, FP_DIGEST_ALG, sizeof(FP_DIGEST_ALG) - 1);
  ------------------
  |  |   27|      2|#define FP_DIGEST_ALG "SHA-256"
  ------------------
   48|      2|    buf += sizeof(FP_DIGEST_ALG) - 1;
  ------------------
  |  |   27|      2|#define FP_DIGEST_ALG "SHA-256"
  ------------------
   49|      2|    buf[0] = ' ';
   50|      2|    buf++;
   51|     66|    for (i = 0; i < FP_DIGEST_LEN; i++) {
  ------------------
  |  |   29|     66|#define FP_DIGEST_LEN 32
  ------------------
  |  Branch (51:17): [True: 64, False: 2]
  ------------------
   52|     64|        sprintf(buf, "%.2X", fp[i]);
   53|     64|        buf += 2;
   54|     64|        if (i != (FP_DIGEST_LEN - 1)) {
  ------------------
  |  |   29|     64|#define FP_DIGEST_LEN 32
  ------------------
  |  Branch (54:13): [True: 62, False: 2]
  ------------------
   55|     62|            buf[0] = ':';
   56|     62|            buf++;
   57|     62|        }
   58|     64|    }
   59|      2|    return (0);
   60|      2|}

rtpp_init:
   49|      2|{
   50|      2|    char *argv[] = {
   51|      2|       "rtpproxy",
   52|      2|       "-f",
   53|      2|       "-T", "1",
   54|      2|       "-W", "1",
   55|      2|       "-s", "stdio:",
   56|      2|       "-d", "crit",
   57|      2|       "-n", "tcp:127.0.0.1:9642",
   58|      2|       "-S", "/tmp",
   59|      2|       "-r", ".",
   60|      2|       "--dso", "acct_csv",
   61|      2|       "--dso", "catch_dtmf",
   62|      2|       "--dso", "dtls_gw",
   63|      2|    };
   64|      2|    int argc = howmany(argv, *argv);
  ------------------
  |  |   32|      2|#define howmany(x, y) (sizeof(x) / sizeof(y))
  ------------------
   65|      2|    struct rtpp_cfg *cfsp;
   66|       |
   67|      2|    OPT_SAVE();
  ------------------
  |  |   23|      2|#define OPT_SAVE() (opt_save = (struct opt_save){optarg, optind, optopt, opterr, optreset})
  ------------------
   68|      2|    cfsp = rtpp_main(argc, argv);
   69|      2|    OPT_RESTORE();
  ------------------
  |  |   24|      2|#define OPT_RESTORE() ({ \
  |  |   25|      2|    optarg = opt_save.optarg; \
  |  |   26|      2|    optind = opt_save.optind; \
  |  |   27|      2|    optopt = opt_save.optopt; \
  |  |   28|      2|    opterr = opt_save.opterr; \
  |  |   29|      2|    optreset = opt_save.optreset; \
  |  |   30|      2|})
  ------------------
   70|      2|    assert(cfsp != NULL);
   71|      2|    cfsp->no_resolve = 1;
   72|      2|    gconf.tfd = open("/dev/null", O_WRONLY, 0);
   73|      2|    assert(gconf.tfd >= 0);
   74|      2|    gconf.cfsp = cfsp;
   75|      2|    atexit(cleanupHandler);
   76|      2|}
LLVMFuzzerTestOneInput:
   80|  1.97k|{
   81|  1.97k|    struct rtpp_timestamp dtime = {};
   82|  1.97k|    static struct rtpp_command_stats cstat = {};
   83|  1.97k|    struct rtpp_command *cmd;
   84|  1.97k|    int rval = -1;
   85|       |
   86|  1.97k|    if (size > RTPP_CMD_BUFLEN)
  ------------------
  |  |   49|  1.97k|#define RTPP_CMD_BUFLEN (8 * 1024)
  ------------------
  |  Branch (86:9): [True: 0, False: 1.97k]
  ------------------
   87|      0|        return (0);
   88|       |
   89|  1.97k|    cmd = rtpp_command_ctor(gconf.cfsp, gconf.tfd, &dtime, &cstat, 0);
   90|  1.97k|    assert(cmd != NULL);
   91|  1.97k|    memcpy(cmd->buf, data, size);
   92|  1.97k|    cmd->buf[size == RTPP_CMD_BUFLEN ? size - 1 : size] = '\0';
  ------------------
  |  |   49|  1.97k|#define RTPP_CMD_BUFLEN (8 * 1024)
  ------------------
  |  Branch (92:14): [True: 1, False: 1.97k]
  ------------------
   93|       |
   94|  1.97k|    if (rtpp_command_split(cmd, size, &rval, NULL) == 0) {
  ------------------
  |  Branch (94:9): [True: 1.81k, False: 159]
  ------------------
   95|  1.81k|        handle_command(gconf.cfsp, cmd);
   96|  1.81k|    }
   97|  1.97k|    free_command(cmd);
   98|  1.97k|    return (0);
   99|  1.97k|}

pproc_manager_ctor:
  126|      2|{
  127|      2|    struct pproc_manager_pvt *pvt;
  128|       |
  129|      2|    pvt = rtpp_rzmalloc(sizeof(*pvt), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  130|      2|    if (pvt == NULL)
  ------------------
  |  Branch (130:9): [True: 0, False: 2]
  ------------------
  131|      0|        goto e0;
  132|      2|    pvt->npkts_discard_idx = CALL_SMETHOD(rtpp_stats, getidxbyname, "npkts_discard");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  133|      2|    if (pvt->npkts_discard_idx < 0)
  ------------------
  |  Branch (133:9): [True: 0, False: 2]
  ------------------
  134|      0|        goto e1;
  135|      2|    if (pthread_mutex_init(&pvt->lock, NULL) != 0)
  ------------------
  |  Branch (135:9): [True: 0, False: 2]
  ------------------
  136|      0|        goto e1;
  137|      2|    pvt->handlers = pproc_handlers_alloc(nprocs);
  138|      2|    if (pvt->handlers == NULL)
  ------------------
  |  Branch (138:9): [True: 0, False: 2]
  ------------------
  139|      0|        goto e2;
  140|      2|    RTPP_OBJ_INCREF(rtpp_stats);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  141|      2|    pvt->rtpp_stats = rtpp_stats;
  142|      2|    PUBINST_FININIT(&pvt->pub, pvt, rtpp_pproc_mgr_dtor);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
  143|      2|    return (&(pvt->pub));
  144|      0|e2:
  145|      0|    pthread_mutex_destroy(&pvt->lock);
  146|      0|e1:
  147|      0|    free(pvt);
  148|      0|e0:
  149|      0|    return (NULL);
  150|      0|}
pproc_manager.c:rtpp_pproc_mgr_register:
  155|      4|{
  156|      4|    int i;
  157|      4|    struct pproc_manager_pvt *pvt;
  158|      4|    struct pproc_handlers *newh;
  159|       |
  160|      4|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|      4|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  161|      4|    pthread_mutex_lock(&pvt->lock);
  162|       |
  163|      4|    newh = pproc_handlers_alloc(pvt->handlers->nprocs + 1);
  164|      4|    if (newh == NULL) {
  ------------------
  |  Branch (164:9): [True: 0, False: 4]
  ------------------
  165|      0|        pthread_mutex_unlock(&pvt->lock);
  166|      0|        return (-1);
  167|      0|    }
  168|      4|    for (i = 0; i < pvt->handlers->nprocs; i++)
  ------------------
  |  Branch (168:17): [True: 2, False: 2]
  ------------------
  169|      2|        if (pvt->handlers->pproc[i].order > pproc_order)
  ------------------
  |  Branch (169:13): [True: 2, False: 0]
  ------------------
  170|      2|            break;
  171|      4|    if (i > 0)
  ------------------
  |  Branch (171:9): [True: 0, False: 4]
  ------------------
  172|      0|        memcpy(&newh->pproc[0], &pvt->handlers->pproc[0],
  173|      0|          sizeof(pvt->handlers->pproc[0]) * i);
  174|      4|    if (i < pvt->handlers->nprocs)
  ------------------
  |  Branch (174:9): [True: 2, False: 2]
  ------------------
  175|      2|        memcpy(&newh->pproc[i + 1], &pvt->handlers->pproc[i],
  176|      2|          sizeof(pvt->handlers->pproc[0]) * (pvt->handlers->nprocs - i));
  177|      4|    newh->pproc[i].order = pproc_order;
  178|      4|    newh->pproc[i].ppif = *ip;
  179|     10|    for (int j = 0; j < newh->nprocs; j++) {
  ------------------
  |  Branch (179:21): [True: 6, False: 4]
  ------------------
  180|      6|        ip = &newh->pproc[j].ppif;
  181|      6|        if (ip->rcnt != NULL)
  ------------------
  |  Branch (181:13): [True: 0, False: 6]
  ------------------
  182|      6|            RTPP_OBJ_INCREF(ip);
  ------------------
  |  |  151|      6|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      6|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  183|      6|    }
  184|      4|    RTPP_OBJ_DECREF(pvt->handlers);
  ------------------
  |  |  152|      4|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      4|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      4|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  185|      4|    pvt->handlers = newh;
  186|      4|    pthread_mutex_unlock(&pvt->lock);
  187|      4|    return (0);
  188|      4|}
pproc_manager.c:pproc_handlers_alloc:
  101|      6|{
  102|      6|    struct pproc_handlers *hndlrs;
  103|       |
  104|      6|    hndlrs = rtpp_rzmalloc(sizeof(*hndlrs) + sizeof(struct pproc_handler) * nprocs,
  105|      6|      offsetof(struct pproc_handlers, rcnt));
  106|      6|    if (hndlrs == NULL)
  ------------------
  |  Branch (106:9): [True: 0, False: 6]
  ------------------
  107|      0|        return (NULL);
  108|      6|    hndlrs->nprocs = nprocs;
  109|      6|    CALL_SMETHOD(hndlrs->rcnt, attach, (rtpp_refcnt_dtor_t)&pproc_handlers_dtor,
  ------------------
  |  |  134|      6|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      6|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      6|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      6|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      6|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      6|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      6|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      6|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      6|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      6|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      6|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      6|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      6|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      6|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      6|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      6|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      6|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      6|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      6|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      6|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      6|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      6|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      6|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      6|)
  |  |  ------------------
  ------------------
  110|      6|      hndlrs);
  111|      6|    return (hndlrs);
  112|      6|}
pproc_manager.c:pproc_handlers_dtor:
   88|      4|{
   89|       |
   90|      6|    for (int i = 0; i < hndlrs->nprocs; i++) {
  ------------------
  |  Branch (90:21): [True: 2, False: 4]
  ------------------
   91|      2|        const struct packet_processor_if *ip = &hndlrs->pproc[i].ppif;
   92|      2|        RTPP_DBG_ASSERT(hndlrs->pproc[i].order != _PPROC_ORD_EMPTY);
   93|      2|        if (ip->rcnt != NULL)
  ------------------
  |  Branch (93:13): [True: 0, False: 2]
  ------------------
   94|      2|            RTPP_OBJ_DECREF(ip);
  ------------------
  |  |  152|      2|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      2|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   95|      2|    }
   96|      4|    free(hndlrs);
   97|      4|}

handle_delete:
  129|     29|{
  130|       |
  131|     29|    struct delete_ematch_arg dea = {
  132|     29|        .from_tag = ccap->from_tag,
  133|     29|        .to_tag = ccap->to_tag,
  134|     29|        .weak = ccap->opts.delete->weak,
  135|     29|        .sessions_wrt = cfsp->sessions_wrt
  136|     29|    };
  137|       |
  138|     29|    CALL_SMETHOD(cfsp->sessions_ht, foreach_key_str, ccap->call_id,
  ------------------
  |  |  134|     29|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     29|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     29|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     29|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     29|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     29|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     29|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     29|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     29|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     29|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     29|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     29|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     29|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     29|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     29|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     29|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     29|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     29|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     29|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     29|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     29|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     29|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     29|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     29|)
  |  |  ------------------
  ------------------
  139|     29|      rtpp_cmd_delete_ematch, &dea);
  140|     29|    rtpp_command_del_opts_free(ccap->opts.delete);
  141|     29|    ccap->opts.delete = NULL;
  142|     29|    return (dea.ndeleted == 0) ? -1 : 0;
  ------------------
  |  Branch (142:12): [True: 29, False: 0]
  ------------------
  143|     29|}
rtpp_command_del_opts_parse:
  164|    302|{
  165|    302|    struct delete_opts *dlop;
  166|    302|    const char *cp;
  167|       |
  168|    302|    dlop = rtpp_zmalloc(sizeof(struct delete_opts));
  169|    302|    if (dlop == NULL) {
  ------------------
  |  Branch (169:9): [True: 0, False: 302]
  ------------------
  170|      0|        if (cmd != NULL)
  ------------------
  |  Branch (170:13): [True: 0, False: 0]
  ------------------
  171|      0|            reply_error(cmd, ECODE_NOMEM_1);
  ------------------
  |  |   77|      0|#define ECODE_NOMEM_1     81
  ------------------
  172|      0|        goto err_undo_0;
  173|      0|    }
  174|    899|    for (cp = ap->v[0].s + 1; *cp != '\0'; cp++) {
  ------------------
  |  Branch (174:31): [True: 607, False: 292]
  ------------------
  175|    607|        switch (*cp) {
  176|    329|        case 'w':
  ------------------
  |  Branch (176:9): [True: 329, False: 278]
  ------------------
  177|    597|        case 'W':
  ------------------
  |  Branch (177:9): [True: 268, False: 339]
  ------------------
  178|    597|            dlop->weak = 1;
  179|    597|            break;
  180|       |
  181|     10|        default:
  ------------------
  |  Branch (181:9): [True: 10, False: 597]
  ------------------
  182|     10|            if (cmd != NULL) {
  ------------------
  |  Branch (182:17): [True: 9, False: 1]
  ------------------
  183|      9|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      9|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     18|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      9|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  183|      9|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      9|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  184|      9|                  "DELETE: unknown command modifier `%c'", *cp);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      9|  __LINE__, ## args)
  ------------------
  184|      9|                  "DELETE: unknown command modifier `%c'", *cp);
  185|      9|                reply_error(cmd, ECODE_PARSE_4);
  ------------------
  |  |   41|      9|#define ECODE_PARSE_4      8
  ------------------
  186|      9|            }
  187|     10|            goto err_undo_1;
  188|    607|        }
  189|    607|    }
  190|    292|    return (dlop);
  191|       |
  192|     10|err_undo_1:
  193|     10|    rtpp_command_del_opts_free(dlop);
  194|     10|err_undo_0:
  195|     10|    return (NULL);
  196|     10|}
rpcpv1_delete.c:rtpp_command_del_opts_free:
  200|     39|{
  201|       |
  202|     39|    free(dlop);
  203|     39|}

handle_norecord:
  112|      4|{
  113|      4|    struct norecord_ematch_arg rea;
  114|       |
  115|      4|    memset(&rea, '\0', sizeof(rea));
  116|      4|    rea.from_tag = ccap->from_tag;
  117|      4|    rea.to_tag = ccap->to_tag;
  118|      4|    rea.cfsp = cfsp;
  119|      4|    rea.all = all;
  120|      4|    CALL_SMETHOD(cfsp->sessions_ht, foreach_key_str, ccap->call_id,
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  121|      4|      rtpp_cmd_norecord_ematch, &rea);
  122|      4|    if (rea.nrecorded == 0) {
  ------------------
  |  Branch (122:9): [True: 4, False: 0]
  ------------------
  123|      4|        return -1;
  124|      4|    }
  125|      0|    return 0;
  126|      4|}

rtpp_command_play_opts_parse:
   56|     16|{
   57|     16|    struct play_opts *plop;
   58|     16|    const char *tcp;
   59|     16|    char *cp;
   60|       |
   61|     16|    plop = rtpp_zmalloc(sizeof(struct play_opts));
   62|     16|    if (plop == NULL) {
  ------------------
  |  Branch (62:9): [True: 0, False: 16]
  ------------------
   63|      0|        reply_error(cmd, ECODE_NOMEM_1);
  ------------------
  |  |   77|      0|#define ECODE_NOMEM_1     81
  ------------------
   64|      0|        goto err_undo_0;
   65|      0|    }
   66|     16|    plop->count = 1;
   67|     16|    plop->pname = rtpp_str_fix(&cmd->args.v[2]);
  ------------------
  |  |   57|     16|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
   68|     16|    plop->codecs = rtpp_str_fix(&cmd->args.v[3]);
  ------------------
  |  |   57|     16|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
   69|     16|    tcp = &(cmd->args.v[0].s[1]);
   70|     16|    if (*tcp != '\0') {
  ------------------
  |  Branch (70:9): [True: 15, False: 1]
  ------------------
   71|     15|        plop->count = strtol(tcp, &cp, 10);
   72|     15|        if (cp == tcp || *cp != '\0') {
  ------------------
  |  Branch (72:13): [True: 4, False: 11]
  |  Branch (72:26): [True: 8, False: 3]
  ------------------
   73|     12|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     12|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     24|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     12|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   73|     12|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     12|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     12|  __LINE__, ## args)
  ------------------
   74|     12|            reply_error(cmd, ECODE_PARSE_6);
  ------------------
  |  |   50|     12|#define ECODE_PARSE_6     17
  ------------------
   75|     12|            goto err_undo_1;
   76|     12|        }
   77|     15|    }
   78|      4|    return (plop);
   79|       |
   80|     12|err_undo_1:
   81|     12|    rtpp_command_play_opts_free(plop);
   82|     12|err_undo_0:
   83|     12|    return (NULL);
   84|     12|}
rtpp_command_play_opts_free:
   88|     16|{
   89|       |
   90|     16|    free(plop);
   91|     16|}

handle_record:
   81|     10|{
   82|     10|    struct record_ematch_arg rea;
   83|       |
   84|     10|    memset(&rea, '\0', sizeof(rea));
   85|     10|    rea.from_tag = ccap->from_tag;
   86|     10|    rea.to_tag = ccap->to_tag;
   87|     10|    rea.record_single_file = record_single_file;
   88|     10|    rea.cfsp = cfsp;
   89|     10|    CALL_SMETHOD(cfsp->sessions_ht, foreach_key_str, ccap->call_id,
  ------------------
  |  |  134|     10|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     10|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     10|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     10|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     10|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     10|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     10|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     10|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     10|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     10|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     10|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     10|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     10|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     10|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     10|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     10|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     10|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     10|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     10|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     10|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     10|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     10|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     10|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     10|)
  |  |  ------------------
  ------------------
   90|     10|      rtpp_cmd_record_ematch, &rea);
   91|     10|    if (rea.nrecorded == 0) {
  ------------------
  |  Branch (91:9): [True: 10, False: 0]
  ------------------
   92|     10|        return -1;
   93|     10|    }
   94|      0|    return 0;
   95|     10|}

handle_get_stats:
   55|    130|{
   56|    130|    int len, i, rval;
   57|       |
   58|    130|    len = 0;
   59|    704|    for (i = 1; i < cmd->args.c && len < (sizeof(cmd->buf_t) - 2); i++) {
  ------------------
  |  Branch (59:17): [True: 662, False: 42]
  |  Branch (59:36): [True: 662, False: 0]
  ------------------
   60|    662|        if (i > 1) {
  ------------------
  |  Branch (60:13): [True: 552, False: 110]
  ------------------
   61|    552|            CHECK_OVERFLOW();
  ------------------
  |  |   47|    552|    if (len > sizeof(cmd->buf_t) - 2) { \
  |  |  ------------------
  |  |  |  Branch (47:9): [True: 0, False: 552]
  |  |  ------------------
  |  |   48|      0|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  ------------------
  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      0|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|      0|          "STATS: output buffer overflow"); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  ------------------
  |  |   49|      0|          "STATS: output buffer overflow"); \
  |  |   50|      0|        return (ECODE_RTOOBIG_1); \
  |  |  ------------------
  |  |  |  |   54|      0|#define ECODE_RTOOBIG_1   25
  |  |  ------------------
  |  |   51|      0|    }
  ------------------
   62|    552|            len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len, " ");
   63|    552|        }
   64|    662|        if (verbose != 0) {
  ------------------
  |  Branch (64:13): [True: 452, False: 210]
  ------------------
   65|    452|            CHECK_OVERFLOW();
  ------------------
  |  |   47|    452|    if (len > sizeof(cmd->buf_t) - 2) { \
  |  |  ------------------
  |  |  |  Branch (47:9): [True: 0, False: 452]
  |  |  ------------------
  |  |   48|      0|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  ------------------
  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      0|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|      0|          "STATS: output buffer overflow"); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  ------------------
  |  |   49|      0|          "STATS: output buffer overflow"); \
  |  |   50|      0|        return (ECODE_RTOOBIG_1); \
  |  |  ------------------
  |  |  |  |   54|      0|#define ECODE_RTOOBIG_1   25
  |  |  ------------------
  |  |   51|      0|    }
  ------------------
   66|    452|            len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len, "%.*s=", \
   67|    452|              FMTSTR(&cmd->args.v[i]));
  ------------------
  |  |   68|    452|#define FMTSTR(sp) (int)(sp)->len, (sp)->s
  ------------------
   68|    452|        }
   69|    662|        CHECK_OVERFLOW();
  ------------------
  |  |   47|    662|    if (len > sizeof(cmd->buf_t) - 2) { \
  |  |  ------------------
  |  |  |  Branch (47:9): [True: 5, False: 657]
  |  |  ------------------
  |  |   48|      5|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  ------------------
  |  |  |  |   57|      5|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|     10|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|      5|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |  |  |   58|      5|  __LINE__, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      5|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   47|      5|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|      5|          "STATS: output buffer overflow"); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   58|      5|  __LINE__, ## args)
  |  |  ------------------
  |  |   49|      5|          "STATS: output buffer overflow"); \
  |  |   50|      5|        return (ECODE_RTOOBIG_1); \
  |  |  ------------------
  |  |  |  |   54|      5|#define ECODE_RTOOBIG_1   25
  |  |  ------------------
  |  |   51|      5|    }
  ------------------
   70|    657|        rval = CALL_SMETHOD(rsp, nstr, cmd->buf_t + len,
  ------------------
  |  |  134|    657|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|    657|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|    657|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|    657|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|    657|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|    657|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|    657|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|    657|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|    657|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|    657|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|    657|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|    657|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|    657|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|    657|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|    657|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|    657|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|    657|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|    657|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|    657|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|    657|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|    657|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|    657|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|    657|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|    657|)
  |  |  ------------------
  ------------------
   71|    657|          sizeof(cmd->buf_t) - len, cmd->args.v[i].s);
   72|    657|        if (rval < 0) {
  ------------------
  |  Branch (72:13): [True: 83, False: 574]
  ------------------
   73|     83|            return (ECODE_STSFAIL);
  ------------------
  |  |   70|     83|#define ECODE_STSFAIL     68
  ------------------
   74|     83|        }
   75|    574|        len += rval;
   76|    574|    }
   77|     42|    CHECK_OVERFLOW();
  ------------------
  |  |   47|     42|    if (len > sizeof(cmd->buf_t) - 2) { \
  |  |  ------------------
  |  |  |  Branch (47:9): [True: 0, False: 42]
  |  |  ------------------
  |  |   48|      0|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  ------------------
  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   48|      0|        RTPP_LOG(cmd->glog, RTPP_LOG_ERR, \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   49|      0|          "STATS: output buffer overflow"); \
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  ------------------
  |  |   49|      0|          "STATS: output buffer overflow"); \
  |  |   50|      0|        return (ECODE_RTOOBIG_1); \
  |  |  ------------------
  |  |  |  |   54|      0|#define ECODE_RTOOBIG_1   25
  |  |  ------------------
  |  |   51|      0|    }
  ------------------
   78|     42|    len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len, "\n");
   79|     42|    rtpc_doreply(cmd, cmd->buf_t, len, 0);
   80|     42|    return (0);
   81|     42|}

ul_reply_port:
  107|     41|{
  108|     41|    int len, rport;
  109|     41|    char saddr[MAX_ADDR_STRLEN];
  110|       |
  111|     41|    if (ulr == NULL || ulr->ia == NULL || ishostnull(ulr->ia)) {
  ------------------
  |  Branch (111:9): [True: 41, False: 0]
  |  Branch (111:24): [True: 0, False: 0]
  |  Branch (111:43): [True: 0, False: 0]
  ------------------
  112|     41|        rport = (ulr == NULL) ? 0 : ulr->port;
  ------------------
  |  Branch (112:17): [True: 41, False: 0]
  ------------------
  113|     41|        len = snprintf(cmd->buf_t, sizeof(cmd->buf_t), "%d", rport);
  114|     41|    } else {
  115|      0|        if (ulr->ia_ov == NULL) {
  ------------------
  |  Branch (115:13): [True: 0, False: 0]
  ------------------
  116|      0|            addr2char_r(ulr->ia, saddr, sizeof(saddr));
  117|      0|            len = snprintf(cmd->buf_t, sizeof(cmd->buf_t), "%d %s%s", ulr->port,
  118|      0|              saddr, (ulr->ia->sa_family == AF_INET) ? "" : " 6");
  ------------------
  |  Branch (118:22): [True: 0, False: 0]
  ------------------
  119|      0|        } else {
  120|      0|            len = snprintf(cmd->buf_t, sizeof(cmd->buf_t), "%d %s%s", ulr->port,
  121|      0|              ulr->ia_ov, (ulr->ia->sa_family == AF_INET) ? "" : " 6");
  ------------------
  |  Branch (121:27): [True: 0, False: 0]
  ------------------
  122|      0|        }
  123|      0|    }
  124|     41|    int skipped = 0;
  125|    187|    for (int i = 0; i < cmd->subc.n; i++) {
  ------------------
  |  Branch (125:21): [True: 146, False: 41]
  ------------------
  126|    146|        if (cmd->subc.res[i].result != 0) {
  ------------------
  |  Branch (126:13): [True: 0, False: 146]
  ------------------
  127|      0|            while (skipped > 0) {
  ------------------
  |  Branch (127:20): [True: 0, False: 0]
  ------------------
  128|      0|                len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len,
  129|      0|                  " && 0");
  130|      0|                skipped -= 1;
  131|      0|            }
  132|      0|            len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len,
  133|      0|              " && %d", cmd->subc.res[i].result);
  134|    146|        } else if (cmd->subc.res[i].buf_t[0] != '\0') {
  ------------------
  |  Branch (134:20): [True: 0, False: 146]
  ------------------
  135|      0|            while (skipped > 0) {
  ------------------
  |  Branch (135:20): [True: 0, False: 0]
  ------------------
  136|      0|                len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len,
  137|      0|                  " && 0");
  138|      0|                skipped -= 1;
  139|      0|            }
  140|      0|            len += snprintf(cmd->buf_t + len, sizeof(cmd->buf_t) - len,
  141|      0|              " && %s", cmd->subc.res[i].buf_t);
  142|    146|        } else {
  143|    146|            skipped += 1;
  144|    146|        }
  145|    146|    }
  146|     41|    cmd->buf_t[len] = '\n';
  147|     41|    len += 1;
  148|     41|    cmd->buf_t[len] = '\0';
  149|     41|    rtpc_doreply(cmd, cmd->buf_t, len, (ulr != NULL) ? 0 : 1);
  ------------------
  |  Branch (149:40): [True: 0, False: 41]
  ------------------
  150|     41|}
rtpp_command_ul_opts_free:
  165|  1.16k|{
  166|       |
  167|  1.16k|    FREE_IF_NULL(ulop->codecs);
  ------------------
  |  |   75|  1.16k|#define FREE_IF_NULL(p)	{if ((p) != NULL) {free(p); (p) = NULL;}}
  |  |  ------------------
  |  |  |  Branch (75:30): [True: 29, False: 1.13k]
  |  |  ------------------
  ------------------
  168|  1.16k|    FREE_IF_NULL(ulop->ia[0]);
  ------------------
  |  |   75|  1.16k|#define FREE_IF_NULL(p)	{if ((p) != NULL) {free(p); (p) = NULL;}}
  |  |  ------------------
  |  |  |  Branch (75:30): [True: 194, False: 973]
  |  |  ------------------
  ------------------
  169|  1.16k|    FREE_IF_NULL(ulop->ia[1]);
  ------------------
  |  |   75|  1.16k|#define FREE_IF_NULL(p)	{if ((p) != NULL) {free(p); (p) = NULL;}}
  |  |  ------------------
  |  |  |  Branch (75:30): [True: 194, False: 973]
  |  |  ------------------
  ------------------
  170|  1.16k|    free(ulop);
  171|  1.16k|}
rtpp_command_ul_opts_parse:
  184|  1.16k|{
  185|  1.16k|    int len, tpf, n, i, ai_flags;
  186|  1.16k|    char *hostname;
  187|  1.16k|    const char *cp, *t;
  188|  1.16k|    rtpp_str_const_t notify_tag;
  189|  1.16k|    const char *errmsg;
  190|  1.16k|    struct sockaddr_storage tia;
  191|  1.16k|    struct ul_opts *ulop;
  192|       |
  193|  1.16k|    ulop = rtpp_zmalloc(sizeof(struct ul_opts));
  194|  1.16k|    if (ulop == NULL) {
  ------------------
  |  Branch (194:9): [True: 0, False: 1.16k]
  ------------------
  195|      0|        reply_error(cmd, ECODE_NOMEM_1);
  ------------------
  |  |   77|      0|#define ECODE_NOMEM_1     81
  ------------------
  196|      0|        goto err_undo_0;
  197|      0|    }
  198|  1.16k|    ul_opts_init(cfsp, ulop);
  199|  1.16k|    if (cmd->cca.op == UPDATE && cmd->args.c > 6) {
  ------------------
  |  Branch (199:9): [True: 1.07k, False: 91]
  |  Branch (199:34): [True: 71, False: 1.00k]
  ------------------
  200|     71|        if (cmd->args.c == 8) {
  ------------------
  |  Branch (200:13): [True: 2, False: 69]
  ------------------
  201|      2|            ulop->notify_socket = rtpp_str_fix(&cmd->args.v[6]);
  ------------------
  |  |   57|      2|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  202|      2|            notify_tag = cmd->args.v[7];
  203|     69|        } else {
  204|     69|            ulop->notify_socket = rtpp_str_fix(&cmd->args.v[5]);
  ------------------
  |  |   57|     69|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  205|     69|            notify_tag = cmd->args.v[6];
  206|     69|            cmd->cca.to_tag = NULL;
  207|     69|        }
  208|     71|        len = url_unquote((uint8_t *)notify_tag.s, notify_tag.len);
  209|     71|        if (len == -1) {
  ------------------
  |  Branch (209:13): [True: 17, False: 54]
  ------------------
  210|     17|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|     17|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     34|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     17|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     17|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  210|     17|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     17|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  211|     17|              "command syntax error - invalid URL encoding");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     17|  __LINE__, ## args)
  ------------------
  211|     17|              "command syntax error - invalid URL encoding");
  212|     17|            reply_error(cmd, ECODE_PARSE_10);
  ------------------
  |  |   43|     17|#define ECODE_PARSE_10    10
  ------------------
  213|     17|            goto err_undo_1;
  214|     17|        }
  215|     54|        notify_tag.len = len;
  216|     54|        ulop->notify_tag = notify_tag;
  217|     54|    }
  218|  1.15k|    ulop->addr = rtpp_str_fix(&cmd->args.v[2]);
  ------------------
  |  |   57|  1.15k|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  219|  1.15k|    ulop->port = rtpp_str_fix(&cmd->args.v[3]);
  ------------------
  |  |   57|  1.15k|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  220|       |    /* Process additional command modifiers */
  221|   240k|    for (cp = cmd->args.v[0].s + 1; *cp != '\0'; cp++) {
  ------------------
  |  Branch (221:37): [True: 239k, False: 779]
  ------------------
  222|   239k|        switch (*cp) {
  223|    370|        case 'a':
  ------------------
  |  Branch (223:9): [True: 370, False: 239k]
  ------------------
  224|    962|        case 'A':
  ------------------
  |  Branch (224:9): [True: 592, False: 239k]
  ------------------
  225|    962|            ulop->asymmetric = 1;
  226|    962|            break;
  227|       |
  228|      2|        case 'e':
  ------------------
  |  Branch (228:9): [True: 2, False: 239k]
  ------------------
  229|      4|        case 'E':
  ------------------
  |  Branch (229:9): [True: 2, False: 239k]
  ------------------
  230|      4|            if (ulop->lidx < 0 || cfsp->bindaddr[1] == NULL) {
  ------------------
  |  Branch (230:17): [True: 0, False: 4]
  |  Branch (230:35): [True: 4, False: 0]
  ------------------
  231|      4|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|      4|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      8|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      4|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      4|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  231|      4|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      4|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      4|  __LINE__, ## args)
  ------------------
  232|      4|                reply_error(cmd, ECODE_PARSE_11);
  ------------------
  |  |   44|      4|#define ECODE_PARSE_11    11
  ------------------
  233|      4|                goto err_undo_1;
  234|      4|            }
  235|      0|            ulop->lia[ulop->lidx] = cfsp->bindaddr[1];
  236|      0|            ulop->lidx--;
  237|      0|            break;
  238|       |
  239|      2|        case 'i':
  ------------------
  |  Branch (239:9): [True: 2, False: 239k]
  ------------------
  240|      3|        case 'I':
  ------------------
  |  Branch (240:9): [True: 1, False: 239k]
  ------------------
  241|      3|            if (ulop->lidx < 0 || cfsp->bindaddr[1] == NULL) {
  ------------------
  |  Branch (241:17): [True: 0, False: 3]
  |  Branch (241:35): [True: 3, False: 0]
  ------------------
  242|      3|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|      3|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      3|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  242|      3|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      3|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      3|  __LINE__, ## args)
  ------------------
  243|      3|                reply_error(cmd, ECODE_PARSE_12);
  ------------------
  |  |   45|      3|#define ECODE_PARSE_12    12
  ------------------
  244|      3|                goto err_undo_1;
  245|      3|            }
  246|      0|            ulop->lia[ulop->lidx] = cfsp->bindaddr[0];
  247|      0|            ulop->lidx--;
  248|      0|            break;
  249|       |
  250|    683|        case '6':
  ------------------
  |  Branch (250:9): [True: 683, False: 238k]
  ------------------
  251|    683|            ulop->pf = AF_INET6;
  252|    683|            break;
  253|       |
  254|    327|        case 's':
  ------------------
  |  Branch (254:9): [True: 327, False: 239k]
  ------------------
  255|    536|        case 'S':
  ------------------
  |  Branch (255:9): [True: 209, False: 239k]
  ------------------
  256|    536|            ulop->asymmetric = 0;
  257|    536|            break;
  258|       |
  259|    386|        case 'w':
  ------------------
  |  Branch (259:9): [True: 386, False: 239k]
  ------------------
  260|    596|        case 'W':
  ------------------
  |  Branch (260:9): [True: 210, False: 239k]
  ------------------
  261|    596|            ulop->weak = 1;
  262|    596|            break;
  263|       |
  264|    294|        case 'z':
  ------------------
  |  Branch (264:9): [True: 294, False: 239k]
  ------------------
  265|    539|        case 'Z':
  ------------------
  |  Branch (265:9): [True: 245, False: 239k]
  ------------------
  266|    539|            ulop->requested_ptime = strtol(cp + 1, (char **)&cp, 10);
  267|    539|            if (ulop->requested_ptime <= 0 || ulop->requested_ptime >= 1000) {
  ------------------
  |  Branch (267:17): [True: 41, False: 498]
  |  Branch (267:47): [True: 30, False: 468]
  ------------------
  268|     71|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     71|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|    142|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     71|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     71|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  268|     71|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     71|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     71|  __LINE__, ## args)
  ------------------
  269|     71|                reply_error(cmd, ECODE_PARSE_13);
  ------------------
  |  |   46|     71|#define ECODE_PARSE_13    13
  ------------------
  270|     71|                goto err_undo_1;
  271|     71|            }
  272|    468|            cp--;
  273|    468|            break;
  274|       |
  275|     20|        case 'c':
  ------------------
  |  Branch (275:9): [True: 20, False: 239k]
  ------------------
  276|     52|        case 'C':
  ------------------
  |  Branch (276:9): [True: 32, False: 239k]
  ------------------
  277|     52|            cp += 1;
  278|  8.39k|            for (t = cp; *cp != '\0'; cp++) {
  ------------------
  |  Branch (278:26): [True: 8.37k, False: 21]
  ------------------
  279|  8.37k|                if (!isdigit(*cp) && *cp != ',')
  ------------------
  |  Branch (279:21): [True: 51, False: 8.32k]
  |  Branch (279:38): [True: 31, False: 20]
  ------------------
  280|     31|                    break;
  281|  8.37k|            }
  282|     52|            if (t == cp || ulop->codecs != NULL) {
  ------------------
  |  Branch (282:17): [True: 20, False: 32]
  |  Branch (282:28): [True: 3, False: 29]
  ------------------
  283|     23|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     23|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     46|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     23|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     23|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  283|     23|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     23|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     23|  __LINE__, ## args)
  ------------------
  284|     23|                reply_error(cmd, ECODE_PARSE_14);
  ------------------
  |  |   47|     23|#define ECODE_PARSE_14    14
  ------------------
  285|     23|                goto err_undo_1;
  286|     23|            }
  287|     29|            ulop->codecs = malloc(cp - t + 1);
  288|     29|            if (ulop->codecs == NULL) {
  ------------------
  |  Branch (288:17): [True: 0, False: 29]
  ------------------
  289|      0|                reply_error(cmd, ECODE_NOMEM_2);
  ------------------
  |  |   78|      0|#define ECODE_NOMEM_2     82
  ------------------
  290|      0|                goto err_undo_1;
  291|      0|            }
  292|     29|            memcpy(ulop->codecs, t, cp - t);
  293|     29|            ulop->codecs[cp - t] = '\0';
  294|     29|            cp--;
  295|     29|            break;
  296|       |
  297|  2.28k|        case 'l':
  ------------------
  |  Branch (297:9): [True: 2.28k, False: 237k]
  ------------------
  298|   235k|        case 'L':
  ------------------
  |  Branch (298:9): [True: 232k, False: 6.65k]
  ------------------
  299|   235k|            len = extractaddr(cp + 1, &t, &cp, &tpf);
  300|   235k|            if (len == -1) {
  ------------------
  |  Branch (300:17): [True: 105, False: 235k]
  ------------------
  301|    105|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|    105|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|    210|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    105|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    105|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  301|    105|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|    105|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    105|  __LINE__, ## args)
  ------------------
  302|    105|                reply_error(cmd, ECODE_PARSE_15);
  ------------------
  |  |   48|    105|#define ECODE_PARSE_15    15
  ------------------
  303|    105|                goto err_undo_1;
  304|    105|            }
  305|   235k|            hostname = alloca(len + 1);
  306|   235k|            memcpy(hostname, t, len);
  307|   235k|            hostname[len] = '\0';
  308|   235k|            ai_flags = cfsp->no_resolve ? AI_NUMERICHOST : AI_PASSIVE;
  ------------------
  |  Branch (308:24): [True: 235k, False: 0]
  ------------------
  309|   235k|            ulop->local_addr = CALL_METHOD(cfsp->bindaddrs_cf, host2, hostname,
  ------------------
  |  |   83|   235k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  310|   235k|              tpf, ai_flags, &errmsg);
  311|   235k|            if (ulop->local_addr == NULL) {
  ------------------
  |  Branch (311:17): [True: 114, False: 235k]
  ------------------
  312|    114|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|    114|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|    228|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    114|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    114|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  312|    114|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|    114|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  313|    114|                  "invalid local address: %s: %s", hostname, errmsg);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    114|  __LINE__, ## args)
  ------------------
  313|    114|                  "invalid local address: %s: %s", hostname, errmsg);
  314|    114|                reply_error(cmd, ECODE_INVLARG_1);
  ------------------
  |  |   57|    114|#define ECODE_INVLARG_1   31
  ------------------
  315|    114|                goto err_undo_1;
  316|    114|            }
  317|   235k|            cp--;
  318|   235k|            break;
  319|       |
  320|    127|        case 'r':
  ------------------
  |  Branch (320:9): [True: 127, False: 239k]
  ------------------
  321|    161|        case 'R':
  ------------------
  |  Branch (321:9): [True: 34, False: 239k]
  ------------------
  322|    161|            len = extractaddr(cp + 1, &t, &cp, &tpf);
  323|    161|            if (len == -1) {
  ------------------
  |  Branch (323:17): [True: 8, False: 153]
  ------------------
  324|      8|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|      8|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     16|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      8|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  324|      8|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      8|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      8|  __LINE__, ## args)
  ------------------
  325|      8|                reply_error(cmd, ECODE_PARSE_16);
  ------------------
  |  |   49|      8|#define ECODE_PARSE_16    16
  ------------------
  326|      8|                goto err_undo_1;
  327|      8|            }
  328|    153|            hostname = alloca(len + 1);
  329|    153|            memcpy(hostname, t, len);
  330|    153|            hostname[len] = '\0';
  331|    153|            struct sockaddr_storage local_addr;
  332|    153|            ai_flags = cfsp->no_resolve ? AI_NUMERICHOST : AI_PASSIVE;
  ------------------
  |  Branch (332:24): [True: 153, False: 0]
  ------------------
  333|    153|            n = resolve(sstosa(&local_addr), tpf, hostname, SERVICE, AI_PASSIVE);
  ------------------
  |  |   82|    153|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
                          n = resolve(sstosa(&local_addr), tpf, hostname, SERVICE, AI_PASSIVE);
  ------------------
  |  |   52|    153|#define	SERVICE		"34999"
  ------------------
  334|    153|            if (n != 0) {
  ------------------
  |  Branch (334:17): [True: 14, False: 139]
  ------------------
  335|     14|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|     14|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     28|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     14|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     14|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  335|     14|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     14|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  336|     14|                  "invalid remote address: %s: %s", hostname, gai_strerror(n));
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     14|  __LINE__, ## args)
  ------------------
  336|     14|                  "invalid remote address: %s: %s", hostname, gai_strerror(n));
  337|     14|                reply_error(cmd, ECODE_INVLARG_2);
  ------------------
  |  |   58|     14|#define ECODE_INVLARG_2   32
  ------------------
  338|     14|                goto err_undo_1;
  339|     14|            }
  340|    139|            if (local4remote(sstosa(&local_addr), &local_addr) == -1) {
  ------------------
  |  |   82|    139|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  |  Branch (340:17): [True: 1, False: 138]
  ------------------
  341|      1|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      1|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      1|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      1|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  341|      1|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      1|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  342|      1|                  "can't find local address for remote address: %s", hostname);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      1|  __LINE__, ## args)
  ------------------
  342|      1|                  "can't find local address for remote address: %s", hostname);
  343|      1|                reply_error(cmd, ECODE_INVLARG_3);
  ------------------
  |  |   59|      1|#define ECODE_INVLARG_3   33
  ------------------
  344|      1|                goto err_undo_1;
  345|      1|            }
  346|    138|            ulop->local_addr = CALL_METHOD(cfsp->bindaddrs_cf, addr2,
  ------------------
  |  |   83|    138|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  347|    138|              sstosa(&local_addr), &errmsg);
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|    138|#define	sstosa(ss)	((struct sockaddr *)(ss))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  347|    138|              sstosa(&local_addr), &errmsg);
  348|    138|            if (ulop->local_addr == NULL) {
  ------------------
  |  Branch (348:17): [True: 0, False: 138]
  ------------------
  349|      0|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  349|      0|                RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  350|      0|                  "invalid local address: %s", errmsg);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  350|      0|                  "invalid local address: %s", errmsg);
  351|      0|                reply_error(cmd, ECODE_INVLARG_4);
  ------------------
  |  |   60|      0|#define ECODE_INVLARG_4   34
  ------------------
  352|      0|                goto err_undo_1;
  353|      0|            }
  354|    138|            cp--;
  355|    138|            break;
  356|       |
  357|    298|        case 'n':
  ------------------
  |  Branch (357:9): [True: 298, False: 239k]
  ------------------
  358|    807|        case 'N':
  ------------------
  |  Branch (358:9): [True: 509, False: 239k]
  ------------------
  359|    807|            ulop->new_port = 1;
  360|    807|            break;
  361|       |
  362|     28|        default:
  ------------------
  |  Branch (362:9): [True: 28, False: 239k]
  ------------------
  363|     28|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "unknown command modifier `%c'",
  ------------------
  |  |   57|     28|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     56|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     28|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     28|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  363|     28|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "unknown command modifier `%c'",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     28|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  364|     28|              *cp);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     28|  __LINE__, ## args)
  ------------------
  364|     28|              *cp);
  365|     28|            reply_error(cmd, ECODE_INVLARG_5);
  ------------------
  |  |   61|     28|#define ECODE_INVLARG_5   35
  ------------------
  366|     28|            goto err_undo_1;
  367|   239k|        }
  368|   239k|    }
  369|    779|    if (ulop->local_addr == NULL && ulop->lidx == 1 &&
  ------------------
  |  Branch (369:9): [True: 610, False: 169]
  |  Branch (369:37): [True: 610, False: 0]
  ------------------
  370|    779|      ulop->pf != ulop->lia[0]->sa_family) {
  ------------------
  |  Branch (370:7): [True: 375, False: 235]
  ------------------
  371|       |        /*
  372|       |         * When there is no explicit direction specified via "E"/"I" and no
  373|       |         * local/remote address provided either via "R" or "L" make sure we
  374|       |         * pick up address that matches the address family of the stream.
  375|       |         */
  376|    375|        ulop->local_addr = CALL_METHOD(cfsp->bindaddrs_cf, foraf,
  ------------------
  |  |   83|    375|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  377|    375|          ulop->pf);
  378|    375|        if (ulop->local_addr == NULL) {
  ------------------
  |  Branch (378:13): [True: 10, False: 365]
  ------------------
  379|     10|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "cannot match local "
  ------------------
  |  |   57|     10|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     20|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     10|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     10|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  379|     10|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "cannot match local "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     10|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  380|     20|              "address for the %s session", AF2STR(ulop->pf));
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   71|     10|#define AF2STR(af) 	((af) == AF_LOCAL ? "Unix-Domain" : \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (71:22): [True: 0, False: 10]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|     10|  ((af == AF_INET) ? "IPv4" : ((af == AF_INET6) ? "IPv6" : "Unknown (BUG?!)")))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:4): [True: 0, False: 10]
  |  |  |  |  |  |  |  |  |  Branch (72:32): [True: 10, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     10|  __LINE__, ## args)
  ------------------
  380|     10|              "address for the %s session", AF2STR(ulop->pf));
  381|     10|            reply_error(cmd, ECODE_INVLARG_6);
  ------------------
  |  |   62|     10|#define ECODE_INVLARG_6   36
  ------------------
  382|     10|            goto err_undo_1;
  383|     10|        }
  384|    375|    }
  385|    769|    if (ulop->addr != NULL && ulop->port != NULL && IS_IPSTR_VALID(ulop->addr->s, ulop->pf)) {
  ------------------
  |  |  178|    769|#define	IS_IPSTR_VALID(ips, pf)	((pf) == AF_INET ? \
  |  |  ------------------
  |  |  |  Branch (178:33): [True: 378, False: 391]
  |  |  |  Branch (178:34): [True: 389, False: 380]
  |  |  ------------------
  |  |  179|    769|  (strlen(ips) >= IPSTR_MIN_LENv4 && strlen(ips) <= IPSTR_MAX_LENv4) : \
  |  |  ------------------
  |  |  |  |  173|    778|#define	IPSTR_MIN_LENv4	7	/* "1.1.1.1" */
  |  |  ------------------
  |  |                 (strlen(ips) >= IPSTR_MIN_LENv4 && strlen(ips) <= IPSTR_MAX_LENv4) : \
  |  |  ------------------
  |  |  |  |  174|     54|#define	IPSTR_MAX_LENv4	15	/* "255.255.255.255" */
  |  |  ------------------
  |  |  |  Branch (179:4): [True: 54, False: 335]
  |  |  |  Branch (179:38): [True: 32, False: 22]
  |  |  ------------------
  |  |  180|    769|  (strlen(ips) >= IPSTR_MIN_LENv6 && strlen(ips) <= IPSTR_MAX_LENv6))
  |  |  ------------------
  |  |  |  |  175|    760|#define	IPSTR_MIN_LENv6	2	/* "::" */
  |  |  ------------------
  |  |                 (strlen(ips) >= IPSTR_MIN_LENv6 && strlen(ips) <= IPSTR_MAX_LENv6))
  |  |  ------------------
  |  |  |  |  176|    363|#define	IPSTR_MAX_LENv6	45
  |  |  ------------------
  |  |  |  Branch (180:4): [True: 363, False: 17]
  |  |  |  Branch (180:38): [True: 346, False: 17]
  |  |  ------------------
  ------------------
  |  Branch (385:9): [True: 769, False: 0]
  |  Branch (385:31): [True: 769, False: 0]
  ------------------
  386|    378|        n = resolve(sstosa(&tia), ulop->pf, ulop->addr->s, ulop->port->s, AI_NUMERICHOST);
  ------------------
  |  |   82|    378|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  387|    378|        if (n == 0) {
  ------------------
  |  Branch (387:13): [True: 195, False: 183]
  ------------------
  388|    195|            if (!ishostnull(sstosa(&tia))) {
  ------------------
  |  |   82|    195|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  |  Branch (388:17): [True: 194, False: 1]
  ------------------
  389|    582|                for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (389:29): [True: 388, False: 194]
  ------------------
  390|    388|                    ulop->ia[i] = malloc(SS_LEN(&tia));
  ------------------
  |  |   67|    388|   (((ss)->ss_family == AF_INET) ? \
  |  |  ------------------
  |  |  |  Branch (67:5): [True: 54, False: 334]
  |  |  ------------------
  |  |   68|    388|   sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
  ------------------
  391|    388|                    if (ulop->ia[i] == NULL) {
  ------------------
  |  Branch (391:25): [True: 0, False: 388]
  ------------------
  392|      0|                        reply_error(cmd, ECODE_NOMEM_3);
  ------------------
  |  |   79|      0|#define ECODE_NOMEM_3     83
  ------------------
  393|      0|                        goto err_undo_1;
  394|      0|                    }
  395|    388|                    memcpy(ulop->ia[i], &tia, SS_LEN(&tia));
  ------------------
  |  |   67|    388|   (((ss)->ss_family == AF_INET) ? \
  |  |  ------------------
  |  |  |  Branch (67:5): [True: 54, False: 334]
  |  |  ------------------
  |  |   68|    388|   sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
  ------------------
  396|    388|                }
  397|       |                /* Set port for RTCP, will work both for IPv4 and IPv6 */
  398|    194|                n = ntohs(satosin(ulop->ia[1])->sin_port);
  399|    194|                satosin(ulop->ia[1])->sin_port = htons(n + 1);
  ------------------
  |  |   76|    194|#define	satosin(sa)	((struct sockaddr_in *)(sa))
  ------------------
  400|    194|            } else {
  401|      1|                ulop->onhold = 1;
  402|      1|            }
  403|    195|        } else {
  404|    183|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "getaddrinfo(pf=%d, addr=%s, port=%s): %s",
  ------------------
  |  |   57|    183|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|    366|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    183|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    183|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  404|    183|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "getaddrinfo(pf=%d, addr=%s, port=%s): %s",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|    183|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  405|    183|              ulop->pf, ulop->addr->s, ulop->port->s, gai_strerror(n));
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    183|  __LINE__, ## args)
  ------------------
  405|    183|              ulop->pf, ulop->addr->s, ulop->port->s, gai_strerror(n));
  406|    183|            reply_error(cmd, ECODE_INVLARG_7);
  ------------------
  |  |   63|    183|#define ECODE_INVLARG_7   37
  ------------------
  407|    183|            goto err_undo_1;
  408|    183|        }
  409|    378|    }
  410|    586|    return (ulop);
  411|       |
  412|    581|err_undo_1:
  413|    581|    rtpp_command_ul_opts_free(ulop);
  414|    581|err_undo_0:
  415|    581|    return (NULL);
  416|    581|}
rtpp_command_ul_handle:
  431|    543|{
  432|    543|    int pidx, lport, sessions_active;
  433|    543|    struct rtpp_socket *fds[2];
  434|    543|    const char *actor;
  435|    543|    struct rtpp_session *spa, *spb;
  436|    543|    struct rtpp_socket *fd;
  437|    543|    struct ul_opts *ulop;
  438|       |
  439|    543|    pidx = 1;
  440|    543|    lport = 0;
  441|    543|    spa = spb = NULL;
  442|    543|    fds[0] = fds[1] = NULL;
  443|    543|    ulop = cmd->cca.opts.ul;
  444|       |
  445|    543|    if (cmd->cca.op == UPDATE) {
  ------------------
  |  Branch (445:9): [True: 543, False: 0]
  ------------------
  446|    543|        if (!CALL_METHOD(cfsp->rtpp_tnset_cf, isenabled) && ulop->notify_socket != NULL) {
  ------------------
  |  |   83|  1.08k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (446:13): [True: 0, False: 543]
  |  Branch (446:61): [True: 0, False: 0]
  ------------------
  447|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "must permit notification socket with -n");
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  447|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "must permit notification socket with -n");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  448|      0|            reply_error(cmd, ECODE_NSOFF);
  ------------------
  |  |   75|      0|#define ECODE_NSOFF       75
  ------------------
  449|      0|            goto err_undo_0;
  450|      0|        }
  451|    543|    }
  452|       |
  453|    543|    if (sidx != -1) {
  ------------------
  |  Branch (453:9): [True: 0, False: 543]
  ------------------
  454|      0|        RTPP_DBG_ASSERT(cmd->cca.op == UPDATE || cmd->cca.op == LOOKUP);
  455|      0|        spa = cmd->sp;
  456|      0|        fd = CALL_SMETHOD(spa->rtp->stream[sidx], get_skt);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  457|      0|        if (fd == NULL || ulop->new_port != 0) {
  ------------------
  |  Branch (457:13): [True: 0, False: 0]
  |  Branch (457:27): [True: 0, False: 0]
  ------------------
  458|      0|            if (ulop->local_addr != NULL) {
  ------------------
  |  Branch (458:17): [True: 0, False: 0]
  ------------------
  459|      0|                spa->rtp->stream[sidx]->laddr = ulop->local_addr;
  460|      0|            }
  461|      0|            if (rtpp_create_listener(cfsp, spa->rtp->stream[sidx]->laddr, &lport, fds) == -1) {
  ------------------
  |  Branch (461:17): [True: 0, False: 0]
  ------------------
  462|      0|                RTPP_LOG(spa->log, RTPP_LOG_ERR, "can't create listener");
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  462|      0|                RTPP_LOG(spa->log, RTPP_LOG_ERR, "can't create listener");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  463|      0|                reply_error(cmd, ECODE_LSTFAIL_1);
  ------------------
  |  |   72|      0|#define ECODE_LSTFAIL_1   71
  ------------------
  464|      0|                goto err_undo_0;
  465|      0|            }
  466|      0|            if (fd != NULL && ulop->new_port != 0) {
  ------------------
  |  Branch (466:17): [True: 0, False: 0]
  |  Branch (466:31): [True: 0, False: 0]
  ------------------
  467|      0|                RTPP_LOG(spa->log, RTPP_LOG_INFO,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  467|      0|                RTPP_LOG(spa->log, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  468|      0|                  "new port requested, releasing %d/%d, replacing with %d/%d",
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  468|      0|                  "new port requested, releasing %d/%d, replacing with %d/%d",
  469|      0|                  spa->rtp->stream[sidx]->port, spa->rtcp->stream[sidx]->port, lport, lport + 1);
  470|      0|                CALL_SMETHOD(cfsp->sessinfo, update, spa, sidx, fds);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  471|      0|            } else {
  472|      0|                CALL_SMETHOD(cfsp->sessinfo, append, spa, sidx, fds);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  473|      0|            }
  474|      0|            CALL_METHOD(cfsp->rtpp_proc_cf, nudge);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  475|      0|            RTPP_OBJ_DECREF(fds[0]);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  476|      0|            RTPP_OBJ_DECREF(fds[1]);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  477|      0|            spa->rtp->stream[sidx]->port = lport;
  478|      0|            spa->rtcp->stream[sidx]->port = lport + 1;
  479|      0|            if (spa->complete == 0) {
  ------------------
  |  Branch (479:17): [True: 0, False: 0]
  ------------------
  480|      0|                cmd->csp->nsess_complete.cnt++;
  481|      0|                CALL_SMETHOD(spa->rtp->stream[0]->ttl, reset_with,
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  482|      0|                  cfsp->max_ttl);
  483|      0|                CALL_SMETHOD(spa->rtp->stream[1]->ttl, reset_with,
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  484|      0|                  cfsp->max_ttl);
  485|      0|            }
  486|      0|            spa->complete = 1;
  487|      0|        }
  488|      0|        if (fd != NULL) {
  ------------------
  |  Branch (488:13): [True: 0, False: 0]
  ------------------
  489|      0|            RTPP_OBJ_DECREF(fd);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  490|      0|        }
  491|      0|        if (ulop->weak)
  ------------------
  |  Branch (491:13): [True: 0, False: 0]
  ------------------
  492|      0|            spa->rtp->stream[sidx]->weak = 1;
  493|      0|        else if (cmd->cca.op == UPDATE)
  ------------------
  |  Branch (493:18): [True: 0, False: 0]
  ------------------
  494|      0|            spa->strong = 1;
  495|      0|        lport = spa->rtp->stream[sidx]->port;
  496|      0|        ulop->lia[0] = spa->rtp->stream[sidx]->laddr;
  497|      0|        pidx = (sidx == 0) ? 1 : 0;
  ------------------
  |  Branch (497:16): [True: 0, False: 0]
  ------------------
  498|      0|        if (cmd->cca.op == UPDATE) {
  ------------------
  |  Branch (498:13): [True: 0, False: 0]
  ------------------
  499|      0|            RTPP_LOG(spa->log, RTPP_LOG_INFO,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  499|      0|            RTPP_LOG(spa->log, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  500|      0|              "adding %s flag to existing session, new=%d/%d/%d",
  |  |  |  |  |  |  501|      0|              ulop->weak ? ( sidx ? "weak[1]" : "weak[0]" ) : "strong",
  |  |  |  |  |  |  502|      0|              spa->strong, spa->rtp->stream[0]->weak, spa->rtp->stream[1]->weak);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  500|      0|              "adding %s flag to existing session, new=%d/%d/%d",
  501|      0|              ulop->weak ? ( sidx ? "weak[1]" : "weak[0]" ) : "strong",
  502|      0|              spa->strong, spa->rtp->stream[0]->weak, spa->rtp->stream[1]->weak);
  503|      0|        }
  504|      0|        CALL_SMETHOD(spa->rtp->stream[0]->ttl, reset);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  505|      0|        CALL_SMETHOD(spa->rtp->stream[1]->ttl, reset);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  506|      0|        RTPP_LOG(spa->log, RTPP_LOG_INFO,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  506|      0|        RTPP_LOG(spa->log, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  507|      0|          "lookup on ports %d/%d, session timer restarted", spa->rtp->stream[0]->port,
  |  |  |  |  |  |  508|      0|          spa->rtp->stream[1]->port);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  507|      0|          "lookup on ports %d/%d, session timer restarted", spa->rtp->stream[0]->port,
  508|      0|          spa->rtp->stream[1]->port);
  509|    543|    } else {
  510|    543|        struct rtpp_hash_table_entry *hte;
  511|       |
  512|    543|        RTPP_DBG_ASSERT(cmd->cca.op == UPDATE);
  513|    543|        if (ulop->local_addr != NULL) {
  ------------------
  |  Branch (513:13): [True: 335, False: 208]
  ------------------
  514|    335|            ulop->lia[0] = ulop->lia[1] = ulop->local_addr;
  515|    335|        }
  516|    543|        RTPP_LOG(cmd->glog, RTPP_LOG_INFO,
  ------------------
  |  |   57|    543|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|  1.62k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    543|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    543|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  516|    543|        RTPP_LOG(cmd->glog, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|    543|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  517|    543|          "new %s/%s session %.*s, tag %.*s requested, type %s",
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  517|    543|          "new %s/%s session %.*s, tag %.*s requested, type %s",
  |  |  |  |  |  |  518|    543|          SA_AF2STR(ulop->lia[0]), SA_AF2STR(ulop->lia[1]), FMTSTR(cmd->cca.call_id),
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   73|    543|#define SA_AF2STR(sa)	AF2STR((sa)->sa_family)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   71|    543|#define AF2STR(af) 	((af) == AF_LOCAL ? "Unix-Domain" : \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (71:22): [True: 0, False: 543]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   72|    543|  ((af == AF_INET) ? "IPv4" : ((af == AF_INET6) ? "IPv6" : "Unknown (BUG?!)")))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (72:4): [True: 260, False: 283]
  |  |  |  |  |  |  |  |  |  |  |  Branch (72:32): [True: 283, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         SA_AF2STR(ulop->lia[0]), SA_AF2STR(ulop->lia[1]), FMTSTR(cmd->cca.call_id),
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   73|    543|#define SA_AF2STR(sa)	AF2STR((sa)->sa_family)
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   71|    543|#define AF2STR(af) 	((af) == AF_LOCAL ? "Unix-Domain" : \
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (71:22): [True: 0, False: 543]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   72|    543|  ((af == AF_INET) ? "IPv4" : ((af == AF_INET6) ? "IPv6" : "Unknown (BUG?!)")))
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |  |  Branch (72:4): [True: 260, False: 283]
  |  |  |  |  |  |  |  |  |  |  |  Branch (72:32): [True: 283, False: 0]
  |  |  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         SA_AF2STR(ulop->lia[0]), SA_AF2STR(ulop->lia[1]), FMTSTR(cmd->cca.call_id),
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    543|#define FMTSTR(sp) (int)(sp)->len, (sp)->s
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  519|    543|          FMTSTR(cmd->cca.from_tag), ulop->weak ? "weak" : "strong");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|    543|#define FMTSTR(sp) (int)(sp)->len, (sp)->s
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    543|  __LINE__, ## args)
  ------------------
  517|    543|          "new %s/%s session %.*s, tag %.*s requested, type %s",
  518|    543|          SA_AF2STR(ulop->lia[0]), SA_AF2STR(ulop->lia[1]), FMTSTR(cmd->cca.call_id),
  519|    543|          FMTSTR(cmd->cca.from_tag), ulop->weak ? "weak" : "strong");
  520|    543|        if (cfsp->slowshutdown != 0) {
  ------------------
  |  Branch (520:13): [True: 543, False: 0]
  ------------------
  521|    543|            RTPP_LOG(cmd->glog, RTPP_LOG_INFO,
  ------------------
  |  |   57|    543|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|  1.08k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    543|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    543|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  521|    543|            RTPP_LOG(cmd->glog, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|    543|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  522|    543|              "proxy is in the deorbiting-burn mode, new session rejected");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    543|  __LINE__, ## args)
  ------------------
  522|    543|              "proxy is in the deorbiting-burn mode, new session rejected");
  523|    543|            reply_error(cmd, ECODE_SLOWSHTDN);
  ------------------
  |  |   88|    543|#define ECODE_SLOWSHTDN   99
  ------------------
  524|    543|            goto err_undo_0;
  525|    543|        }
  526|      0|        if (cfsp->overload_prot.ecode != 0 &&
  ------------------
  |  Branch (526:13): [True: 0, False: 0]
  ------------------
  527|      0|          CALL_METHOD(cfsp->rtpp_cmd_cf, chk_overload) != 0) {
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (527:11): [True: 0, False: 0]
  ------------------
  528|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  528|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  529|      0|              "proxy is overloaded, new session rejected");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  529|      0|              "proxy is overloaded, new session rejected");
  530|      0|            reply_error(cmd, cfsp->overload_prot.ecode);
  531|      0|            goto err_undo_0;
  532|      0|        }
  533|      0|        if (rtpp_create_listener(cfsp, ulop->lia[0], &lport, fds) == -1) {
  ------------------
  |  Branch (533:13): [True: 0, False: 0]
  ------------------
  534|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "can't create listener");
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  534|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_ERR, "can't create listener");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  535|      0|            reply_error(cmd, ECODE_LSTFAIL_2);
  ------------------
  |  |   73|      0|#define ECODE_LSTFAIL_2   72
  ------------------
  536|      0|            goto err_undo_0;
  537|      0|        }
  538|       |
  539|       |        /*
  540|       |         * Session creation. If creation is requested with weak flag,
  541|       |         * set weak[0].
  542|       |         */
  543|      0|        spa = rtpp_session_ctor(cfsp, &cmd->cca, cmd->dtime, ulop->lia,
  544|      0|          ulop->weak, lport, fds);
  545|      0|        RTPP_OBJ_DECREF(fds[0]);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  546|      0|        RTPP_OBJ_DECREF(fds[1]);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  547|      0|        if (spa == NULL) {
  ------------------
  |  Branch (547:13): [True: 0, False: 0]
  ------------------
  548|      0|            handle_nomem(cmd, ECODE_NOMEM_4, NULL);
  ------------------
  |  |   80|      0|#define ECODE_NOMEM_4     84
  ------------------
  549|      0|            return (-1);
  550|      0|        }
  551|       |
  552|      0|        cmd->csp->nsess_created.cnt++;
  553|       |
  554|      0|        hte = CALL_SMETHOD(cfsp->sessions_ht, append_str_refcnt, spa->call_id,
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  |  |               #define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  554|      0|        hte = CALL_SMETHOD(cfsp->sessions_ht, append_str_refcnt, spa->call_id,
  |  |  |  |  555|      0|          spa->rcnt, NULL);
  |  |  ------------------
  ------------------
  555|      0|          spa->rcnt, NULL);
  556|      0|        if (hte == NULL) {
  ------------------
  |  Branch (556:13): [True: 0, False: 0]
  ------------------
  557|      0|            handle_nomem(cmd, ECODE_NOMEM_5, spa);
  ------------------
  |  |   81|      0|#define ECODE_NOMEM_5     85
  ------------------
  558|      0|            return (-1);
  559|      0|        }
  560|      0|        if (CALL_SMETHOD(cfsp->sessions_wrt, reg, spa->rcnt, spa->seuid) != 0) {
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  |  Branch (560:13): [True: 0, False: 0]
  ------------------
  561|      0|            CALL_SMETHOD(cfsp->sessions_ht, remove_str, spa->call_id, hte);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  562|      0|            handle_nomem(cmd, ECODE_NOMEM_8, spa);
  ------------------
  |  |   84|      0|#define ECODE_NOMEM_8     88
  ------------------
  563|      0|            return (-1);
  564|      0|        }
  565|       |
  566|       |        /*
  567|       |         * Each session can consume up to 5 open file descriptors (2 RTP,
  568|       |         * 2 RTCP and 1 logging) so that warn user when he is likely to
  569|       |         * exceed 80% mark on hard limit.
  570|       |         */
  571|      0|        sessions_active = CALL_SMETHOD(cfsp->sessions_wrt, get_length);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  572|      0|        if (sessions_active > (rtpp_rlim_max(cfsp) * 80 / (100 * 5)) &&
  ------------------
  |  Branch (572:13): [True: 0, False: 0]
  ------------------
  573|      0|          atomic_load(&cfsp->nofile->warned) == 0) {
  ------------------
  |  Branch (573:11): [True: 0, False: 0]
  ------------------
  574|      0|            atomic_store(&(cfsp->nofile->warned), 1);
  575|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_WARN, "passed 80%% "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  575|      0|            RTPP_LOG(cmd->glog, RTPP_LOG_WARN, "passed 80%% "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   46|      0|#define	RTPP_LOG_WARN	LOG_WARNING
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  576|      0|              "threshold on the open file descriptors limit (%d), "
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  576|      0|              "threshold on the open file descriptors limit (%d), "
  577|      0|              "consider increasing the limit using -L command line "
  578|      0|              "option", (int)rtpp_rlim_max(cfsp));
  579|      0|        }
  580|       |
  581|      0|        RTPP_LOG(spa->log, RTPP_LOG_INFO, "new session on %s port %d created, "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  581|      0|        RTPP_LOG(spa->log, RTPP_LOG_INFO, "new session on %s port %d created, "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  582|      0|          "tag %.*s", AF2STR(ulop->pf), lport, FMTSTR(cmd->cca.from_tag));
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   71|      0|#define AF2STR(af) 	((af) == AF_LOCAL ? "Unix-Domain" : \
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (71:22): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   72|      0|  ((af == AF_INET) ? "IPv4" : ((af == AF_INET6) ? "IPv6" : "Unknown (BUG?!)")))
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (72:4): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  |  Branch (72:32): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |                         "tag %.*s", AF2STR(ulop->pf), lport, FMTSTR(cmd->cca.from_tag));
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|#define FMTSTR(sp) (int)(sp)->len, (sp)->s
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  582|      0|          "tag %.*s", AF2STR(ulop->pf), lport, FMTSTR(cmd->cca.from_tag));
  583|      0|        if (cfsp->record_all != 0) {
  ------------------
  |  Branch (583:13): [True: 0, False: 0]
  ------------------
  584|      0|            handle_copy(cfsp, spa, 0, NULL, RSF_MODE_DFLT(cfsp));
  ------------------
  |  |   37|      0|#define RSF_MODE_DFLT(cfsp) (((cfsp)->record_pcap == 0) ? 0 : 1)
  |  |  ------------------
  |  |  |  Branch (37:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  585|      0|            handle_copy(cfsp, spa, 1, NULL, RSF_MODE_DFLT(cfsp));
  ------------------
  |  |   37|      0|#define RSF_MODE_DFLT(cfsp) (((cfsp)->record_pcap == 0) ? 0 : 1)
  |  |  ------------------
  |  |  |  Branch (37:30): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  586|      0|        }
  587|       |        /* Save ref, it will be decref'd by the command disposal code */
  588|      0|        RTPP_DBG_ASSERT(cmd->sp == NULL);
  589|      0|        cmd->sp = spa;
  590|      0|    }
  591|       |
  592|      0|    if (cmd->cca.op == UPDATE) {
  ------------------
  |  Branch (592:9): [True: 0, False: 0]
  ------------------
  593|      0|        if (spa->timeout_data != NULL) {
  ------------------
  |  Branch (593:13): [True: 0, False: 0]
  ------------------
  594|      0|            RTPP_OBJ_DECREF(spa->timeout_data);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  595|      0|            spa->timeout_data = NULL;
  596|      0|        }
  597|      0|        if (ulop->notify_socket != NULL) {
  ------------------
  |  Branch (597:13): [True: 0, False: 0]
  ------------------
  598|      0|            struct rtpp_tnotify_target *rttp;
  599|       |
  600|      0|            rttp = CALL_METHOD(cfsp->rtpp_tnset_cf, lookup, ulop->notify_socket->s,
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  600|      0|            rttp = CALL_METHOD(cfsp->rtpp_tnset_cf, lookup, ulop->notify_socket->s,
  |  |  |  |  601|      0|              (cmd->rlen > 0) ? sstosa(&cmd->raddr) : NULL, (cmd->rlen > 0) ? cmd->laddr : NULL);
  |  |  |  |  ------------------
  |  |  |  |  |  |   82|      0|#define	sstosa(ss)	((struct sockaddr *)(ss))
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  601|      0|              (cmd->rlen > 0) ? sstosa(&cmd->raddr) : NULL, (cmd->rlen > 0) ? cmd->laddr : NULL);
  602|      0|            if (rttp == NULL) {
  ------------------
  |  Branch (602:17): [True: 0, False: 0]
  ------------------
  603|      0|                RTPP_LOG(spa->log, RTPP_LOG_ERR, "invalid socket name %.*s",
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  603|      0|                RTPP_LOG(spa->log, RTPP_LOG_ERR, "invalid socket name %.*s",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  604|      0|                  FMTSTR(ulop->notify_socket));
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   68|      0|#define FMTSTR(sp) (int)(sp)->len, (sp)->s
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  604|      0|                  FMTSTR(ulop->notify_socket));
  605|      0|                ulop->notify_socket = NULL;
  606|      0|            } else {
  607|      0|                RTPP_LOG(spa->log, RTPP_LOG_INFO, "setting timeout handler");
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  607|      0|                RTPP_LOG(spa->log, RTPP_LOG_INFO, "setting timeout handler");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  608|      0|                RTPP_DBG_ASSERT(ulop->notify_tag.s != NULL);
  609|      0|                spa->timeout_data = rtpp_timeout_data_ctor(rttp,
  610|      0|                  rtpp_str_fix(&ulop->notify_tag));
  ------------------
  |  |   57|      0|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  611|      0|                if (spa->timeout_data == NULL) {
  ------------------
  |  Branch (611:21): [True: 0, False: 0]
  ------------------
  612|      0|                    RTPP_LOG(spa->log, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  612|      0|                    RTPP_LOG(spa->log, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  613|      0|                      "setting timeout handler: ENOMEM");
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  613|      0|                      "setting timeout handler: ENOMEM");
  614|      0|                }
  615|      0|            }
  616|      0|        } else if (spa->timeout_data != NULL) {
  ------------------
  |  Branch (616:20): [True: 0, False: 0]
  ------------------
  617|      0|            RTPP_OBJ_DECREF(spa->timeout_data);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  618|      0|            spa->timeout_data = NULL;
  619|      0|            RTPP_LOG(spa->log, RTPP_LOG_INFO, "disabling timeout handler");
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  619|      0|            RTPP_LOG(spa->log, RTPP_LOG_INFO, "disabling timeout handler");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  620|      0|        }
  621|      0|    }
  622|       |
  623|      0|    if (ulop->ia[0] != NULL && ulop->ia[1] != NULL) {
  ------------------
  |  Branch (623:9): [True: 0, False: 0]
  |  Branch (623:32): [True: 0, False: 0]
  ------------------
  624|      0|        CALL_SMETHOD(spa->rtp->stream[pidx], prefill_addr, &(ulop->ia[0]),
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  625|      0|          cmd->dtime->mono);
  626|      0|        CALL_SMETHOD(spa->rtcp->stream[pidx], prefill_addr, &(ulop->ia[1]),
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  627|      0|          cmd->dtime->mono);
  628|      0|    }
  629|      0|    if (ulop->onhold != 0) {
  ------------------
  |  Branch (629:9): [True: 0, False: 0]
  ------------------
  630|      0|        CALL_SMETHOD(spa->rtp->stream[pidx], reg_onhold);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  631|      0|        CALL_SMETHOD(spa->rtcp->stream[pidx], reg_onhold);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  632|      0|    }
  633|      0|    spa->rtp->stream[pidx]->asymmetric = spa->rtcp->stream[pidx]->asymmetric = ulop->asymmetric;
  634|      0|    if (ulop->asymmetric) {
  ------------------
  |  Branch (634:9): [True: 0, False: 0]
  ------------------
  635|      0|        CALL_SMETHOD(spa->rtp->stream[pidx], locklatch);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  636|      0|        CALL_SMETHOD(spa->rtcp->stream[pidx], locklatch);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  637|      0|    }
  638|      0|    if (spa->rtp->stream[pidx]->codecs != NULL) {
  ------------------
  |  Branch (638:9): [True: 0, False: 0]
  ------------------
  639|      0|        free(spa->rtp->stream[pidx]->codecs);
  640|      0|        spa->rtp->stream[pidx]->codecs = NULL;
  641|      0|    }
  642|      0|    if (ulop->codecs != NULL) {
  ------------------
  |  Branch (642:9): [True: 0, False: 0]
  ------------------
  643|      0|        spa->rtp->stream[pidx]->codecs = ulop->codecs;
  644|      0|        ulop->codecs = NULL;
  645|      0|    }
  646|      0|    spa->rtp->stream[NOT(pidx)]->ptime = ulop->requested_ptime;
  ------------------
  |  |   35|      0|#define	NOT(x)		(((x) == 0) ? 1 : 0)
  |  |  ------------------
  |  |  |  Branch (35:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  647|      0|    actor = CALL_SMETHOD(spa->rtp->stream[pidx], get_actor);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  648|      0|    if (ulop->requested_ptime > 0) {
  ------------------
  |  Branch (648:9): [True: 0, False: 0]
  ------------------
  649|      0|        RTPP_LOG(spa->log, RTPP_LOG_INFO, "RTP packets from %s "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  649|      0|        RTPP_LOG(spa->log, RTPP_LOG_INFO, "RTP packets from %s "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  650|      0|          "will be resized to %d milliseconds", actor, ulop->requested_ptime);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  650|      0|          "will be resized to %d milliseconds", actor, ulop->requested_ptime);
  651|      0|    } else if (spa->rtp->stream[pidx]->resizer != NULL) {
  ------------------
  |  Branch (651:16): [True: 0, False: 0]
  ------------------
  652|      0|          RTPP_LOG(spa->log, RTPP_LOG_INFO, "Resizing of RTP "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  652|      0|          RTPP_LOG(spa->log, RTPP_LOG_INFO, "Resizing of RTP "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  653|      0|          "packets from %s has been disabled", actor);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  653|      0|          "packets from %s has been disabled", actor);
  654|      0|    }
  655|      0|    if (ulop->requested_ptime > 0) {
  ------------------
  |  Branch (655:9): [True: 0, False: 0]
  ------------------
  656|      0|        if (spa->rtp->stream[pidx]->resizer != NULL) {
  ------------------
  |  Branch (656:13): [True: 0, False: 0]
  ------------------
  657|      0|            rtp_resizer_set_ptime(spa->rtp->stream[pidx]->resizer, ulop->requested_ptime);
  658|      0|        } else {
  659|      0|            spa->rtp->stream[pidx]->resizer = rtp_resizer_new(ulop->requested_ptime);
  660|      0|        }
  661|      0|    } else if (spa->rtp->stream[pidx]->resizer != NULL) {
  ------------------
  |  Branch (661:16): [True: 0, False: 0]
  ------------------
  662|      0|        rtp_resizer_free(cfsp->rtpp_stats, spa->rtp->stream[pidx]->resizer);
  663|      0|        spa->rtp->stream[pidx]->resizer = NULL;
  664|      0|    }
  665|       |
  666|      0|    RTPP_DBG_ASSERT(lport != 0);
  667|      0|    ulop->reply.port = lport;
  668|      0|    ulop->reply.ia = ulop->lia[0];
  669|      0|    if (cfsp->advaddr[0] != NULL) {
  ------------------
  |  Branch (669:9): [True: 0, False: 0]
  ------------------
  670|      0|        if (cfsp->bmode != 0 && cfsp->advaddr[1] != NULL &&
  ------------------
  |  Branch (670:13): [True: 0, False: 0]
  |  Branch (670:33): [True: 0, False: 0]
  ------------------
  671|      0|          ulop->lia[0] == cfsp->bindaddr[1]) {
  ------------------
  |  Branch (671:11): [True: 0, False: 0]
  ------------------
  672|      0|            ulop->reply.ia_ov = cfsp->advaddr[1];
  673|      0|        } else {
  674|      0|            ulop->reply.ia_ov = cfsp->advaddr[0];
  675|      0|        }
  676|      0|    }
  677|      0|    for (int i = 0; i < cmd->subc.n; i++) {
  ------------------
  |  Branch (677:21): [True: 0, False: 0]
  ------------------
  678|      0|        struct rtpp_subc_ctx rsc = {
  679|      0|            .sessp = spa,
  680|      0|            .strmp_in = spa->rtp->stream[pidx],
  681|      0|            .strmp_out = spa->rtp->stream[NOT(pidx)],
  ------------------
  |  |   35|      0|#define	NOT(x)		(((x) == 0) ? 1 : 0)
  |  |  ------------------
  |  |  |  Branch (35:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  682|      0|            .subc_args = &(cmd->subc.args[i]),
  683|      0|            .resp = &(cmd->subc.res[i])
  684|      0|        };
  685|      0|        rsc.resp->result = cmd->after_success[i].handler(
  686|      0|          &cmd->after_success[i].args, &rsc);
  687|      0|        if (rsc.resp->result != 0)
  ------------------
  |  Branch (687:13): [True: 0, False: 0]
  ------------------
  688|      0|            break;
  689|      0|    }
  690|      0|    ul_reply_port(cmd, &ulop->reply);
  691|      0|    return (0);
  692|       |
  693|    543|err_undo_0:
  694|    543|    return (-1);
  695|    543|}
rpcpv1_ul.c:ul_opts_init:
  154|  1.16k|{
  155|       |
  156|  1.16k|    ulop->asymmetric = (cfsp->aforce != 0) ? 1 : 0;
  ------------------
  |  Branch (156:24): [True: 0, False: 1.16k]
  ------------------
  157|  1.16k|    ulop->requested_ptime = -1;
  158|  1.16k|    ulop->lia[0] = ulop->lia[1] = ulop->reply.ia = cfsp->bindaddr[0];
  159|  1.16k|    ulop->lidx = 1;
  160|  1.16k|    ulop->pf = AF_INET;
  161|  1.16k|}

rtpp_subcommand_ul_opts_parse:
   48|    502|{
   49|    502|    int mod_id, inst_id;
   50|    502|    const char *cp;
   51|       |
   52|    502|    switch(subc_args->v[0].s[0]) {
   53|    189|    case 'M':
  ------------------
  |  Branch (53:5): [True: 189, False: 313]
  ------------------
   54|    231|    case 'm':
  ------------------
  |  Branch (54:5): [True: 42, False: 460]
  ------------------
   55|    231|        if (atoi_safe_sep(&subc_args->v[0].s[1], &mod_id, ':', &cp) != ATOI_OK)
  ------------------
  |  Branch (55:13): [True: 22, False: 209]
  ------------------
   56|     22|            return (-1);
   57|    209|        if (atoi_safe(cp, &inst_id) != ATOI_OK)
  ------------------
  |  Branch (57:13): [True: 13, False: 196]
  ------------------
   58|     13|            return (-1);
   59|    196|        if (mod_id < 1 || inst_id < 1)
  ------------------
  |  Branch (59:13): [True: 39, False: 157]
  |  Branch (59:27): [True: 36, False: 121]
  ------------------
   60|     75|            return (-1);
   61|    121|        if (CALL_METHOD(cfsp->modules_cf, get_ul_subc_h, (unsigned)mod_id,
  ------------------
  |  |   83|    121|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (61:13): [True: 59, False: 62]
  ------------------
   62|    121|          (unsigned)inst_id, asp) != 0)
   63|     59|            return (-1);
   64|     62|        break;
   65|       |
   66|    201|    case 'D':
  ------------------
  |  Branch (66:5): [True: 201, False: 301]
  ------------------
   67|    268|    case 'd':
  ------------------
  |  Branch (67:5): [True: 67, False: 435]
  ------------------
   68|    268|        if (subc_args->c != 1)
  ------------------
  |  Branch (68:13): [True: 4, False: 264]
  ------------------
   69|      4|            return (-1);
   70|    264|        asp->args.dyn = rtpp_command_del_opts_parse(NULL, subc_args);
   71|    264|        if (asp->args.dyn == NULL)
  ------------------
  |  Branch (71:13): [True: 1, False: 263]
  ------------------
   72|      1|            return (-1);
   73|    263|        asp->args.stat = (void *)cfsp;
   74|    263|        asp->handler = handle_delete_as_subc;
   75|    263|        break;
   76|       |
   77|      3|    default:
  ------------------
  |  Branch (77:5): [True: 3, False: 499]
  ------------------
   78|      3|        return (-1);
   79|    502|    }
   80|    325|    return (0);
   81|    502|}

handle_ver_feature:
   74|     86|{
   75|     86|    int i, known;
   76|       |
   77|       |    /*
   78|       |     * Wait for protocol version datestamp and check whether we
   79|       |     * know it.
   80|       |     */
   81|       |    /*
   82|       |     * Only list 20081224 protocol mod as supported if
   83|       |     * user actually enabled notification with -n
   84|       |     */
   85|     86|    if (strcmp(cmd->args.v[1].s, "20081224") == 0 &&
  ------------------
  |  Branch (85:9): [True: 1, False: 85]
  ------------------
   86|     86|      !CALL_METHOD(cfsp->rtpp_tnset_cf, isenabled)) {
  ------------------
  |  |   83|      1|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (86:7): [True: 0, False: 1]
  ------------------
   87|      0|        reply_number(cmd, 0);
   88|      0|        return;
   89|      0|    }
   90|  1.71k|    for (known = i = 0; proto_caps[i].pc_id != NULL; ++i) {
  ------------------
  |  Branch (90:25): [True: 1.63k, False: 80]
  ------------------
   91|  1.63k|        if (!strcmp(cmd->args.v[1].s, proto_caps[i].pc_id)) {
  ------------------
  |  Branch (91:13): [True: 6, False: 1.63k]
  ------------------
   92|      6|            known = 1;
   93|      6|            break;
   94|      6|        }
   95|  1.63k|    }
   96|     86|    reply_number(cmd, known);
   97|     86|}

rtpp_main:
  855|      2|{
  856|      2|    int i, len, pid_fd;
  857|      2|    static struct rtpp_cfg cfs;
  858|      2|    char buf[256];
  859|      2|    struct sched_param sparam;
  860|      2|    void *elp;
  861|      2|    struct rtpp_timed_task *tp;
  862|      2|    struct rtpp_daemon_rope drop;
  863|       |
  864|      2|    memset(&cfs, 0, sizeof(cfs));
  865|       |
  866|      2|#if defined(LIBRTPPROXY)
  867|      2|    cfs.ropts = (struct rtpp_run_options){
  868|      2|        .no_pid = 1, .no_chdir = 1, .no_daemon = 1, .no_sigtrap = 1
  869|      2|    };
  870|      2|#endif
  871|       |
  872|       |#ifdef RTPP_CHECK_LEAKS
  873|       |    RTPP_MEMDEB_APP_INIT();
  874|       |#endif
  875|      2|    if (getdtime() == -1) {
  ------------------
  |  Branch (875:9): [True: 0, False: 2]
  ------------------
  876|      0|        err(1, "timer self-test has failed: please check your build configuration");
  877|       |        /* NOTREACHED */
  878|      0|    }
  879|       |
  880|       |#ifdef RTPP_CHECK_LEAKS
  881|       |    if (rtpp_memdeb_selftest(MEMDEB_SYM) != 0) {
  882|       |        errx(1, "MEMDEB self-test has failed");
  883|       |        /* NOTREACHED */
  884|       |    }
  885|       |#endif
  886|       |
  887|      2|    cfs.ctrl_socks = rtpp_zmalloc(sizeof(struct rtpp_list));
  888|      2|    if (cfs.ctrl_socks == NULL) {
  ------------------
  |  Branch (888:9): [True: 0, False: 2]
  ------------------
  889|      0|         err(1, "can't allocate memory for the struct ctrl_socks");
  890|       |         /* NOTREACHED */
  891|      0|    }
  892|       |
  893|      2|    cfs.modules_cf = rtpp_modman_ctor();
  894|      2|    if (cfs.modules_cf == NULL) {
  ------------------
  |  Branch (894:9): [True: 0, False: 2]
  ------------------
  895|      0|         err(1, "can't allocate memory for the struct modules_cf");
  896|       |         /* NOTREACHED */
  897|      0|    }
  898|       |
  899|      2|    cfs.runcreds = rtpp_zmalloc(sizeof(struct rtpp_runcreds));
  900|      2|    if (cfs.runcreds == NULL) {
  ------------------
  |  Branch (900:9): [True: 0, False: 2]
  ------------------
  901|      0|         err(1, "can't allocate memory for the struct runcreds");
  902|       |         /* NOTREACHED */
  903|      0|    }
  904|       |
  905|      2|    seedrandom();
  906|      2|    if (rtpp_gen_uid_init() != 0) {
  ------------------
  |  Branch (906:9): [True: 0, False: 2]
  ------------------
  907|      0|        err(1, "rtpp_gen_uid_init() failed");
  908|       |        /* NOTREACHED */
  909|      0|    }
  910|       |
  911|      2|    cfs.glog = rtpp_log_ctor("rtpproxy", NULL, LF_REOPEN);
  ------------------
  |  |   42|      2|#define LF_REOPEN 0
  ------------------
  912|      2|    if (cfs.glog == NULL) {
  ------------------
  |  Branch (912:9): [True: 0, False: 2]
  ------------------
  913|      0|        err(1, "can't initialize logging subsystem");
  914|       |        /* NOTREACHED */
  915|      0|    }
  916|      2|    CALL_METHOD(cfs.glog, setlevel, RTPP_LOG_ERR);
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  916|      2|    CALL_METHOD(cfs.glog, setlevel, RTPP_LOG_ERR);
  |  |  |  |  ------------------
  |  |  |  |  |  |   47|      2|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  917|       | #ifdef RTPP_CHECK_LEAKS
  918|       |    rtpp_memdeb_setlog(MEMDEB_SYM, cfs.glog);
  919|       |    rtpp_memdeb_approve(MEMDEB_SYM, "_rtpp_log_open", 1, "Referenced by memdeb itself");
  920|       | #endif
  921|       |
  922|      2|    _sig_cf = &cfs;
  923|      2|    atexit(rtpp_glog_fin);
  924|       |
  925|      2|    init_config(&cfs, argc, argv);
  926|       |
  927|      2|    cfs.sessions_ht = rtpp_hash_table_ctor(rtpp_ht_key_str_t, 0);
  928|      2|    if (cfs.sessions_ht == NULL) {
  ------------------
  |  Branch (928:9): [True: 0, False: 2]
  ------------------
  929|      0|        err(1, "can't allocate memory for the hash table");
  930|       |         /* NOTREACHED */
  931|      0|    }
  932|      2|    cfs.rtp_streams_wrt = rtpp_weakref_ctor();
  933|      2|    if (cfs.rtp_streams_wrt == NULL) {
  ------------------
  |  Branch (933:9): [True: 0, False: 2]
  ------------------
  934|      0|        err(1, "can't allocate memory for the RTP streams weakref table");
  935|       |         /* NOTREACHED */
  936|      0|    }
  937|      2|    cfs.rtcp_streams_wrt = rtpp_weakref_ctor();
  938|      2|    if (cfs.rtcp_streams_wrt == NULL) {
  ------------------
  |  Branch (938:9): [True: 0, False: 2]
  ------------------
  939|      0|        err(1, "can't allocate memory for the RTCP streams weakref table");
  940|       |         /* NOTREACHED */
  941|      0|    }
  942|      2|    cfs.sessinfo = rtpp_sessinfo_ctor(&cfs);
  943|      2|    if (cfs.sessinfo == NULL) {
  ------------------
  |  Branch (943:9): [True: 0, False: 2]
  ------------------
  944|      0|        errx(1, "cannot construct rtpp_sessinfo structure");
  945|      0|    }
  946|       |
  947|      2|    cfs.rtpp_stats = rtpp_stats_ctor();
  948|      2|    if (cfs.rtpp_stats == NULL) {
  ------------------
  |  Branch (948:9): [True: 0, False: 2]
  ------------------
  949|      0|        err(1, "can't allocate memory for the stats data");
  950|       |         /* NOTREACHED */
  951|      0|    }
  952|       |
  953|      6|    for (i = 0; i <= RTPP_PT_MAX; i++) {
  ------------------
  |  |   56|      6|#define	RTPP_PT_MAX	RTPP_PT_INET6
  |  |  ------------------
  |  |  |  |   55|      6|#define	RTPP_PT_INET6	1
  |  |  ------------------
  ------------------
  |  Branch (953:17): [True: 4, False: 2]
  ------------------
  954|      4|        cfs.port_table[i] = rtpp_port_table_ctor(cfs.port_min,
  955|      4|          cfs.port_max, cfs.seq_ports, cfs.port_ctl);
  956|      4|        if (cfs.port_table[i] == NULL) {
  ------------------
  |  Branch (956:13): [True: 0, False: 4]
  ------------------
  957|      0|            err(1, "can't allocate memory for the ports data");
  958|       |            /* NOTREACHED */
  959|      0|        }
  960|      4|    }
  961|       |
  962|      2|    if (rtpp_controlfd_init(&cfs) != 0) {
  ------------------
  |  Branch (962:9): [True: 0, False: 2]
  ------------------
  963|      0|        err(1, "can't initialize control socket%s",
  964|      0|          cfs.ctrl_socks->len > 1 ? "s" : "");
  ------------------
  |  Branch (964:11): [True: 0, False: 0]
  ------------------
  965|      0|    }
  966|       |
  967|      2|    if (cfs.ropts.no_daemon == 0) {
  ------------------
  |  Branch (967:9): [True: 0, False: 2]
  ------------------
  968|      0|        if (cfs.ropts.no_chdir == 0) {
  ------------------
  |  Branch (968:13): [True: 0, False: 0]
  ------------------
  969|      0|            cfs.cwd_orig = getcwd(NULL, 0);
  970|      0|            if (cfs.cwd_orig == NULL) {
  ------------------
  |  Branch (970:17): [True: 0, False: 0]
  ------------------
  971|      0|                err(1, "getcwd");
  972|      0|            }
  973|      0|        }
  974|      0|	drop = rtpp_daemon(cfs.ropts.no_chdir, 0);
  975|      0|	if (drop.result == -1)
  ------------------
  |  Branch (975:6): [True: 0, False: 0]
  ------------------
  976|      0|	    err(1, "can't switch into daemon mode");
  977|       |	    /* NOTREACHED */
  978|      0|    }
  979|       |
  980|      2|    if (CALL_METHOD(cfs.glog, start, &cfs) != 0) {
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (980:9): [True: 0, False: 2]
  ------------------
  981|       |        /* We cannot possibly function with broken logs, bail out */
  982|      0|        syslog(LOG_CRIT, "rtpproxy pid %d has failed to initialize logging"
  983|      0|            " facilities: crash", getpid());
  984|      0|        err(1, "rtpproxy has failed to initialize logging facilities");
  985|      0|    }
  986|       |
  987|      2|    atexit(ehandler);
  988|      2|    RTPP_LOG(cfs.glog, RTPP_LOG_INFO, "rtpproxy started, pid %d", getpid());
  ------------------
  |  |   57|      2|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      4|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      2|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  988|      2|    RTPP_LOG(cfs.glog, RTPP_LOG_INFO, "rtpproxy started, pid %d", getpid());
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      2|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      2|  __LINE__, ## args)
  ------------------
  989|       |
  990|      2|    if (cfs.sched_policy != SCHED_OTHER) {
  ------------------
  |  Branch (990:9): [True: 0, False: 2]
  ------------------
  991|      0|        sparam.sched_priority = sched_get_priority_max(cfs.sched_policy);
  992|      0|        if (sched_setscheduler(0, cfs.sched_policy, &sparam) == -1) {
  ------------------
  |  Branch (992:13): [True: 0, False: 0]
  ------------------
  993|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "sched_setscheduler(SCHED_%s, %d)",
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  993|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "sched_setscheduler(SCHED_%s, %d)",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  994|      0|              (cfs.sched_policy == SCHED_FIFO) ? "FIFO" : "RR", sparam.sched_priority);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
  994|      0|              (cfs.sched_policy == SCHED_FIFO) ? "FIFO" : "RR", sparam.sched_priority);
  995|      0|        }
  996|      0|    }
  997|      2|    if (cfs.sched_nice != PRIO_UNSET) {
  ------------------
  |  |  130|      2|#define PRIO_UNSET (PRIO_MIN - 1)
  ------------------
  |  Branch (997:9): [True: 0, False: 2]
  ------------------
  998|      0|        if (setpriority(PRIO_PROCESS, 0, cfs.sched_nice) == -1) {
  ------------------
  |  Branch (998:13): [True: 0, False: 0]
  ------------------
  999|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't set scheduling "
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  999|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't set scheduling "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1000|      0|              "priority to %d", cfs.sched_nice);
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1000|      0|              "priority to %d", cfs.sched_nice);
 1001|      0|            exit(1);
 1002|      0|        }
 1003|      0|    }
 1004|       |
 1005|      2|    if (cfs.ropts.no_pid == 0) {
  ------------------
  |  Branch (1005:9): [True: 0, False: 2]
  ------------------
 1006|      0|        pid_fd = open(cfs.pid_file, O_WRONLY | O_CREAT, DEFFILEMODE);
 1007|      0|        if (pid_fd < 0) {
  ------------------
  |  Branch (1007:13): [True: 0, False: 0]
  ------------------
 1008|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't open pidfile for writing");
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1008|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't open pidfile for writing");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1009|      0|        }
 1010|      2|    } else {
 1011|      2|        pid_fd = -1;
 1012|      2|    }
 1013|       |
 1014|      2|    if (cfs.runcreds->uname != NULL || cfs.runcreds->gname != NULL) {
  ------------------
  |  Branch (1014:9): [True: 0, False: 2]
  |  Branch (1014:40): [True: 0, False: 2]
  ------------------
 1015|      0|	if (drop_privileges(&cfs) != 0) {
  ------------------
  |  Branch (1015:6): [True: 0, False: 0]
  ------------------
 1016|      0|	    RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1016|      0|	    RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1017|      0|	      "can't switch to requested user/group");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1017|      0|	      "can't switch to requested user/group");
 1018|      0|	    exit(1);
 1019|      0|	}
 1020|      0|    }
 1021|      2|    set_rlimits(&cfs);
 1022|       |
 1023|      2|    cfs.pproc_manager = pproc_manager_ctor(cfs.rtpp_stats, 0);
 1024|      2|    if (cfs.pproc_manager == NULL) {
  ------------------
  |  Branch (1024:9): [True: 0, False: 2]
  ------------------
 1025|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1025|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1026|      0|          "can't init packet prosessing subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
 1026|      0|          "can't init packet prosessing subsystem");
 1027|      0|        exit(1);
 1028|      0|    }
 1029|       |
 1030|      2|    cfs.rtpp_proc_cf = rtpp_proc_async_ctor(&cfs);
 1031|      2|    if (cfs.rtpp_proc_cf == NULL) {
  ------------------
  |  Branch (1031:9): [True: 0, False: 2]
  ------------------
 1032|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1032|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1033|      0|          "can't init RTP processing subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
 1033|      0|          "can't init RTP processing subsystem");
 1034|      0|        exit(1);
 1035|      0|    }
 1036|       |
 1037|      2|    cfs.proc_servers = rtpp_proc_servers_ctor(&cfs, cfs.rtpp_proc_cf->netio);
 1038|      2|    if (cfs.proc_servers == NULL) {
  ------------------
  |  Branch (1038:9): [True: 0, False: 2]
  ------------------
 1039|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1039|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1040|      0|          "can't init RTP playback subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
 1040|      0|          "can't init RTP playback subsystem");
 1041|      0|        exit(1);
 1042|      0|    }
 1043|       |
 1044|      2|    cfs.rtpp_timed_cf = rtpp_timed_ctor(0.01);
 1045|      2|    if (cfs.rtpp_timed_cf == NULL) {
  ------------------
  |  Branch (1045:9): [True: 0, False: 2]
  ------------------
 1046|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1046|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1047|      0|          "can't init scheduling subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1047|      0|          "can't init scheduling subsystem");
 1048|      0|        exit(1);
 1049|      0|    }
 1050|       |
 1051|      2|    tp = CALL_SMETHOD(cfs.rtpp_timed_cf, schedule_rc, 1.0,
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  |  |               #define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  | 1051|      2|    tp = CALL_SMETHOD(cfs.rtpp_timed_cf, schedule_rc, 1.0,
  |  |  |  | 1052|      2|      cfs.rtpp_stats->rcnt, update_derived_stats, NULL,
  |  |  |  | 1053|      2|      cfs.rtpp_stats);
  |  |  ------------------
  ------------------
 1052|      2|      cfs.rtpp_stats->rcnt, update_derived_stats, NULL,
 1053|      2|      cfs.rtpp_stats);
 1054|      2|    if (tp == NULL) {
  ------------------
  |  Branch (1054:9): [True: 0, False: 2]
  ------------------
 1055|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1055|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1056|      0|          "can't schedule notification to derive stats");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1056|      0|          "can't schedule notification to derive stats");
 1057|      0|        exit(1);
 1058|      0|    }
 1059|      2|    RTPP_OBJ_DECREF(tp);
  ------------------
  |  |  152|      2|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      2|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
 1060|       |
 1061|      2|    cfs.rtpp_notify_cf = rtpp_notify_ctor(cfs.glog);
 1062|      2|    if (cfs.rtpp_notify_cf == NULL) {
  ------------------
  |  Branch (1062:9): [True: 0, False: 2]
  ------------------
 1063|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1063|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1064|      0|          "can't init timeout notification subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1064|      0|          "can't init timeout notification subsystem");
 1065|      0|        exit(1);
 1066|      0|    }
 1067|       |
 1068|      2|    cfs.rtpp_proc_ttl_cf = rtpp_proc_ttl_ctor(&cfs);
 1069|      2|    if (cfs.rtpp_proc_ttl_cf == NULL) {
  ------------------
  |  Branch (1069:9): [True: 0, False: 2]
  ------------------
 1070|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1070|      0|        RTPP_LOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1071|      0|          "can't init TTL processing subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
 1071|      0|          "can't init TTL processing subsystem");
 1072|      0|        exit(1);
 1073|      0|    }
 1074|       |
 1075|      2|#if ENABLE_MODULE_IF
 1076|      2|    const char *failmod;
 1077|      2|    if (CALL_METHOD(cfs.modules_cf, startall, &cfs, &failmod) != 0) {
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (1077:9): [True: 0, False: 2]
  ------------------
 1078|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1078|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1079|      0|          "%s: dymanic module start has failed", failmod);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1079|      0|          "%s: dymanic module start has failed", failmod);
 1080|      0|        exit(1);
 1081|      0|    }
 1082|      2|#endif
 1083|       |
 1084|      2|    cfs.rtpp_cmd_cf = rtpp_command_async_ctor(&cfs);
 1085|      2|    if (cfs.rtpp_cmd_cf == NULL) {
  ------------------
  |  Branch (1085:9): [True: 0, False: 2]
  ------------------
 1086|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1086|      0|        RTPP_ELOG(cfs.glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1087|      0|          "can't init command processing subsystem");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1087|      0|          "can't init command processing subsystem");
 1088|      0|        exit(1);
 1089|      0|    }
 1090|       |
 1091|      2|    if (cfs.ropts.no_sigtrap == 0) {
  ------------------
  |  Branch (1091:9): [True: 0, False: 2]
  ------------------
 1092|      0|        signal(SIGHUP, sighup);
 1093|      0|        signal(SIGINT, fatsignal);
 1094|      0|        signal(SIGKILL, fatsignal);
 1095|      0|        signal(SIGPIPE, SIG_IGN);
 1096|      0|        signal(SIGTERM, fatsignal);
 1097|      0|        signal(SIGXCPU, fatsignal);
 1098|      0|        signal(SIGXFSZ, fatsignal);
 1099|      0|        signal(SIGVTALRM, fatsignal);
 1100|      0|        signal(SIGPROF, fatsignal);
 1101|      0|        signal(SIGUSR1, fatsignal);
 1102|      0|        signal(SIGUSR2, fatsignal);
 1103|      0|        RTPP_DBGCODE(catchtrace) {
  ------------------
  |  |   84|      0|#define RTPP_DBGCODE(x) if (_DCOND_##x)
  ------------------
 1104|      0|            signal(SIGQUIT, rtpp_stacktrace);
 1105|      0|            signal(SIGILL, rtpp_stacktrace);
 1106|      0|            signal(SIGTRAP, rtpp_stacktrace);
 1107|      0|            signal(SIGABRT, rtpp_stacktrace);
 1108|       |#if defined(SIGEMT)
 1109|       |            signal(SIGEMT, rtpp_stacktrace);
 1110|       |#endif
 1111|      0|            signal(SIGFPE, rtpp_stacktrace);
 1112|      0|            signal(SIGBUS, rtpp_stacktrace);
 1113|      0|            signal(SIGSEGV, rtpp_stacktrace);
 1114|      0|            signal(SIGSYS, rtpp_stacktrace);
 1115|      0|        }
 1116|      0|    }
 1117|       |
 1118|       |#if !defined(LIBRTPPROXY)
 1119|       |    elp = prdic_init(cfs.target_pfreq / 10.0, 0.0);
 1120|       |    if (elp == NULL) {
 1121|       |        RTPP_LOG(cfs.glog, RTPP_LOG_ERR, "prdic_init() failed");
 1122|       |        exit(1);
 1123|       |    }
 1124|       |#endif
 1125|       |
 1126|      2|    if (pid_fd >= 0) {
  ------------------
  |  Branch (1126:9): [True: 0, False: 2]
  ------------------
 1127|      0|        if (ftruncate(pid_fd, 0) != 0) {
  ------------------
  |  Branch (1127:13): [True: 0, False: 0]
  ------------------
 1128|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't truncate pidfile");
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1128|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't truncate pidfile");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1129|      0|            exit(1);
 1130|      0|        }
 1131|      0|        len = sprintf(buf, "%u\n", (unsigned int)getpid());
 1132|      0|        if (write(pid_fd, buf, len) != len) {
  ------------------
  |  Branch (1132:13): [True: 0, False: 0]
  ------------------
 1133|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't write pidfile");
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1133|      0|            RTPP_ELOG(cfs.glog, RTPP_LOG_ERR, "can't write pidfile");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
 1134|      0|            exit(1);
 1135|      0|        }
 1136|      0|        close(pid_fd);
 1137|      0|    }
 1138|       |
 1139|       |#ifdef HAVE_SYSTEMD_DAEMON
 1140|       |    sd_notify(0, "READY=1");
 1141|       |#endif
 1142|       |
 1143|      2|    if (cfs.ropts.no_daemon == 0) {
  ------------------
  |  Branch (1143:9): [True: 0, False: 2]
  ------------------
 1144|      0|        if (rtpp_daemon_rel_parent(&drop) != 0) {
  ------------------
  |  Branch (1144:13): [True: 0, False: 0]
  ------------------
 1145|      0|            RTPP_LOG(cfs.glog, RTPP_LOG_ERR, "parent died prematurely #cry #die");
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1145|      0|            RTPP_LOG(cfs.glog, RTPP_LOG_ERR, "parent died prematurely #cry #die");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
 1146|      0|            exit(1);
 1147|      0|        }
 1148|      0|    }
 1149|       |
 1150|      2|#if defined(LIBRTPPROXY)
 1151|      2|    return (&cfs);
 1152|      0|#endif
 1153|       |
 1154|      0|    for (;;) {
 1155|      0|        if (cfs.fastshutdown != 0) {
  ------------------
  |  Branch (1155:13): [True: 0, False: 0]
  ------------------
 1156|      0|            break;
 1157|      0|        }
 1158|      0|        if (cfs.slowshutdown != 0 &&
  ------------------
  |  Branch (1158:13): [True: 0, False: 0]
  ------------------
 1159|      0|          CALL_SMETHOD(cfs.sessions_wrt, get_length) == 0) {
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  |  Branch (1159:11): [True: 0, False: 0]
  ------------------
 1160|      0|            RTPP_LOG(cfs.glog, RTPP_LOG_INFO,
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  | 1160|      0|            RTPP_LOG(cfs.glog, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  | 1161|      0|              "deorbiting-burn sequence completed, exiting");
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
 1161|      0|              "deorbiting-burn sequence completed, exiting");
 1162|      0|            break;
 1163|      0|        }
 1164|      0|        prdic_procrastinate(elp);
 1165|      0|    }
 1166|      0|    prdic_free(elp);
 1167|       |
 1168|      0|    rtpp_shutdown(&cfs);
 1169|       |
 1170|       |#ifdef HAVE_SYSTEMD_DAEMON
 1171|       |    sd_notify(0, "STATUS=Exited");
 1172|       |#endif
 1173|       |
 1174|      0|    rtpp_exit(1, 0);
 1175|      2|}
main.c:init_config:
  274|      2|{
  275|      2|    int ch, i, umode, stdio_mode;
  276|      2|    char *bh[2], *bh6[2], *cp;
  277|      2|    const char *errmsg;
  278|      2|    struct passwd *pp;
  279|      2|    struct group *gp;
  280|      2|    struct rtpp_ctrl_sock *ctrl_sock;
  281|      2|    int option_index, brsym;
  282|      2|    const struct proto_cap *pcp;
  283|      2|    struct rtpp_module_if *mif;
  284|      2|    char mpath[PATH_MAX + 1];
  285|      2|    struct rtpp_module_conf *mcp;
  286|       |
  287|      2|    bh[0] = bh[1] = bh6[0] = bh6[1] = NULL;
  288|       |
  289|      2|    umode = stdio_mode = 0;
  290|       |
  291|      2|    cfsp->pid_file = PID_FILE;
  ------------------
  |  |   55|      2|#define	PID_FILE	"/var/run/rtpproxy.pid"
  ------------------
  292|       |
  293|      2|    cfsp->port_min = PORT_MIN;
  ------------------
  |  |   38|      2|#define	PORT_MIN	35000
  ------------------
  294|      2|    cfsp->port_max = PORT_MAX;
  ------------------
  |  |   39|      2|#define	PORT_MAX	65000
  ------------------
  295|      2|    cfsp->port_ctl = 0;
  296|       |
  297|      2|    cfsp->advaddr[0] = NULL;
  298|      2|    cfsp->advaddr[1] = NULL;
  299|       |
  300|      2|    cfsp->max_ttl = SESSION_TIMEOUT;
  ------------------
  |  |   41|      2|#define	SESSION_TIMEOUT	60	/* in ticks */
  ------------------
  301|      2|    cfsp->tos = TOS;
  ------------------
  |  |   42|      2|#define	TOS		0xb8
  ------------------
  302|      2|    cfsp->rrtcp = 1;
  303|      2|    cfsp->runcreds->sock_mode = 0;
  304|      2|    cfsp->ttl_mode = TTL_UNIFIED;
  305|      2|    cfsp->log_level = -1;
  306|      2|    cfsp->log_facility = -1;
  307|      2|    cfsp->sched_hz = rtpp_get_sched_hz();
  308|      2|    cfsp->sched_policy = SCHED_OTHER;
  309|      2|    cfsp->sched_nice = PRIO_UNSET;
  ------------------
  |  |  130|      2|#define PRIO_UNSET (PRIO_MIN - 1)
  ------------------
  310|      2|    cfsp->target_pfreq = MIN(POLL_RATE, cfsp->sched_hz);
  ------------------
  |  |   40|      2|#define MIN(x, y)       (((x) > (y)) ? (y) : (x))
  |  |  ------------------
  |  |  |  Branch (40:26): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  311|      2|    cfsp->slowshutdown = 0;
  312|      2|    cfsp->fastshutdown = 0;
  313|       |
  314|      2|    cfsp->rtpp_tnset_cf = rtpp_tnotify_set_ctor();
  315|      2|    if (cfsp->rtpp_tnset_cf == NULL) {
  ------------------
  |  Branch (315:9): [True: 0, False: 2]
  ------------------
  316|      0|        err(1, "rtpp_tnotify_set_ctor");
  317|      0|    }
  318|       |
  319|      2|    cfsp->locks = malloc(sizeof(*cfsp->locks));
  320|      2|    if (cfsp->locks == NULL) {
  ------------------
  |  Branch (320:9): [True: 0, False: 2]
  ------------------
  321|      0|        err(1, "malloc(rtpp_cfg->locks)");
  322|      0|    }
  323|      2|    if (pthread_mutex_init(&(cfsp->locks->glob), NULL) != 0) {
  ------------------
  |  Branch (323:9): [True: 0, False: 2]
  ------------------
  324|      0|        errx(1, "pthread_mutex_init(rtpp_cfg->locks->glob)");
  325|      0|    }
  326|      2|    cfsp->bindaddrs_cf = rtpp_bindaddrs_ctor();
  327|      2|    if (cfsp->bindaddrs_cf == NULL) {
  ------------------
  |  Branch (327:9): [True: 0, False: 2]
  ------------------
  328|      0|        err(1, "malloc(rtpp_cfg->bindaddrs_cf)");
  329|      0|    }
  330|       |
  331|      2|    cfsp->nofile = rtpp_nofile_ctor();
  332|      2|    if (cfsp->nofile == NULL)
  ------------------
  |  Branch (332:9): [True: 0, False: 2]
  ------------------
  333|      0|        err(1, "malloc(rtpp_cfg->nofile)");
  334|       |
  335|      2|    cfsp->sessions_wrt = rtpp_weakref_ctor();
  336|      2|    if (cfsp->sessions_wrt == NULL) {
  ------------------
  |  Branch (336:9): [True: 0, False: 2]
  ------------------
  337|      0|        err(1, "can't allocate memory for the sessions weakref table");
  338|       |         /* NOTREACHED */
  339|      0|    }
  340|       |
  341|      2|    option_index = -1;
  342|      2|    brsym = 0;
  343|     24|    while ((ch = getopt_long(argc, argv, "vf2Rl:6:s:S:t:r:p:T:L:m:M:u:Fin:Pad:"
  ------------------
  |  Branch (343:12): [True: 22, False: 2]
  ------------------
  344|     24|      "Vc:A:w:bW:DC", longopts, &option_index)) != -1) {
  345|     22|	switch (ch) {
  346|      6|        case LOPT_DSO:
  ------------------
  |  |  229|      6|#define LOPT_DSO      256
  ------------------
  |  Branch (346:9): [True: 6, False: 16]
  ------------------
  347|      6|            cp = NULL;
  348|      6|#if defined(LIBRTPPROXY)
  349|      6|            if (rtpp_static_modules_lookup(optarg) != NULL) {
  ------------------
  |  Branch (349:17): [True: 6, False: 0]
  ------------------
  350|      6|                cp = optarg;
  351|      6|            }
  352|      6|#endif
  353|      6|            if (cp == NULL)
  ------------------
  |  Branch (353:17): [True: 0, False: 6]
  ------------------
  354|      0|                cp = realpath(optarg, mpath);
  355|      6|            if (cp == NULL) {
  ------------------
  |  Branch (355:17): [True: 0, False: 6]
  ------------------
  356|      0|                 err(1, "realpath: %s", optarg);
  357|      0|            }
  358|      6|            mif = rtpp_module_if_ctor(cp);
  359|      6|            if (mif == NULL) {
  ------------------
  |  Branch (359:17): [True: 0, False: 6]
  ------------------
  360|      0|                err(1, "%s: dymanic module constructor has failed", cp);
  361|      0|            }
  362|      6|            if (CALL_METHOD(mif, load, cfsp, cfsp->glog) != 0) {
  ------------------
  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (362:17): [True: 0, False: 6]
  ------------------
  363|      0|                errx(1, "%p: dymanic module load has failed", mif);
  364|      0|            }
  365|      6|            if (CALL_METHOD(mif, get_mconf, &mcp) != 0) {
  ------------------
  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (365:17): [True: 0, False: 6]
  ------------------
  366|      0|                errx(1, "%p->get_mconf() method has failed: %s", mif, cp);
  367|      0|            }
  368|      6|            if (mcp != NULL) {
  ------------------
  |  Branch (368:17): [True: 0, False: 6]
  ------------------
  369|      0|                 errx(1, "%s: dymanic module requires configuration, cannot be "
  370|      0|                   "loaded via --dso option", cp);
  371|      0|            }
  372|      6|            CALL_METHOD(cfsp->modules_cf, insert, mif);
  ------------------
  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  373|      6|            break;
  374|       |
  375|      0|        case LOPT_BRSYM:
  ------------------
  |  |  230|      0|#define LOPT_BRSYM    257
  ------------------
  |  Branch (375:9): [True: 0, False: 22]
  ------------------
  376|      0|            brsym = 1;
  377|      0|            break;
  378|       |
  379|      0|        case LOPT_NICE:
  ------------------
  |  |  231|      0|#define LOPT_NICE     258
  ------------------
  |  Branch (379:9): [True: 0, False: 22]
  ------------------
  380|      0|            switch (atoi_saferange(optarg, &cfsp->sched_nice, PRIO_MIN, PRIO_MAX)) {
  381|      0|            case ATOI_OK:
  ------------------
  |  Branch (381:13): [True: 0, False: 0]
  ------------------
  382|      0|                break;
  383|      0|            case ATOI_OUTRANGE:
  ------------------
  |  Branch (383:13): [True: 0, False: 0]
  ------------------
  384|      0|                errx(1, "%s: nice level is out of range %d..%d", optarg,
  385|      0|                  PRIO_MIN, PRIO_MAX);
  386|      0|            default:
  ------------------
  |  Branch (386:13): [True: 0, False: 0]
  ------------------
  387|      0|                errx(1, "%s: nice level argument is invalid", optarg);
  388|      0|            }
  389|      0|            break;
  390|       |
  391|      0|        case LOPT_OVL_PROT:
  ------------------
  |  |  232|      0|#define LOPT_OVL_PROT 259
  ------------------
  |  Branch (391:9): [True: 0, False: 22]
  ------------------
  392|      0|            cfsp->overload_prot.low_trs = 0.85;
  393|      0|            cfsp->overload_prot.high_trs = 0.90;
  394|      0|            cfsp->overload_prot.ecode = ECODE_OVERLOAD;
  ------------------
  |  |   87|      0|#define ECODE_OVERLOAD    98
  ------------------
  395|      0|            break;
  396|       |
  397|      0|        case LOPT_CONFIG:
  ------------------
  |  |  233|      0|#define LOPT_CONFIG   260
  ------------------
  |  Branch (397:9): [True: 0, False: 22]
  ------------------
  398|      0|            cfsp->cfile = optarg;
  399|      0|            break;
  400|       |
  401|      0|        case LOPT_FORC_ASM:
  ------------------
  |  |  234|      0|#define LOPT_FORC_ASM 261
  ------------------
  |  Branch (401:9): [True: 0, False: 22]
  ------------------
  402|      0|            cfsp->aforce = 1;
  403|      0|            break;
  404|       |
  405|      0|        case 'c':
  ------------------
  |  Branch (405:9): [True: 0, False: 22]
  ------------------
  406|      0|            if (strcmp(optarg, "fifo") == 0) {
  ------------------
  |  Branch (406:17): [True: 0, False: 0]
  ------------------
  407|      0|                 cfsp->sched_policy = SCHED_FIFO;
  408|      0|                 break;
  409|      0|            }
  410|      0|            if (strcmp(optarg, "rr") == 0) {
  ------------------
  |  Branch (410:17): [True: 0, False: 0]
  ------------------
  411|      0|                 cfsp->sched_policy = SCHED_RR;
  412|      0|                 break;
  413|      0|            }
  414|      0|            errx(1, "%s: unknown scheduling policy", optarg);
  415|      0|            break;
  416|       |
  417|      2|	case 'f':
  ------------------
  |  Branch (417:2): [True: 2, False: 20]
  ------------------
  418|      2|	    cfsp->ropts.no_daemon = 1;
  419|      2|	    break;
  420|       |
  421|      0|	case 'l':
  ------------------
  |  Branch (421:2): [True: 0, False: 22]
  ------------------
  422|      0|	    bh[0] = optarg;
  423|      0|	    bh[1] = strchr(bh[0], '/');
  424|      0|	    if (bh[1] != NULL) {
  ------------------
  |  Branch (424:10): [True: 0, False: 0]
  ------------------
  425|      0|		*bh[1] = '\0';
  426|      0|		bh[1]++;
  427|      0|		cfsp->bmode = 1;
  428|       |		/*
  429|       |		 * Historically, in bridge mode all clients are assumed to
  430|       |		 * be asymmetric
  431|       |		 */
  432|      0|		cfsp->aforce = 1;
  433|      0|	    }
  434|      0|	    break;
  435|       |
  436|      0|	case '6':
  ------------------
  |  Branch (436:2): [True: 0, False: 22]
  ------------------
  437|      0|	    bh6[0] = optarg;
  438|      0|	    bh6[1] = strchr(bh6[0], '/');
  439|      0|	    if (bh6[1] != NULL) {
  ------------------
  |  Branch (439:10): [True: 0, False: 0]
  ------------------
  440|      0|		*bh6[1] = '\0';
  441|      0|		bh6[1]++;
  442|      0|		cfsp->bmode = 1;
  443|      0|		cfsp->aforce = 1;
  444|      0|	    }
  445|      0|	    break;
  446|       |
  447|      0|    case 'A':
  ------------------
  |  Branch (447:5): [True: 0, False: 22]
  ------------------
  448|      0|        if (*optarg == '\0') {
  ------------------
  |  Branch (448:13): [True: 0, False: 0]
  ------------------
  449|      0|            errx(1, "first advertised address is invalid");
  450|      0|        }
  451|      0|        cfsp->advaddr[0] = optarg;
  452|      0|        cp = strchr(optarg, '/');
  453|      0|        if (cp != NULL) {
  ------------------
  |  Branch (453:13): [True: 0, False: 0]
  ------------------
  454|      0|            *cp = '\0';
  455|      0|            cp++;
  456|      0|            if (*cp == '\0') {
  ------------------
  |  Branch (456:17): [True: 0, False: 0]
  ------------------
  457|      0|                errx(1, "second advertised address is invalid");
  458|      0|            }
  459|      0|        }
  460|      0|        cfsp->advaddr[1] = cp;
  461|      0|        break;
  462|       |
  463|      2|	case 's':
  ------------------
  |  Branch (463:2): [True: 2, False: 20]
  ------------------
  464|      2|            ctrl_sock = rtpp_ctrl_sock_parse(optarg);
  465|      2|            if (ctrl_sock == NULL) {
  ------------------
  |  Branch (465:17): [True: 0, False: 2]
  ------------------
  466|      0|                errx(1, "can't parse control socket argument");
  467|      0|            }
  468|      2|            rtpp_list_append(cfsp->ctrl_socks, ctrl_sock);
  469|      2|            if (RTPP_CTRL_ISDG(ctrl_sock)) {
  ------------------
  |  |   47|      2|#define RTPP_CTRL_ISDG(rcsp) ((rcsp)->type == RTPC_UDP4 || (rcsp)->type == RTPC_UDP6)
  |  |  ------------------
  |  |  |  Branch (47:31): [True: 0, False: 2]
  |  |  |  Branch (47:60): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  470|      0|                umode = 1;
  471|      2|            } else if (ctrl_sock->type == RTPC_STDIO) {
  ------------------
  |  Branch (471:24): [True: 2, False: 0]
  ------------------
  472|      2|                stdio_mode = 1;
  473|      2|            }
  474|      2|	    break;
  475|       |
  476|      0|	case 't':
  ------------------
  |  Branch (476:2): [True: 0, False: 22]
  ------------------
  477|      0|            switch (atoi_saferange(optarg, &cfsp->tos, 0, 255)) {
  478|      0|            case ATOI_OK:
  ------------------
  |  Branch (478:13): [True: 0, False: 0]
  ------------------
  479|      0|                break;
  480|      0|            case ATOI_OUTRANGE:
  ------------------
  |  Branch (480:13): [True: 0, False: 0]
  ------------------
  481|      0|                errx(1, "%s: TOS is too small/large", optarg);
  482|      0|            default:
  ------------------
  |  Branch (482:13): [True: 0, False: 0]
  ------------------
  483|      0|                errx(1, "%s: TOS argument is invalid", optarg);
  484|      0|	    }
  485|      0|            break;
  486|       |
  487|      0|	case '2':
  ------------------
  |  Branch (487:2): [True: 0, False: 22]
  ------------------
  488|      0|	    cfsp->dmode = 1;
  489|      0|	    break;
  490|       |
  491|      0|	case 'v':
  ------------------
  |  Branch (491:2): [True: 0, False: 22]
  ------------------
  492|      0|	    printf("Basic version: %d\n", CPROTOVER);
  ------------------
  |  |   36|      0|#define	CPROTOVER	20040107
  ------------------
  493|      0|	    for (pcp = iterate_proto_caps(NULL); pcp != NULL; pcp = iterate_proto_caps(pcp)) {
  ------------------
  |  Branch (493:43): [True: 0, False: 0]
  ------------------
  494|      0|		printf("Extension %s: %s\n", pcp->pc_id, pcp->pc_description);
  495|      0|	    }
  496|      0|	    init_config_bail(cfsp, 0, NULL, 0);
  497|      0|	    break;
  498|       |
  499|      2|	case 'r':
  ------------------
  |  Branch (499:2): [True: 2, False: 20]
  ------------------
  500|      2|	    cfsp->rdir = optarg;
  501|      2|	    break;
  502|       |
  503|      2|	case 'S':
  ------------------
  |  Branch (503:2): [True: 2, False: 20]
  ------------------
  504|      2|	    cfsp->sdir = optarg;
  505|      2|	    break;
  506|       |
  507|      0|	case 'R':
  ------------------
  |  Branch (507:2): [True: 0, False: 22]
  ------------------
  508|      0|	    cfsp->rrtcp = 0;
  509|      0|	    break;
  510|       |
  511|      0|	case 'p':
  ------------------
  |  Branch (511:2): [True: 0, False: 22]
  ------------------
  512|      0|	    cfsp->pid_file = optarg;
  513|      0|	    break;
  514|       |
  515|      2|	case 'T':
  ------------------
  |  Branch (515:2): [True: 2, False: 20]
  ------------------
  516|      2|	    if (atoi_saferange(optarg, &cfsp->max_ttl, 1, -1))
  ------------------
  |  Branch (516:10): [True: 0, False: 2]
  ------------------
  517|      0|                errx(1, "%s: max TTL argument is invalid", optarg);
  518|      2|	    break;
  519|       |
  520|      2|	case 'L': {
  ------------------
  |  Branch (520:2): [True: 0, False: 22]
  ------------------
  521|      0|            int rlim_max_opt;
  522|       |
  523|      0|            if (atoi_saferange(optarg, &rlim_max_opt, 0, -1))
  ------------------
  |  Branch (523:17): [True: 0, False: 0]
  ------------------
  524|      0|                errx(1, "%s: max file rlimit argument is invalid", optarg);
  525|      0|	    cfsp->nofile->limit->rlim_cur = rlim_max_opt;
  526|      0|	    cfsp->nofile->limit->rlim_max = rlim_max_opt;
  527|      0|	    if (setrlimit(RLIMIT_NOFILE, cfsp->nofile->limit) != 0)
  ------------------
  |  Branch (527:10): [True: 0, False: 0]
  ------------------
  528|      0|		err(1, "setrlimit");
  529|      0|	    if (getrlimit(RLIMIT_NOFILE, cfsp->nofile->limit) != 0)
  ------------------
  |  Branch (529:10): [True: 0, False: 0]
  ------------------
  530|      0|		err(1, "getrlimit");
  531|      0|	    if (cfsp->nofile->limit->rlim_max < rlim_max_opt)
  ------------------
  |  Branch (531:10): [True: 0, False: 0]
  ------------------
  532|      0|		warnx("limit allocated by setrlimit (%d) is less than "
  533|      0|		  "requested (%d)", (int) cfsp->nofile->limit->rlim_max,
  534|      0|		  rlim_max_opt);
  535|      0|	    break;
  536|      0|            }
  537|       |
  538|      0|	case 'm':
  ------------------
  |  Branch (538:2): [True: 0, False: 22]
  ------------------
  539|      0|	    switch (atoi_saferange(optarg, &cfsp->port_min, 1, 65535)) {
  540|      0|            case ATOI_OK:
  ------------------
  |  Branch (540:13): [True: 0, False: 0]
  ------------------
  541|      0|                break;
  542|      0|            case ATOI_OUTRANGE:
  ------------------
  |  Branch (542:13): [True: 0, False: 0]
  ------------------
  543|      0|                errx(1, "invalid value of the port_min argument, "
  544|      0|                  "not in the range 1-65535");
  545|      0|            default:
  ------------------
  |  Branch (545:13): [True: 0, False: 0]
  ------------------
  546|      0|                errx(1, "%s: min port argument is invalid", optarg);
  547|      0|            }
  548|      0|	    break;
  549|       |
  550|      0|	case 'M':
  ------------------
  |  Branch (550:2): [True: 0, False: 22]
  ------------------
  551|      0|	    switch (atoi_saferange(optarg, &cfsp->port_max, 1, 65535)) {
  552|      0|            case ATOI_OK:
  ------------------
  |  Branch (552:13): [True: 0, False: 0]
  ------------------
  553|      0|                break;
  554|      0|            case ATOI_OUTRANGE:
  ------------------
  |  Branch (554:13): [True: 0, False: 0]
  ------------------
  555|      0|                errx(1, "invalid value of the port_max argument, "
  556|      0|                  "not in the range 1-65535");
  557|      0|            default:
  ------------------
  |  Branch (557:13): [True: 0, False: 0]
  ------------------
  558|      0|                errx(1, "%s: max port argument is invalid", optarg);
  559|      0|            }
  560|      0|	    break;
  561|       |
  562|      0|	case 'u':
  ------------------
  |  Branch (562:2): [True: 0, False: 22]
  ------------------
  563|      0|	    cfsp->runcreds->uname = optarg;
  564|      0|	    cp = strchr(optarg, ':');
  565|      0|	    if (cp != NULL) {
  ------------------
  |  Branch (565:10): [True: 0, False: 0]
  ------------------
  566|      0|		if (cp == optarg)
  ------------------
  |  Branch (566:7): [True: 0, False: 0]
  ------------------
  567|      0|		    cfsp->runcreds->uname = NULL;
  568|      0|		cp[0] = '\0';
  569|      0|		cp++;
  570|      0|	    }
  571|      0|	    cfsp->runcreds->gname = cp;
  572|      0|	    cfsp->runcreds->uid = -1;
  573|      0|	    cfsp->runcreds->gid = -1;
  574|      0|	    if (cfsp->runcreds->uname != NULL) {
  ------------------
  |  Branch (574:10): [True: 0, False: 0]
  ------------------
  575|      0|		pp = getpwnam(cfsp->runcreds->uname);
  576|      0|		if (pp == NULL)
  ------------------
  |  Branch (576:7): [True: 0, False: 0]
  ------------------
  577|      0|		    errx(1, "can't find ID for the user: %s", cfsp->runcreds->uname);
  578|      0|		cfsp->runcreds->uid = pp->pw_uid;
  579|      0|		if (cfsp->runcreds->gname == NULL)
  ------------------
  |  Branch (579:7): [True: 0, False: 0]
  ------------------
  580|      0|		    cfsp->runcreds->gid = pp->pw_gid;
  581|      0|	    }
  582|      0|	    if (cfsp->runcreds->gname != NULL) {
  ------------------
  |  Branch (582:10): [True: 0, False: 0]
  ------------------
  583|      0|		gp = getgrnam(cfsp->runcreds->gname);
  584|      0|		if (gp == NULL)
  ------------------
  |  Branch (584:7): [True: 0, False: 0]
  ------------------
  585|      0|		    errx(1, "can't find ID for the group: %s", cfsp->runcreds->gname);
  586|      0|		cfsp->runcreds->gid = gp->gr_gid;
  587|      0|                if (cfsp->runcreds->sock_mode == 0) {
  ------------------
  |  Branch (587:21): [True: 0, False: 0]
  ------------------
  588|      0|                    cfsp->runcreds->sock_mode = 0755;
  589|      0|                }
  590|      0|	    }
  591|      0|	    break;
  592|       |
  593|      0|	case 'w': {
  ------------------
  |  Branch (593:2): [True: 0, False: 22]
  ------------------
  594|      0|            int sock_mode;
  595|       |
  596|      0|	    if (atoi_saferange(optarg, &sock_mode, 0, 4095))
  ------------------
  |  Branch (596:10): [True: 0, False: 0]
  ------------------
  597|      0|                errx(1, "%s: socket mode argument is invalid", optarg);
  598|      0|            cfsp->runcreds->sock_mode = sock_mode;
  599|      0|	    break;
  600|      0|            }
  601|       |
  602|      0|	case 'F':
  ------------------
  |  Branch (602:2): [True: 0, False: 22]
  ------------------
  603|      0|	    cfsp->no_check = 1;
  604|      0|	    break;
  605|       |
  606|      0|	case 'i':
  ------------------
  |  Branch (606:2): [True: 0, False: 22]
  ------------------
  607|      0|	    cfsp->ttl_mode = TTL_INDEPENDENT;
  608|      0|	    break;
  609|       |
  610|      2|	case 'n':
  ------------------
  |  Branch (610:2): [True: 2, False: 20]
  ------------------
  611|      2|	    if(strlen(optarg) == 0)
  ------------------
  |  Branch (611:9): [True: 0, False: 2]
  ------------------
  612|      0|		errx(1, "timeout notification socket name too short");
  613|      2|            if (CALL_METHOD(cfsp->rtpp_tnset_cf, append, optarg,
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (613:17): [True: 0, False: 2]
  ------------------
  614|      2|              &errmsg) != 0) {
  615|      0|                errx(1, "error adding timeout notification: %s", errmsg);
  616|      0|            }
  617|      2|	    break;
  618|       |
  619|      2|	case 'P':
  ------------------
  |  Branch (619:2): [True: 0, False: 22]
  ------------------
  620|      0|	    cfsp->record_pcap = 1;
  621|      0|	    break;
  622|       |
  623|      0|	case 'a':
  ------------------
  |  Branch (623:2): [True: 0, False: 22]
  ------------------
  624|      0|	    cfsp->record_all = 1;
  625|      0|	    break;
  626|       |
  627|      2|	case 'd':
  ------------------
  |  Branch (627:2): [True: 2, False: 20]
  ------------------
  628|      2|	    cp = strchr(optarg, ':');
  629|      2|	    if (cp != NULL) {
  ------------------
  |  Branch (629:10): [True: 0, False: 2]
  ------------------
  630|      0|		cfsp->log_facility = rtpp_log_str2fac(cp + 1);
  631|      0|		if (cfsp->log_facility == -1)
  ------------------
  |  Branch (631:7): [True: 0, False: 0]
  ------------------
  632|      0|		    errx(1, "%s: invalid log facility", cp + 1);
  633|      0|		*cp = '\0';
  634|      0|	    }
  635|      2|	    cfsp->log_level = rtpp_log_str2lvl(optarg);
  636|      2|	    if (cfsp->log_level == -1)
  ------------------
  |  Branch (636:10): [True: 0, False: 2]
  ------------------
  637|      0|		errx(1, "%s: invalid log level", optarg);
  638|      2|            CALL_METHOD(cfsp->glog, setlevel, cfsp->log_level);
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  639|      2|	    break;
  640|       |
  641|      0|	case 'V':
  ------------------
  |  Branch (641:2): [True: 0, False: 22]
  ------------------
  642|      0|	    printf("%s\n", RTPP_SW_VERSION);
  ------------------
  |  |   10|      0|#define RTPP_SW_VERSION (PACKAGE_VERSION "." VERSION_GIT)
  |  |  ------------------
  |  |  |  |  210|      0|#define PACKAGE_VERSION "3.0-rc.1"
  |  |  ------------------
  |  |               #define RTPP_SW_VERSION (PACKAGE_VERSION "." VERSION_GIT)
  |  |  ------------------
  |  |  |  |  238|      0|#define VERSION_GIT "6dbdd9ce"
  |  |  ------------------
  ------------------
  643|      0|	    init_config_bail(cfsp, 0, NULL, 0);
  644|      0|	    break;
  645|       |
  646|      2|        case 'W':
  ------------------
  |  Branch (646:9): [True: 2, False: 20]
  ------------------
  647|      2|            if (atoi_saferange(optarg, &cfsp->max_setup_ttl, 1, -1))
  ------------------
  |  Branch (647:17): [True: 0, False: 2]
  ------------------
  648|      0|                errx(1, "%s: max setup TTL argument is invalid", optarg);
  649|      2|            break;
  650|       |
  651|      2|        case 'b':
  ------------------
  |  Branch (651:9): [True: 0, False: 22]
  ------------------
  652|      0|            cfsp->seq_ports = 1;
  653|      0|            break;
  654|       |
  655|      0|        case 'D':
  ------------------
  |  Branch (655:9): [True: 0, False: 22]
  ------------------
  656|      0|	    cfsp->ropts.no_chdir = 1;
  657|      0|	    break;
  658|       |
  659|      0|        case 'C':
  ------------------
  |  Branch (659:9): [True: 0, False: 22]
  ------------------
  660|      0|	    printf("%s\n", get_mclock_name());
  661|      0|	    init_config_bail(cfsp, 0, NULL, 0);
  662|      0|	    break;
  663|       |
  664|      0|	case '?':
  ------------------
  |  Branch (664:2): [True: 0, False: 22]
  ------------------
  665|      0|	default:
  ------------------
  |  Branch (665:2): [True: 0, False: 22]
  ------------------
  666|      0|	    usage();
  667|     22|	}
  668|     22|    }
  669|       |
  670|      2|    if (optind != argc) {
  ------------------
  |  Branch (670:9): [True: 0, False: 2]
  ------------------
  671|      0|       warnx("%d extra unhandled argument%s at the end of the command line",
  672|      0|         argc - optind, (argc - optind) > 1 ? "s" : "");
  ------------------
  |  Branch (672:25): [True: 0, False: 0]
  ------------------
  673|      0|       usage();
  674|      0|    }
  675|       |
  676|      2|    if (cfsp->cfile != NULL) {
  ------------------
  |  Branch (676:9): [True: 0, False: 2]
  ------------------
  677|      0|        if (rtpp_cfile_process(cfsp) < 0) {
  ------------------
  |  Branch (677:13): [True: 0, False: 0]
  ------------------
  678|      0|            init_config_bail(cfsp, 1, "rtpp_cfile_process() failed", 1);
  679|      0|        }
  680|      0|    }
  681|       |
  682|      2|    if (cfsp->bmode != 0 && brsym != 0) {
  ------------------
  |  Branch (682:9): [True: 0, False: 2]
  |  Branch (682:29): [True: 0, False: 0]
  ------------------
  683|      0|        cfsp->aforce = 0;
  684|      0|    }
  685|       |
  686|      2|    if (cfsp->max_setup_ttl == 0) {
  ------------------
  |  Branch (686:9): [True: 0, False: 2]
  ------------------
  687|      0|        cfsp->max_setup_ttl = cfsp->max_ttl;
  688|      0|    }
  689|       |
  690|       |    /* No control socket has been specified, add a default one */
  691|      2|    if (RTPP_LIST_IS_EMPTY(cfsp->ctrl_socks)) {
  ------------------
  |  |   61|      2|#define RTPP_LIST_IS_EMPTY(slp) ((slp)->len == 0)
  |  |  ------------------
  |  |  |  Branch (61:33): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  692|      0|        ctrl_sock = rtpp_ctrl_sock_parse(CMD_SOCK);
  ------------------
  |  |   54|      0|#define	CMD_SOCK	"/var/run/rtpproxy.sock"
  ------------------
  693|      0|        if (ctrl_sock == NULL) {
  ------------------
  |  Branch (693:13): [True: 0, False: 0]
  ------------------
  694|      0|            errx(1, "can't parse control socket: \"%s\"", CMD_SOCK);
  ------------------
  |  |   54|      0|#define	CMD_SOCK	"/var/run/rtpproxy.sock"
  ------------------
  695|      0|        }
  696|      0|        rtpp_list_append(cfsp->ctrl_socks, ctrl_sock);
  697|      0|    }
  698|       |
  699|      2|    if (cfsp->rdir == NULL && cfsp->sdir != NULL)
  ------------------
  |  Branch (699:9): [True: 0, False: 2]
  |  Branch (699:31): [True: 0, False: 0]
  ------------------
  700|      0|	errx(1, "-S switch requires -r switch");
  701|       |
  702|      2|    if (cfsp->ropts.no_daemon == 0 && stdio_mode != 0)
  ------------------
  |  Branch (702:9): [True: 0, False: 2]
  |  Branch (702:39): [True: 0, False: 0]
  ------------------
  703|      0|        errx(1, "stdio command mode requires -f switch");
  704|       |
  705|      2|    if (cfsp->no_check == 0 && getuid() == 0 && cfsp->runcreds->uname == NULL) {
  ------------------
  |  Branch (705:9): [True: 2, False: 0]
  |  Branch (705:32): [True: 2, False: 0]
  |  Branch (705:49): [True: 2, False: 0]
  ------------------
  706|      2|	if (umode != 0) {
  ------------------
  |  Branch (706:6): [True: 0, False: 2]
  ------------------
  707|      0|	    errx(1, "running this program as superuser in a remote control "
  708|      0|	      "mode is strongly not recommended, as it poses serious security "
  709|      0|	      "threat to your system. Use -u option to run as an unprivileged "
  710|      0|	      "user or -F is you want to run as a superuser anyway.");
  711|      2|	} else {
  712|      2|	    warnx("WARNING!!! Running this program as superuser is strongly "
  713|      2|	      "not recommended, as it may pose serious security threat to "
  714|      2|	      "your system. Use -u option to run as an unprivileged user "
  715|      2|	      "or -F to surpress this warning.");
  716|      2|	}
  717|      2|    }
  718|       |
  719|       |    /* make sure that port_min and port_max are even */
  720|      2|    if ((cfsp->port_min % 2) != 0)
  ------------------
  |  Branch (720:9): [True: 0, False: 2]
  ------------------
  721|      0|	cfsp->port_min++;
  722|      2|    if ((cfsp->port_max % 2) != 0) {
  ------------------
  |  Branch (722:9): [True: 0, False: 2]
  ------------------
  723|      0|	cfsp->port_max--;
  724|      2|    } else {
  725|       |	/*
  726|       |	 * If port_max is already even then there is no
  727|       |	 * "room" for the RTCP port, go back by two ports.
  728|       |	 */
  729|      2|	cfsp->port_max -= 2;
  730|      2|    }
  731|       |
  732|      2|    if (cfsp->port_min > cfsp->port_max)
  ------------------
  |  Branch (732:9): [True: 0, False: 2]
  ------------------
  733|      0|	errx(1, "port_min should be less than port_max");
  734|       |
  735|      2|    if (bh[0] == NULL && bh[1] == NULL && bh6[0] == NULL && bh6[1] == NULL) {
  ------------------
  |  Branch (735:9): [True: 2, False: 0]
  |  Branch (735:26): [True: 2, False: 0]
  |  Branch (735:43): [True: 2, False: 0]
  |  Branch (735:61): [True: 2, False: 0]
  ------------------
  736|      2|	bh[0] = "*";
  737|      2|    }
  738|       |
  739|      6|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (739:17): [True: 4, False: 2]
  ------------------
  740|      4|	if (bh[i] != NULL && *bh[i] == '\0')
  ------------------
  |  Branch (740:6): [True: 2, False: 2]
  |  Branch (740:23): [True: 0, False: 2]
  ------------------
  741|      0|	    bh[i] = NULL;
  742|      4|	if (bh6[i] != NULL && *bh6[i] == '\0')
  ------------------
  |  Branch (742:6): [True: 0, False: 4]
  |  Branch (742:24): [True: 0, False: 0]
  ------------------
  743|      0|	    bh6[i] = NULL;
  744|      4|    }
  745|       |
  746|      2|    i = ((bh[0] == NULL) ? 0 : 1) + ((bh[1] == NULL) ? 0 : 1) +
  ------------------
  |  Branch (746:10): [True: 0, False: 2]
  |  Branch (746:38): [True: 2, False: 0]
  ------------------
  747|      2|      ((bh6[0] == NULL) ? 0 : 1) + ((bh6[1] == NULL) ? 0 : 1);
  ------------------
  |  Branch (747:8): [True: 2, False: 0]
  |  Branch (747:37): [True: 2, False: 0]
  ------------------
  748|      2|    if (cfsp->bmode != 0) {
  ------------------
  |  Branch (748:9): [True: 0, False: 2]
  ------------------
  749|      0|	if (bh[0] != NULL && bh6[0] != NULL)
  ------------------
  |  Branch (749:6): [True: 0, False: 0]
  |  Branch (749:23): [True: 0, False: 0]
  ------------------
  750|      0|	    errx(1, "either IPv4 or IPv6 should be configured for external "
  751|      0|	      "interface in bridging mode, not both");
  752|      0|	if (bh[1] != NULL && bh6[1] != NULL)
  ------------------
  |  Branch (752:6): [True: 0, False: 0]
  |  Branch (752:23): [True: 0, False: 0]
  ------------------
  753|      0|	    errx(1, "either IPv4 or IPv6 should be configured for internal "
  754|      0|	      "interface in bridging mode, not both");
  755|      0|        if (cfsp->advaddr[0] != NULL && cfsp->advaddr[1] == NULL)
  ------------------
  |  Branch (755:13): [True: 0, False: 0]
  |  Branch (755:41): [True: 0, False: 0]
  ------------------
  756|      0|            errx(1, "two advertised addresses are required for internal "
  757|      0|              "and external interfaces in bridging mode");
  758|      0|	if (i != 2)
  ------------------
  |  Branch (758:6): [True: 0, False: 0]
  ------------------
  759|      0|	    errx(1, "incomplete configuration of the bridging mode - exactly "
  760|      0|	      "2 listen addresses required, %d provided", i);
  761|      2|    } else if (i != 1) {
  ------------------
  |  Branch (761:16): [True: 0, False: 2]
  ------------------
  762|      0|	errx(1, "exactly 1 listen addresses required, %d provided", i);
  763|      0|    }
  764|       |
  765|      6|    for (i = 0; i < 2; i++) {
  ------------------
  |  Branch (765:17): [True: 4, False: 2]
  ------------------
  766|      4|	cfsp->bindaddr[i] = NULL;
  767|      4|	if (bh[i] != NULL) {
  ------------------
  |  Branch (767:6): [True: 2, False: 2]
  ------------------
  768|      2|	    cfsp->bindaddr[i] = CALL_METHOD(cfsp->bindaddrs_cf,
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  769|      2|              host2, bh[i], AF_INET, AI_PASSIVE, &errmsg);
  |  |  ------------------
  ------------------
  769|      2|              host2, bh[i], AF_INET, AI_PASSIVE, &errmsg);
  770|      2|	    if (cfsp->bindaddr[i] == NULL)
  ------------------
  |  Branch (770:10): [True: 0, False: 2]
  ------------------
  771|      0|		errx(1, "host2bindaddr: %s", errmsg);
  772|      2|	    continue;
  773|      2|	}
  774|      2|	if (bh6[i] != NULL) {
  ------------------
  |  Branch (774:6): [True: 0, False: 2]
  ------------------
  775|      0|	    cfsp->bindaddr[i] = CALL_METHOD(cfsp->bindaddrs_cf,
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  776|      0|              host2, bh6[i], AF_INET6, AI_PASSIVE, &errmsg);
  |  |  ------------------
  ------------------
  776|      0|              host2, bh6[i], AF_INET6, AI_PASSIVE, &errmsg);
  777|      0|	    if (cfsp->bindaddr[i] == NULL)
  ------------------
  |  Branch (777:10): [True: 0, False: 0]
  ------------------
  778|      0|		errx(1, "host2bindaddr: %s", errmsg);
  779|      0|	    continue;
  780|      0|	}
  781|      2|    }
  782|      2|    if (cfsp->bindaddr[0] == NULL) {
  ------------------
  |  Branch (782:9): [True: 0, False: 2]
  ------------------
  783|      0|	cfsp->bindaddr[0] = cfsp->bindaddr[1];
  784|      0|	cfsp->bindaddr[1] = NULL;
  785|      0|    }
  786|      2|}
main.c:update_derived_stats:
  790|      1|{
  791|      1|    struct rtpp_stats *rtpp_stats;
  792|       |
  793|      1|    rtpp_stats = (struct rtpp_stats *)argp;
  794|      1|    CALL_SMETHOD(rtpp_stats, update_derived, dtime);
  ------------------
  |  |  134|      1|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      1|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      1|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      1|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      1|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      1|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      1|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      1|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      1|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      1|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      1|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      1|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      1|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      1|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      1|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      1|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      1|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      1|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      1|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      1|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      1|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      1|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      1|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      1|)
  |  |  ------------------
  ------------------
  795|      1|    return (CB_MORE);
  796|      1|}

rtpp_bindaddrs_ctor:
  141|      2|{
  142|      2|    struct rtpp_bindaddrs_pvt *cf;
  143|       |
  144|      2|    cf = rtpp_zmalloc(sizeof(*cf));
  145|      2|    if (cf == NULL)
  ------------------
  |  Branch (145:9): [True: 0, False: 2]
  ------------------
  146|      0|        goto e0;
  147|      2|    if (pthread_mutex_init(&cf->bindaddr_lock, NULL) != 0)
  ------------------
  |  Branch (147:9): [True: 0, False: 2]
  ------------------
  148|      0|        goto e1;
  149|      2|    cf->pub.addr2 = addr2bindaddr;
  150|      2|    cf->pub.host2 = host2bindaddr;
  151|      2|    cf->pub.foraf = bindaddr4af;
  152|      2|    cf->pub.dtor = rtpp_bindaddrs_dtor;
  153|      2|    return (&(cf->pub));
  154|      0|e1:
  155|      0|    free(cf);
  156|      0|e0:
  157|      0|    return (NULL);
  158|      0|}
rtpp_bindaddrs.c:addr2bindaddr:
   58|   235k|{
   59|   235k|    struct bindaddr_list *bl;
   60|   235k|    struct rtpp_bindaddrs_pvt *cf;
   61|       |
   62|   235k|    PUB2PVT(pub, cf);
  ------------------
  |  |  147|   235k|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
   63|   235k|    pthread_mutex_lock(&cf->bindaddr_lock);
   64|  48.1M|    for (bl = cf->bindaddr_list; bl != NULL; bl = bl->next) {
  ------------------
  |  Branch (64:34): [True: 48.1M, False: 246]
  ------------------
   65|  48.1M|        if (ishostseq(sstosa(bl->bindaddr), ia) != 0) {
  ------------------
  |  |   82|  48.1M|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  |  Branch (65:13): [True: 234k, False: 47.8M]
  ------------------
   66|   234k|            pthread_mutex_unlock(&cf->bindaddr_lock);
   67|   234k|            return (sstosa(bl->bindaddr));
  ------------------
  |  |   82|   234k|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
   68|   234k|        }
   69|  48.1M|    }
   70|    246|    bl = malloc(sizeof(*bl) + sizeof(*bl->bindaddr));
   71|    246|    if (bl == NULL) {
  ------------------
  |  Branch (71:9): [True: 0, False: 246]
  ------------------
   72|      0|        pthread_mutex_unlock(&cf->bindaddr_lock);
   73|      0|        *ep = strerror(errno);
   74|      0|        return (NULL);
   75|      0|    }
   76|    246|    bl->bindaddr = (struct sockaddr_storage *)((char *)bl + sizeof(*bl));
   77|    246|    memcpy(bl->bindaddr, ia, SA_LEN(ia));
  ------------------
  |  |   62|    246|   (((sa)->sa_family == AF_INET) ? \
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 160, False: 86]
  |  |  ------------------
  |  |   63|    246|   sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
  ------------------
   78|    246|    bl->next = cf->bindaddr_list;
   79|    246|    cf->bindaddr_list = bl;
   80|    246|    pthread_mutex_unlock(&cf->bindaddr_lock);
   81|    246|    return (sstosa(bl->bindaddr));
  ------------------
  |  |   82|    246|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
   82|    246|}
rtpp_bindaddrs.c:host2bindaddr:
   87|   235k|{
   88|   235k|    int n;
   89|   235k|    struct sockaddr_storage ia;
   90|   235k|    const struct sockaddr *rval;
   91|       |
   92|       |    /*
   93|       |     * If user specified * then change it to NULL,
   94|       |     * that will make getaddrinfo to return addr_any socket
   95|       |     */
   96|   235k|    if (host && (strcmp(host, "*") == 0))
  ------------------
  |  Branch (96:9): [True: 235k, False: 0]
  |  Branch (96:17): [True: 2, False: 235k]
  ------------------
   97|      2|        host = NULL;
   98|       |
   99|   235k|    if ((n = resolve(sstosa(&ia), pf, host, SERVICE, ai_flags)) != 0) {
  ------------------
  |  |   82|   235k|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
                  if ((n = resolve(sstosa(&ia), pf, host, SERVICE, ai_flags)) != 0) {
  ------------------
  |  |   52|   235k|#define	SERVICE		"34999"
  ------------------
  |  Branch (99:9): [True: 114, False: 235k]
  ------------------
  100|    114|        *ep = gai_strerror(n);
  101|    114|        return (NULL);
  102|    114|    }
  103|   235k|    rval = addr2bindaddr(pub, sstosa(&ia), ep);
  ------------------
  |  |   82|   235k|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  104|   235k|    return (rval);
  105|   235k|}
rtpp_bindaddrs.c:bindaddr4af:
  109|    375|{
  110|    375|    struct bindaddr_list *bl;
  111|    375|    struct rtpp_bindaddrs_pvt *cf;
  112|       |
  113|    375|    PUB2PVT(pub, cf);
  ------------------
  |  |  147|    375|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  114|    375|    pthread_mutex_lock(&cf->bindaddr_lock);
  115|  1.10k|    for (bl = cf->bindaddr_list; bl != NULL; bl = bl->next) {
  ------------------
  |  Branch (115:34): [True: 1.09k, False: 10]
  ------------------
  116|  1.09k|        if (sstosa(bl->bindaddr)->sa_family == af) {
  ------------------
  |  |   82|  1.09k|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  |  Branch (116:13): [True: 365, False: 733]
  ------------------
  117|    365|            pthread_mutex_unlock(&cf->bindaddr_lock);
  118|    365|            return (sstosa(bl->bindaddr));
  ------------------
  |  |   82|    365|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  119|    365|        }
  120|  1.09k|    }
  121|     10|    pthread_mutex_unlock(&cf->bindaddr_lock);
  122|     10|    return (NULL);
  123|    375|}

rtpc_doreply:
  188|  1.97k|{
  189|  1.97k|    struct rtpp_command_priv *pvt;
  190|       |
  191|  1.97k|    PUB2PVT(cmd, pvt);
  ------------------
  |  |  147|  1.97k|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  192|       |
  193|  1.97k|    if (len > 0 && buf[len - 1] == '\n') {
  ------------------
  |  Branch (193:9): [True: 1.97k, False: 0]
  |  Branch (193:20): [True: 1.97k, False: 0]
  ------------------
  194|  1.97k|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "sending reply \"%.*s\\n\"",
  ------------------
  |  |   57|  1.97k|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|  3.94k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.97k|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|  1.97k|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  194|  1.97k|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "sending reply \"%.*s\\n\"",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|  1.97k|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  195|  1.97k|          len - 1, buf);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  1.97k|  __LINE__, ## args)
  ------------------
  195|  1.97k|          len - 1, buf);
  196|  1.97k|    } else {
  197|      0|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "sending reply \"%.*s\"",
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      0|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "sending reply \"%.*s\"",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|      0|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  198|      0|          len, buf);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  198|      0|          len, buf);
  199|      0|    }
  200|  1.97k|    if (pvt->umode == 0) {
  ------------------
  |  Branch (200:9): [True: 1.97k, False: 0]
  ------------------
  201|  1.97k|        if (write(pvt->controlfd, buf, len) < 0) {
  ------------------
  |  Branch (201:13): [True: 0, False: 1.97k]
  ------------------
  202|      0|            RTPP_DBG_ASSERT(!IS_WEIRD_ERRNO(errno));
  203|      0|        }
  204|  1.97k|    } else {
  205|      0|        if (pvt->cookie.s != NULL) {
  ------------------
  |  Branch (205:13): [True: 0, False: 0]
  ------------------
  206|      0|            len = snprintf(pvt->buf_r, sizeof(pvt->buf_r), "%.*s %.*s",
  207|      0|              (int)pvt->cookie.len, pvt->cookie.s, len, buf);
  208|      0|            buf = pvt->buf_r;
  209|      0|            CALL_METHOD(pvt->rcache_obj, insert, rtpp_str_fix(&pvt->cookie), pvt->buf_r,
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  209|      0|            CALL_METHOD(pvt->rcache_obj, insert, rtpp_str_fix(&pvt->cookie), pvt->buf_r,
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  |  |  |  |  ------------------
  |  |  |  |  210|      0|              cmd->dtime->mono);
  |  |  ------------------
  ------------------
  210|      0|              cmd->dtime->mono);
  211|      0|        }
  212|      0|        rtpp_anetio_sendto(pvt->cfs->rtpp_proc_cf->netio, pvt->controlfd, buf,
  213|      0|          len, 0, sstosa(&cmd->raddr), cmd->rlen);
  ------------------
  |  |   82|      0|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  214|      0|    }
  215|  1.97k|    cmd->csp->ncmds_repld.cnt++;
  216|  1.97k|    if (errd == 0) {
  ------------------
  |  Branch (216:9): [True: 171, False: 1.80k]
  ------------------
  217|    171|        cmd->csp->ncmds_succd.cnt++;
  218|  1.80k|    } else {
  219|  1.80k|        cmd->csp->ncmds_errs.cnt++;
  220|  1.80k|    }
  221|  1.97k|}
reply_number:
  225|     91|{
  226|     91|    int len;
  227|       |
  228|     91|    len = snprintf(cmd->buf_t, sizeof(cmd->buf_t), "%d\n", number);
  229|     91|    rtpc_doreply(cmd, cmd->buf_t, len, 0);
  230|     91|}
reply_ok:
  234|      3|{
  235|       |
  236|      3|    reply_number(cmd, 0);
  237|      3|}
reply_error:
  242|  1.76k|{
  243|  1.76k|    int len;
  244|       |
  245|  1.76k|    len = snprintf(cmd->buf_t, sizeof(cmd->buf_t), "E%d\n", ecode);
  246|  1.76k|    rtpc_doreply(cmd, cmd->buf_t, len, 1);
  247|  1.76k|}
free_command:
  251|  1.97k|{
  252|  1.97k|    struct rtpp_command_priv *pvt;
  253|       |
  254|  1.97k|    PUB2PVT(cmd, pvt);
  ------------------
  |  |  147|  1.97k|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  255|  1.97k|    if (pvt->rcache_obj != NULL) {
  ------------------
  |  Branch (255:9): [True: 0, False: 1.97k]
  ------------------
  256|      0|        RTPP_OBJ_DECREF(pvt->rcache_obj);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  257|      0|    }
  258|  1.97k|    if (cmd->sp != NULL) {
  ------------------
  |  Branch (258:9): [True: 0, False: 1.97k]
  ------------------
  259|      0|        RTPP_OBJ_DECREF(cmd->sp);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  260|      0|    }
  261|  33.5k|    for (int i = 0; i < MAX_SUBC_NUM; i++) {
  ------------------
  |  |   73|  33.5k|#define MAX_SUBC_NUM 16
  ------------------
  |  Branch (261:21): [True: 31.5k, False: 1.97k]
  ------------------
  262|  31.5k|        if (cmd->after_success[i].args.dyn != NULL)
  ------------------
  |  Branch (262:13): [True: 263, False: 31.2k]
  ------------------
  263|    263|            free(cmd->after_success[i].args.dyn);
  264|  31.5k|    }
  265|  1.97k|    free(pvt);
  266|  1.97k|}
rtpp_command_ctor:
  271|  1.97k|{
  272|  1.97k|    struct rtpp_command_priv *pvt;
  273|  1.97k|    struct rtpp_command *cmd;
  274|       |
  275|  1.97k|    pvt = rtpp_zmalloc(sizeof(struct rtpp_command_priv));
  276|  1.97k|    if (pvt == NULL) {
  ------------------
  |  Branch (276:9): [True: 0, False: 1.97k]
  ------------------
  277|      0|        return (NULL);
  278|      0|    }
  279|  1.97k|    cmd = &(pvt->pub);
  280|  1.97k|    pvt->controlfd = controlfd;
  281|  1.97k|    pvt->cfs = cfsp;
  282|  1.97k|    pvt->dtime.wall = dtime->wall;
  283|  1.97k|    pvt->dtime.mono = dtime->mono;
  284|  1.97k|    cmd->dtime = &pvt->dtime;
  285|  1.97k|    cmd->csp = csp;
  286|  1.97k|    cmd->glog = cfsp->glog;
  287|  1.97k|    pvt->umode = umode;
  288|  1.97k|    return (cmd);
  289|  1.97k|}
rtpp_command_split:
  391|  1.97k|{
  392|  1.97k|    rtpp_str_const_t *ap;
  393|  1.97k|    struct rtpp_command_priv *pvt;
  394|  1.97k|    struct rtpp_command_args *cap;
  395|  1.97k|    char mbuf[RTPP_CMD_BUFLEN];
  396|       |
  397|  1.97k|    PUB2PVT(cmd, pvt);
  ------------------
  |  |  147|  1.97k|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  398|  1.97k|    if (len > 0 && cmd->buf[len - 1] == '\n') {
  ------------------
  |  Branch (398:9): [True: 1.97k, False: 0]
  |  Branch (398:20): [True: 2, False: 1.97k]
  ------------------
  399|      2|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "received command \"%.*s\\n\"",
  ------------------
  |  |   57|      2|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      4|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      2|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      2|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  399|      2|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "received command \"%.*s\\n\"",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|      2|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  400|      2|          len - 1, cmd->buf);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      2|  __LINE__, ## args)
  ------------------
  400|      2|          len - 1, cmd->buf);
  401|  1.97k|    } else {
  402|  1.97k|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "received command \"%s\"",
  ------------------
  |  |   57|  1.97k|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|  3.94k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|  1.97k|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|  1.97k|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  402|  1.97k|        RTPP_LOG(pvt->cfs->glog, RTPP_LOG_DBUG, "received command \"%s\"",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|  1.97k|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  403|  1.97k|          cmd->buf);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|  1.97k|  __LINE__, ## args)
  ------------------
  403|  1.97k|          cmd->buf);
  404|  1.97k|    }
  405|  1.97k|    cmd->csp->ncmds_rcvd.cnt++;
  406|       |
  407|  1.97k|    cap = &cmd->args;
  408|  1.97k|    rtpp_strsplit(cmd->buf, mbuf, len, sizeof(mbuf));
  409|  1.97k|    char *mp, *mp_next;
  410|  1.97k|    ap = cap->v;
  411|  13.3k|    for (mp = mbuf; mp != NULL && (mp - mbuf) < len; mp = mp_next) {
  ------------------
  |  Branch (411:21): [True: 11.3k, False: 1.94k]
  |  Branch (411:35): [True: 11.3k, False: 16]
  ------------------
  412|  11.3k|        rtpp_str_const_t tap;
  413|  11.3k|        mp_next = memchr(mp, '\0', len - (mp - mbuf));
  414|  11.3k|        if (mp_next == NULL) {
  ------------------
  |  Branch (414:13): [True: 1.95k, False: 9.40k]
  ------------------
  415|  1.95k|            tap.len = mbuf + len - mp;
  416|  9.40k|        } else {
  417|  9.40k|            tap.len = mp_next - mp;
  418|  9.40k|            mp_next += 1;
  419|  9.40k|        }
  420|  11.3k|        if (tap.len == 0) {
  ------------------
  |  Branch (420:13): [True: 403, False: 10.9k]
  ------------------
  421|    403|            continue;
  422|    403|        }
  423|  10.9k|        tap.s = cmd->buf + (mp - mbuf);
  424|  10.9k|        size_t slen = strlen(tap.s);
  425|  10.9k|        RTPP_DBG_ASSERT(slen <= tap.len);
  426|  10.9k|        if (slen < tap.len) {
  ------------------
  |  Branch (426:13): [True: 7, False: 10.9k]
  ------------------
  427|       |            /* \0 inside a parameter is not allowed */
  428|      7|            goto synerr;
  429|      7|        }
  430|  10.9k|        *ap = tap;
  431|       |
  432|  10.9k|        if (cap == &cmd->args) {
  ------------------
  |  Branch (432:13): [True: 8.88k, False: 2.07k]
  ------------------
  433|       |            /* Stream communication mode doesn't use cookie */
  434|  8.88k|            if (pvt->umode != 0 && cap->c == 0 && pvt->cookie.s == NULL) {
  ------------------
  |  Branch (434:17): [True: 0, False: 8.88k]
  |  Branch (434:36): [True: 0, False: 0]
  |  Branch (434:51): [True: 0, False: 0]
  ------------------
  435|      0|                pvt->cookie = *ap;
  436|      0|                if (rtpp_command_guard_retrans(cmd, rcache_obj)) {
  ------------------
  |  Branch (436:21): [True: 0, False: 0]
  ------------------
  437|      0|                    *rval = GET_CMD_OK;
  ------------------
  |  |   41|      0|#define GET_CMD_OK     (0)
  ------------------
  438|      0|                    return (1);
  439|      0|                }
  440|      0|                continue;
  441|      0|            }
  442|  8.88k|        }
  443|       |
  444|  10.9k|        if (ISAMPAMP(ap)) {
  ------------------
  |  |  364|  10.9k|#define ISAMPAMP(vp) ((vp)->len == 2 && (vp)->s[0] == '&' && (vp)->s[1] == '&')
  |  |  ------------------
  |  |  |  Branch (364:23): [True: 2.15k, False: 8.80k]
  |  |  |  Branch (364:41): [True: 1.07k, False: 1.07k]
  |  |  |  Branch (364:62): [True: 861, False: 216]
  |  |  ------------------
  ------------------
  445|    861|            if (cmd->subc.n == (MAX_SUBC_NUM - 1))
  ------------------
  |  |   73|    861|#define MAX_SUBC_NUM 16
  ------------------
  |  Branch (445:17): [True: 1, False: 860]
  ------------------
  446|      1|                goto synerr;
  447|    860|            ap->s = NULL;
  448|    860|            ap->len = 0;
  449|    860|            cap = &cmd->subc.args[cmd->subc.n];
  450|    860|            cmd->subc.n += 1;
  451|    860|            ap = cap->v;
  452|    860|            continue;
  453|    861|        }
  454|  10.0k|        cap->c++;
  455|  10.0k|        if (++ap >= &cap->v[RTPC_MAX_ARGC])
  ------------------
  |  |   32|  10.0k|#define RTPC_MAX_ARGC   20
  ------------------
  |  Branch (455:13): [True: 2, False: 10.0k]
  ------------------
  456|      2|            goto synerr;
  457|  10.0k|    }
  458|  1.96k|    if (cmd->args.c < 1 || (pvt->umode != 0 && pvt->cookie.s == NULL)) {
  ------------------
  |  Branch (458:9): [True: 31, False: 1.93k]
  |  Branch (458:29): [True: 0, False: 1.93k]
  |  Branch (458:48): [True: 0, False: 0]
  ------------------
  459|     31|        goto synerr;
  460|     31|    }
  461|  2.66k|    for (int i = 0; i < cmd->subc.n; i++) {
  ------------------
  |  Branch (461:21): [True: 742, False: 1.92k]
  ------------------
  462|    742|        cap = &cmd->subc.args[i];
  463|    742|        if (cap->c < 1) {
  ------------------
  |  Branch (463:13): [True: 9, False: 733]
  ------------------
  464|      9|            goto synerr;
  465|      9|        }
  466|    742|    }
  467|       |
  468|       |    /* Step I: parse parameters that are common to all ops */
  469|  1.92k|    if (rtpp_command_pre_parse(pvt->cfs, cmd) != 0) {
  ------------------
  |  Branch (469:9): [True: 109, False: 1.81k]
  ------------------
  470|       |        /* Error reply is handled by the rtpp_command_pre_parse() */
  471|    109|        *rval = GET_CMD_INVAL;
  ------------------
  |  |   46|    109|#define GET_CMD_INVAL (-5)
  ------------------
  472|    109|        return (1);
  473|    109|    }
  474|       |
  475|  1.81k|    return (0);
  476|     50|synerr:
  477|     50|    RTPP_LOG(pvt->cfs->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     50|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|    100|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     50|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     50|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  477|     50|    RTPP_LOG(pvt->cfs->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     50|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     50|  __LINE__, ## args)
  ------------------
  478|     50|    reply_error(cmd, ECODE_PARSE_1);
  ------------------
  |  |   38|     50|#define ECODE_PARSE_1      5
  ------------------
  479|     50|    *rval = GET_CMD_INVAL;
  ------------------
  |  |   46|     50|#define GET_CMD_INVAL (-5)
  ------------------
  480|     50|    return (1);
  481|       |
  482|  1.92k|}
handle_command:
  486|  1.81k|{
  487|  1.81k|    int i, verbose, rval;
  488|  1.81k|    const char *cp;
  489|  1.81k|    const char *recording_name;
  490|  1.81k|    struct rtpp_session *spa;
  491|  1.81k|    int record_single_file;
  492|  1.81k|    int norecord_all;
  493|       |
  494|  1.81k|    spa = NULL;
  495|  1.81k|    recording_name = NULL;
  496|  1.81k|    norecord_all = 0;
  497|  1.81k|    record_single_file = 0;
  498|       |
  499|       |    /* Step II: parse parameters that are specific to a particular op and run simple ops */
  500|  1.81k|    switch (cmd->cca.op) {
  501|     86|    case VER_FEATURE:
  ------------------
  |  Branch (501:5): [True: 86, False: 1.72k]
  ------------------
  502|     86|        handle_ver_feature(cfsp, cmd);
  503|     86|        return 0;
  504|       |
  505|      2|    case GET_VER:
  ------------------
  |  Branch (505:5): [True: 2, False: 1.81k]
  ------------------
  506|       |        /* This returns base version. */
  507|      2|        reply_number(cmd, CPROTOVER);
  ------------------
  |  |   36|      2|#define	CPROTOVER	20040107
  ------------------
  508|      2|        return 0;
  509|       |
  510|      3|    case DELETE_ALL:
  ------------------
  |  Branch (510:5): [True: 3, False: 1.81k]
  ------------------
  511|       |        /* Delete all active sessions */
  512|      3|        RTPP_LOG(cfsp->glog, RTPP_LOG_INFO, "deleting all active sessions");
  ------------------
  |  |   57|      3|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      3|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      3|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  512|      3|        RTPP_LOG(cfsp->glog, RTPP_LOG_INFO, "deleting all active sessions");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|      3|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      3|  __LINE__, ## args)
  ------------------
  513|      3|        CALL_SMETHOD(cfsp->sessions_wrt, purge);
  ------------------
  |  |  134|      3|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      3|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      3|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      3|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      3|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      3|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      3|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      3|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      3|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      3|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      3|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      3|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      3|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      3|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      3|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      3|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      3|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      3|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      3|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      3|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      3|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      3|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      3|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      3|)
  |  |  ------------------
  ------------------
  514|      3|        CALL_SMETHOD(cfsp->sessions_ht, purge);
  ------------------
  |  |  134|      3|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      3|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      3|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      3|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      3|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      3|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      3|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      3|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      3|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      3|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      3|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      3|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      3|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      3|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      3|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      3|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      3|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      3|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      3|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      3|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      3|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      3|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      3|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      3|)
  |  |  ------------------
  ------------------
  515|      3|        reply_ok(cmd);
  516|      3|        return 0;
  517|       |
  518|     51|    case INFO:
  ------------------
  |  Branch (518:5): [True: 51, False: 1.76k]
  ------------------
  519|     51|        handle_info(cfsp, cmd);
  520|     51|        return 0;
  521|       |
  522|     16|    case PLAY:
  ------------------
  |  Branch (522:5): [True: 16, False: 1.79k]
  ------------------
  523|       |        /*
  524|       |         * P callid pname codecs from_tag to_tag
  525|       |         *
  526|       |         *   <codecs> could be either comma-separated list of supported
  527|       |         *   payload types or word "session" (without quotes), in which
  528|       |         *   case list saved on last session update will be used instead.
  529|       |         */
  530|     16|        cmd->cca.opts.play = rtpp_command_play_opts_parse(cmd);
  531|     16|        if (cmd->cca.opts.play == NULL) {
  ------------------
  |  Branch (531:13): [True: 12, False: 4]
  ------------------
  532|     12|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "can't parse options");
  ------------------
  |  |   57|     12|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     24|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     12|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  532|     12|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "can't parse options");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     12|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     12|  __LINE__, ## args)
  ------------------
  533|     12|            return 0;
  534|     12|        }
  535|      4|        break;
  536|       |
  537|      4|    case COPY:
  ------------------
  |  Branch (537:5): [True: 1, False: 1.81k]
  ------------------
  538|      1|        recording_name = cmd->args.v[2].s;
  539|       |        /* Fallthrough */
  540|     42|    case RECORD:
  ------------------
  |  Branch (540:5): [True: 41, False: 1.77k]
  ------------------
  541|     42|        if (cmd->args.v[0].s[1] == 'S' || cmd->args.v[0].s[1] == 's') {
  ------------------
  |  Branch (541:13): [True: 3, False: 39]
  |  Branch (541:43): [True: 8, False: 31]
  ------------------
  542|     11|            if (cmd->args.v[0].s[2] != '\0') {
  ------------------
  |  Branch (542:17): [True: 9, False: 2]
  ------------------
  543|      9|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|      9|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     18|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      9|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  543|      9|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      9|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      9|  __LINE__, ## args)
  ------------------
  544|      9|                reply_error(cmd, ECODE_PARSE_2);
  ------------------
  |  |   39|      9|#define ECODE_PARSE_2      6
  ------------------
  545|      9|                return 0;
  546|      9|            }
  547|      2|            record_single_file = RSF_MODE_DFLT(cfsp);
  ------------------
  |  |   37|      2|#define RSF_MODE_DFLT(cfsp) (((cfsp)->record_pcap == 0) ? 0 : 1)
  |  |  ------------------
  |  |  |  Branch (37:30): [True: 2, False: 0]
  |  |  ------------------
  ------------------
  548|     31|        } else {
  549|     31|            if (cmd->args.v[0].s[1] != '\0') {
  ------------------
  |  Branch (549:17): [True: 22, False: 9]
  ------------------
  550|     22|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     22|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     44|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     22|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     22|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  550|     22|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     22|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     22|  __LINE__, ## args)
  ------------------
  551|     22|                reply_error(cmd, ECODE_PARSE_3);
  ------------------
  |  |   40|     22|#define ECODE_PARSE_3      7
  ------------------
  552|     22|                return 0;
  553|     22|            }
  554|      9|            record_single_file = 0;
  555|      9|        }
  556|     11|        break;
  557|       |
  558|     31|    case NORECORD:
  ------------------
  |  Branch (558:5): [True: 31, False: 1.78k]
  ------------------
  559|     31|        if (cmd->args.v[0].s[1] == 'A' || cmd->args.v[0].s[1] == 'a') {
  ------------------
  |  Branch (559:13): [True: 7, False: 24]
  |  Branch (559:43): [True: 3, False: 21]
  ------------------
  560|     10|            if (cmd->args.v[0].s[2] != '\0') {
  ------------------
  |  Branch (560:17): [True: 8, False: 2]
  ------------------
  561|      8|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|      8|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     16|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      8|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      8|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  561|      8|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      8|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      8|  __LINE__, ## args)
  ------------------
  562|      8|                reply_error(cmd, ECODE_PARSE_2);
  ------------------
  |  |   39|      8|#define ECODE_PARSE_2      6
  ------------------
  563|      8|                return 0;
  564|      8|            }
  565|      2|            norecord_all = 1;
  566|     21|        } else {
  567|     21|            if (cmd->args.v[0].s[1] != '\0') {
  ------------------
  |  Branch (567:17): [True: 19, False: 2]
  ------------------
  568|     19|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     19|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     38|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     19|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     19|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  568|     19|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     19|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     19|  __LINE__, ## args)
  ------------------
  569|     19|                reply_error(cmd, ECODE_PARSE_3);
  ------------------
  |  |   40|     19|#define ECODE_PARSE_3      7
  ------------------
  570|     19|                return 0;
  571|     19|            }
  572|      2|            norecord_all = 0;
  573|      2|        }
  574|      4|        break;
  575|       |
  576|     38|    case DELETE:
  ------------------
  |  Branch (576:5): [True: 38, False: 1.77k]
  ------------------
  577|       |        /* D[w] call_id from_tag [to_tag] */
  578|     38|        cmd->cca.opts.delete = rtpp_command_del_opts_parse(cmd, &cmd->args);
  579|     38|        if (cmd->cca.opts.delete == NULL) {
  ------------------
  |  Branch (579:13): [True: 9, False: 29]
  ------------------
  580|      9|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "can't parse options");
  ------------------
  |  |   57|      9|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     18|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  580|      9|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "can't parse options");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      9|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      9|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      9|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      9|  __LINE__, ## args)
  ------------------
  581|      9|            return 0;
  582|      9|        }
  583|     29|        break;
  584|       |
  585|  1.07k|    case UPDATE:
  ------------------
  |  Branch (585:5): [True: 1.07k, False: 737]
  ------------------
  586|  1.16k|    case LOOKUP:
  ------------------
  |  Branch (586:5): [True: 91, False: 1.72k]
  ------------------
  587|  1.16k|        cmd->cca.opts.ul = rtpp_command_ul_opts_parse(cfsp, cmd);
  588|  1.16k|        if (cmd->cca.opts.ul == NULL) {
  ------------------
  |  Branch (588:13): [True: 581, False: 586]
  ------------------
  589|    581|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "can't parse options");
  ------------------
  |  |   57|    581|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|  1.16k|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    581|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    581|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  589|    581|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "can't parse options");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|    581|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    581|  __LINE__, ## args)
  ------------------
  590|    581|            return 0;
  591|    581|        }
  592|    586|	break;
  593|       |
  594|    586|    case GET_STATS:
  ------------------
  |  Branch (594:5): [True: 142, False: 1.67k]
  ------------------
  595|    142|        verbose = 0;
  596|    780|        for (cp = cmd->args.v[0].s + 1; *cp != '\0'; cp++) {
  ------------------
  |  Branch (596:41): [True: 650, False: 130]
  ------------------
  597|    650|            switch (*cp) {
  598|    284|            case 'v':
  ------------------
  |  Branch (598:13): [True: 284, False: 366]
  ------------------
  599|    638|            case 'V':
  ------------------
  |  Branch (599:13): [True: 354, False: 296]
  ------------------
  600|    638|                verbose = 1;
  601|    638|                break;
  602|       |
  603|     12|            default:
  ------------------
  |  Branch (603:13): [True: 12, False: 638]
  ------------------
  604|     12|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR,
  ------------------
  |  |   57|     12|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     24|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     12|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     12|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  604|     12|                RTPP_LOG(cfsp->glog, RTPP_LOG_ERR,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     12|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  605|     12|                  "STATS: unknown command modifier `%c'", *cp);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     12|  __LINE__, ## args)
  ------------------
  605|     12|                  "STATS: unknown command modifier `%c'", *cp);
  606|     12|                reply_error(cmd, ECODE_PARSE_5);
  ------------------
  |  |   42|     12|#define ECODE_PARSE_5      9
  ------------------
  607|     12|                return 0;
  608|    650|            }
  609|    650|        }
  610|    130|        i = handle_get_stats(cfsp->rtpp_stats, cmd, verbose);
  611|    130|        if (i != 0) {
  ------------------
  |  Branch (611:13): [True: 88, False: 42]
  ------------------
  612|     88|            reply_error(cmd, i);
  613|     88|        }
  614|    130|        return 0;
  615|       |
  616|    235|    default:
  ------------------
  |  Branch (616:5): [True: 235, False: 1.57k]
  ------------------
  617|    235|        break;
  618|  1.81k|    }
  619|       |
  620|  1.19k|    for (int i = 0; i < cmd->subc.n; i++) {
  ------------------
  |  Branch (620:21): [True: 502, False: 692]
  ------------------
  621|    502|        if (rtpp_subcommand_ul_opts_parse(cfsp, &cmd->subc.args[i],
  ------------------
  |  Branch (621:13): [True: 177, False: 325]
  ------------------
  622|    502|          &cmd->after_success[i]) != 0) {
  623|    177|            if (cmd->cca.op == UPDATE || cmd->cca.op == LOOKUP)
  ------------------
  |  Branch (623:17): [True: 1, False: 176]
  |  Branch (623:42): [True: 1, False: 175]
  ------------------
  624|      2|                rtpp_command_ul_opts_free(cmd->cca.opts.ul);
  625|    177|            reply_error(cmd, ECODE_PARSE_SUBC);
  ------------------
  |  |   36|    177|#define ECODE_PARSE_SUBC   3
  ------------------
  626|    177|            return 0;
  627|    177|        }
  628|    325|        RTPP_DBG_ASSERT(cmd->after_success[i].handler != NULL);
  629|    325|    }
  630|       |
  631|       |    /*
  632|       |     * Record and delete need special handling since they apply to all
  633|       |     * streams in the session.
  634|       |     */
  635|    692|    switch (cmd->cca.op) {
  636|     29|    case DELETE:
  ------------------
  |  Branch (636:5): [True: 29, False: 663]
  ------------------
  637|     29|	i = handle_delete(cfsp, &cmd->cca);
  638|     29|	break;
  639|       |
  640|     10|    case RECORD:
  ------------------
  |  Branch (640:5): [True: 10, False: 682]
  ------------------
  641|     10|	i = handle_record(cfsp, &cmd->cca, record_single_file);
  642|     10|	break;
  643|       |
  644|      4|    case NORECORD:
  ------------------
  |  Branch (644:5): [True: 4, False: 688]
  ------------------
  645|      4|	i = handle_norecord(cfsp, &cmd->cca, norecord_all);
  646|      4|	break;
  647|       |
  648|    649|    default:
  ------------------
  |  Branch (648:5): [True: 649, False: 43]
  ------------------
  649|    649|	i = find_stream(cfsp, cmd->cca.call_id, cmd->cca.from_tag,
  650|    649|	  cmd->cca.to_tag, &spa);
  651|    649|	if (i != -1) {
  ------------------
  |  Branch (651:6): [True: 0, False: 649]
  ------------------
  652|      0|	    if (cmd->cca.op != UPDATE)
  ------------------
  |  Branch (652:10): [True: 0, False: 0]
  ------------------
  653|      0|		i = NOT(i);
  ------------------
  |  |   35|      0|#define	NOT(x)		(((x) == 0) ? 1 : 0)
  |  |  ------------------
  |  |  |  Branch (35:18): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  654|      0|	    RTPP_DBG_ASSERT(cmd->sp == NULL);
  655|      0|	    cmd->sp = spa;
  656|      0|	}
  657|    649|	break;
  658|    692|    }
  659|       |
  660|    692|    if (i == -1 && cmd->cca.op != UPDATE) {
  ------------------
  |  Branch (660:9): [True: 692, False: 0]
  |  Branch (660:20): [True: 149, False: 543]
  ------------------
  661|    149|        rtpp_str_t to_tag = cmd->cca.to_tag ? *cmd->cca.to_tag :
  ------------------
  |  Branch (661:29): [True: 149, False: 0]
  ------------------
  662|    149|          (rtpp_str_t){.len = 4, .s = "NONE"};
  663|    149|	RTPP_LOG(cfsp->glog, RTPP_LOG_INFO,
  ------------------
  |  |   57|    149|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|    298|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|    149|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|    149|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  663|    149|	RTPP_LOG(cfsp->glog, RTPP_LOG_INFO,
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   45|    149|#define	RTPP_LOG_INFO	LOG_INFO
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  664|    149|	  "%s request failed: session %.*s, tags %.*s/%.*s not found", cmd->cca.rname,
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|    149|  __LINE__, ## args)
  ------------------
  664|    149|	  "%s request failed: session %.*s, tags %.*s/%.*s not found", cmd->cca.rname,
  665|    149|	  (int)cmd->cca.call_id->len, cmd->cca.call_id->s, (int)cmd->cca.from_tag->len,
  666|    149|          cmd->cca.from_tag->s, (int)to_tag.len, to_tag.s);
  667|    149|	switch (cmd->cca.op) {
  668|     41|	case LOOKUP:
  ------------------
  |  Branch (668:2): [True: 41, False: 108]
  ------------------
  669|     41|	    rtpp_command_ul_opts_free(cmd->cca.opts.ul);
  670|     41|	    ul_reply_port(cmd, NULL);
  671|     41|	    return 0;
  672|       |
  673|      4|	case PLAY:
  ------------------
  |  Branch (673:2): [True: 4, False: 145]
  ------------------
  674|      4|	    rtpp_command_play_opts_free(cmd->cca.opts.play);
  675|      4|	    break;
  676|       |
  677|    104|	default:
  ------------------
  |  Branch (677:2): [True: 104, False: 45]
  ------------------
  678|    104|	    RTPP_DBG_ASSERT(cmd->cca.opts.ptr == NULL);
  679|    104|	    break;
  680|    149|	}
  681|    108|	reply_error(cmd, ECODE_SESUNKN);
  ------------------
  |  |   65|    108|#define ECODE_SESUNKN     50
  ------------------
  682|    108|	return 0;
  683|    149|    }
  684|       |
  685|    543|    switch (cmd->cca.op) {
  686|      0|    case DELETE:
  ------------------
  |  Branch (686:5): [True: 0, False: 543]
  ------------------
  687|      0|    case RECORD:
  ------------------
  |  Branch (687:5): [True: 0, False: 543]
  ------------------
  688|      0|    case NORECORD:
  ------------------
  |  Branch (688:5): [True: 0, False: 543]
  ------------------
  689|      0|	reply_ok(cmd);
  690|      0|	break;
  691|       |
  692|      0|    case NOPLAY:
  ------------------
  |  Branch (692:5): [True: 0, False: 543]
  ------------------
  693|      0|	CALL_SMETHOD(spa->rtp->stream[i], handle_noplay);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  694|      0|	reply_ok(cmd);
  695|      0|	break;
  696|       |
  697|      0|    case PLAY:
  ------------------
  |  Branch (697:5): [True: 0, False: 543]
  ------------------
  698|      0|        rtpp_command_play_handle(spa->rtp->stream[i], cmd);
  699|      0|	break;
  700|       |
  701|      0|    case COPY:
  ------------------
  |  Branch (701:5): [True: 0, False: 543]
  ------------------
  702|      0|	if (handle_copy(cfsp, spa, i, recording_name, record_single_file) != 0) {
  ------------------
  |  Branch (702:6): [True: 0, False: 0]
  ------------------
  703|      0|            reply_error(cmd, ECODE_CPYFAIL);
  ------------------
  |  |   69|      0|#define ECODE_CPYFAIL     65
  ------------------
  704|      0|            return 0;
  705|      0|        }
  706|      0|	reply_ok(cmd);
  707|      0|	break;
  708|       |
  709|      0|    case QUERY:
  ------------------
  |  Branch (709:5): [True: 0, False: 543]
  ------------------
  710|      0|	rval = handle_query(cfsp, cmd, spa->rtp, i);
  711|      0|	if (rval != 0) {
  ------------------
  |  Branch (711:6): [True: 0, False: 0]
  ------------------
  712|      0|	    reply_error(cmd, rval);
  713|      0|	}
  714|      0|	break;
  715|       |
  716|      0|    case LOOKUP:
  ------------------
  |  Branch (716:5): [True: 0, False: 543]
  ------------------
  717|    543|    case UPDATE:
  ------------------
  |  Branch (717:5): [True: 543, False: 0]
  ------------------
  718|    543|	rtpp_command_ul_handle(cfsp, cmd, i);
  719|    543|	rtpp_command_ul_opts_free(cmd->cca.opts.ul);
  720|    543|	break;
  721|       |
  722|      0|    default:
  ------------------
  |  Branch (722:5): [True: 0, False: 543]
  ------------------
  723|       |	/* Programmatic error, should not happen */
  724|      0|	abort();
  725|    543|    }
  726|       |
  727|    543|    return 0;
  728|    543|}
rtpp_command.c:handle_info:
  732|     51|{
  733|       |#if 0
  734|       |    struct rtpp_session *spa, *spb;
  735|       |    char addrs[4][256];
  736|       |    int brief;
  737|       |#endif
  738|     51|    int len, i, load;
  739|     51|    char buf[1024 * 8];
  740|     51|    unsigned long long packets_in, packets_out;
  741|     51|    unsigned long long sessions_created;
  742|     51|    int sessions_active, rtp_streams_active;
  743|     51|    const char *opts;
  744|       |
  745|     51|    opts = &cmd->args.v[0].s[1];
  746|       |#if 0
  747|       |    brief = 0;
  748|       |#endif
  749|     51|    load = 0;
  750|  1.18k|    for (i = 0; opts[i] != '\0'; i++) {
  ------------------
  |  Branch (750:17): [True: 1.14k, False: 38]
  ------------------
  751|  1.14k|        switch (opts[i]) {
  752|    235|        case 'b':
  ------------------
  |  Branch (752:9): [True: 235, False: 909]
  ------------------
  753|    443|        case 'B':
  ------------------
  |  Branch (753:9): [True: 208, False: 936]
  ------------------
  754|       |#if 0
  755|       |            brief = 1;
  756|       |#endif
  757|    443|            break;
  758|       |
  759|    246|        case 'l':
  ------------------
  |  Branch (759:9): [True: 246, False: 898]
  ------------------
  760|    688|        case 'L':
  ------------------
  |  Branch (760:9): [True: 442, False: 702]
  ------------------
  761|    688|            load = 1;
  762|    688|            break;
  763|       |
  764|     13|        default:
  ------------------
  |  Branch (764:9): [True: 13, False: 1.13k]
  ------------------
  765|     13|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  ------------------
  |  |   57|     13|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     26|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     13|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     13|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  765|     13|            RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "command syntax error");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     13|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     13|  __LINE__, ## args)
  ------------------
  766|     13|            reply_error(cmd, ECODE_PARSE_7);
  ------------------
  |  |   51|     13|#define ECODE_PARSE_7     18
  ------------------
  767|     13|            return;
  768|  1.14k|        }
  769|  1.14k|    }
  770|       |
  771|     38|    packets_in = CALL_SMETHOD(cfsp->rtpp_stats, getlvalbyname, "npkts_rcvd");
  ------------------
  |  |  134|     38|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     38|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     38|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     38|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     38|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     38|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     38|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     38|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     38|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     38|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     38|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     38|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     38|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     38|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     38|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     38|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     38|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     38|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     38|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     38|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     38|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     38|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     38|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     38|)
  |  |  ------------------
  ------------------
  772|     38|    packets_out = CALL_SMETHOD(cfsp->rtpp_stats, getlvalbyname, "npkts_relayed") +
  ------------------
  |  |  134|     38|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     38|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     38|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     38|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     38|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     38|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     38|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     38|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     38|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     38|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     38|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     38|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     38|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     38|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     38|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     38|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     38|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     38|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     38|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     38|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     38|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     38|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     38|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     38|)
  |  |  ------------------
  ------------------
  773|     38|      CALL_SMETHOD(cfsp->rtpp_stats, getlvalbyname, "npkts_played");
  ------------------
  |  |  134|     38|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     38|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     38|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     38|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     38|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     38|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     38|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     38|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     38|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     38|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     38|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     38|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     38|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     38|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     38|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     38|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     38|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     38|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     38|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     38|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     38|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     38|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     38|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     38|)
  |  |  ------------------
  ------------------
  774|     38|    sessions_created = CALL_SMETHOD(cfsp->rtpp_stats, getlvalbyname,
  ------------------
  |  |  134|     38|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     38|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     38|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     38|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     38|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     38|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     38|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     38|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     38|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     38|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     38|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     38|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     38|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     38|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     38|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     38|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     38|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     38|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     38|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     38|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     38|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     38|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     38|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     38|)
  |  |  ------------------
  ------------------
  775|     38|      "nsess_created");
  776|     38|    sessions_active = sessions_created - CALL_SMETHOD(cfsp->rtpp_stats,
  ------------------
  |  |  134|     38|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     38|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     38|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     38|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     38|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     38|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     38|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     38|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     38|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     38|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     38|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     38|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     38|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     38|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     38|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     38|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     38|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     38|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     38|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     38|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     38|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     38|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     38|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     38|)
  |  |  ------------------
  ------------------
  777|     38|      getlvalbyname, "nsess_destroyed");
  778|     38|    rtp_streams_active = CALL_SMETHOD(cfsp->rtp_streams_wrt, get_length);
  ------------------
  |  |  134|     38|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     38|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     38|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     38|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     38|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     38|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     38|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     38|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     38|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     38|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     38|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     38|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     38|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     38|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     38|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     38|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     38|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     38|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     38|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     38|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     38|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     38|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     38|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     38|)
  |  |  ------------------
  ------------------
  779|     38|    len = snprintf(buf, sizeof(buf), "sessions created: %llu\nactive sessions: %d\n"
  780|     38|      "active streams: %d\npackets received: %llu\npackets transmitted: %llu\n",
  781|     38|      sessions_created, sessions_active, rtp_streams_active, packets_in, packets_out);
  782|     38|    if (load != 0) {
  ------------------
  |  Branch (782:9): [True: 19, False: 19]
  ------------------
  783|     19|          len += snprintf(buf + len, sizeof(buf) - len, "average load: %f\n",
  784|     19|            CALL_METHOD(cfsp->rtpp_cmd_cf, get_aload));
  ------------------
  |  |   83|     19|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  785|     19|    }
  786|       |#if 0
  787|       |XXX this needs work to fix it after rtp/rtcp split 
  788|       |    for (i = 0; i < cfsp->nsessions && brief == 0; i++) {
  789|       |        spa = cfsp->sessions[i];
  790|       |        if (spa == NULL || spa->stream[0]->sidx != i)
  791|       |            continue;
  792|       |        /* RTCP twin session */
  793|       |        if (spa->rtcp == NULL) {
  794|       |            spb = spa->rtp;
  795|       |            buf[len++] = '\t';
  796|       |        } else {
  797|       |            spb = spa->rtcp;
  798|       |            buf[len++] = '\t';
  799|       |            buf[len++] = 'C';
  800|       |            buf[len++] = ' ';
  801|       |        }
  802|       |
  803|       |        addr2char_r(spb->laddr[1], addrs[0], sizeof(addrs[0]));
  804|       |        if (spb->addr[1] == NULL) {
  805|       |            strcpy(addrs[1], "NONE");
  806|       |        } else {
  807|       |            sprintf(addrs[1], "%s:%d", addr2char(spb->addr[1]),
  808|       |              addr2port(spb->addr[1]));
  809|       |        }
  810|       |        addr2char_r(spb->laddr[0], addrs[2], sizeof(addrs[2]));
  811|       |        if (spb->addr[0] == NULL) {
  812|       |            strcpy(addrs[3], "NONE");
  813|       |        } else {
  814|       |            sprintf(addrs[3], "%s:%d", addr2char(spb->addr[0]),
  815|       |              addr2port(spb->addr[0]));
  816|       |        }
  817|       |
  818|       |        len += snprintf(buf + len, sizeof(buf) - len,
  819|       |          "%s/%s: caller = %s:%d/%s, callee = %s:%d/%s, "
  820|       |          "stats = %lu/%lu/%lu/%lu, ttl = %d/%d\n",
  821|       |          spb->call_id, spb->tag, addrs[0], spb->stream[1]->port, addrs[1],
  822|       |          addrs[2], spb->stream[0]->port, addrs[3], spa->pcount[0], spa->pcount[1],
  823|       |          spa->pcount[2], spa->pcount[3], spb->ttl[0], spb->ttl[1]);
  824|       |        if (len + 512 > sizeof(buf)) {
  825|       |            rtpc_doreply(cmd, buf, len);
  826|       |            len = 0;
  827|       |        }
  828|       |    }
  829|       |#endif
  830|     38|    if (len > 0) {
  ------------------
  |  Branch (830:9): [True: 38, False: 0]
  ------------------
  831|     38|        rtpc_doreply(cmd, buf, len, 0);
  832|     38|    }
  833|     38|}

rtpp_cmd_connection_dtor:
  286|      2|{
  287|       |
  288|      2|    if (rcc->controlfd_in != rcc->csock->controlfd_in) {
  ------------------
  |  Branch (288:9): [True: 0, False: 2]
  ------------------
  289|      0|        close(rcc->controlfd_in);
  290|      0|        if (rcc->controlfd_out != rcc->controlfd_in) {
  ------------------
  |  Branch (290:13): [True: 0, False: 0]
  ------------------
  291|      0|            close(rcc->controlfd_out);
  292|      0|        }
  293|      0|    }
  294|      2|    free(rcc);
  295|      2|}
rtpp_command_async_ctor:
  657|      2|{
  658|      2|    struct rtpp_cmd_async_cf *cmd_cf;
  659|      2|    int need_acptr, i;
  660|       |
  661|      2|    cmd_cf = rtpp_zmalloc(sizeof(*cmd_cf));
  662|      2|    if (cmd_cf == NULL)
  ------------------
  |  Branch (662:9): [True: 0, False: 2]
  ------------------
  663|      0|        goto e0;
  664|       |
  665|      2|    if (socketpair(PF_LOCAL, SOCK_STREAM, 0, cmd_cf->wakefds) != 0)
  ------------------
  |  Branch (665:9): [True: 0, False: 2]
  ------------------
  666|      0|        goto e1;
  667|       |
  668|      2|    if (init_pollset(cfsp, &cmd_cf->pset, cmd_cf->wakefds[1]) == -1) {
  ------------------
  |  Branch (668:9): [True: 0, False: 2]
  ------------------
  669|      0|        goto e2;
  670|      0|    }
  671|      2|    need_acptr = init_accptset(cfsp, &cmd_cf->aset);
  672|      2|    if (need_acptr == -1) {
  ------------------
  |  Branch (672:9): [True: 0, False: 2]
  ------------------
  673|      0|        goto e3;
  674|      0|    }
  675|       |
  676|      2|    init_cstats(cfsp->rtpp_stats, &cmd_cf->cstats);
  677|       |
  678|      2|    if (pthread_mutex_init(&cmd_cf->cmd_mutex, NULL) != 0) {
  ------------------
  |  Branch (678:9): [True: 0, False: 2]
  ------------------
  679|      0|        goto e4;
  680|      0|    }
  681|      2|    assert(cfsp->rtpp_timed_cf != NULL);
  682|      2|    cmd_cf->rcache = rtpp_cmd_rcache_ctor(cfsp->rtpp_timed_cf,
  683|      2|      32.0 + 3.0);
  684|      2|    if (cmd_cf->rcache == NULL) {
  ------------------
  |  Branch (684:9): [True: 0, False: 2]
  ------------------
  685|      0|        goto e5;
  686|      0|    }
  687|       |
  688|       |#if 0
  689|       |    recfilter_init(&cmd_cf->average_load, 0.999, 0.0, 1);
  690|       |#endif
  691|       |
  692|      2|    cmd_cf->cf_save = cfsp;
  693|      2|    if (need_acptr != 0) {
  ------------------
  |  Branch (693:9): [True: 0, False: 2]
  ------------------
  694|      0|        if (pthread_create(&cmd_cf->acpt_thread_id, NULL,
  ------------------
  |  Branch (694:13): [True: 0, False: 0]
  ------------------
  695|      0|          (void *(*)(void *))&rtpp_cmd_acceptor_run, cmd_cf) != 0) {
  696|      0|            goto e6;
  697|      0|        }
  698|      0|        cmd_cf->acceptor_started = 1;
  699|       |#if HAVE_PTHREAD_SETNAME_NP
  700|       |        (void)pthread_setname_np(cmd_cf->acpt_thread_id, "rtpp_cmd_acceptor");
  701|       |#endif
  702|      0|    }
  703|      2|    if (pthread_create(&cmd_cf->thread_id, NULL,
  ------------------
  |  Branch (703:9): [True: 0, False: 2]
  ------------------
  704|      2|      (void *(*)(void *))&rtpp_cmd_queue_run, cmd_cf) != 0) {
  705|      0|        goto e7;
  706|      0|    }
  707|       |#if HAVE_PTHREAD_SETNAME_NP
  708|       |    (void)pthread_setname_np(cmd_cf->thread_id, "rtpp_cmd_queue");
  709|       |#endif
  710|      2|    cmd_cf->pub.dtor = &rtpp_command_async_dtor;
  711|      2|    cmd_cf->pub.wakeup = &rtpp_command_async_wakeup;
  712|      2|    cmd_cf->pub.get_aload = &rtpp_command_async_get_aload;
  713|      2|    cmd_cf->pub.reg_overload = &rtpp_command_async_reg_overload;
  714|      2|    cmd_cf->pub.chk_overload = &rtpp_command_async_chk_overload;
  715|      2|    return (&cmd_cf->pub);
  716|       |
  717|      0|e7:
  718|      0|    if (cmd_cf->acceptor_started != 0) {
  ------------------
  |  Branch (718:9): [True: 0, False: 0]
  ------------------
  719|      0|        pthread_mutex_lock(&cmd_cf->cmd_mutex);
  720|      0|        cmd_cf->tstate_acceptor = TSTATE_CEASE;
  ------------------
  |  |   31|      0|#define TSTATE_CEASE 0x1
  ------------------
  721|      0|        pthread_mutex_unlock(&cmd_cf->cmd_mutex);
  722|      0|        for (i = 0; i < cmd_cf->aset.pfds_used; i ++) {
  ------------------
  |  Branch (722:21): [True: 0, False: 0]
  ------------------
  723|      0|            close(cmd_cf->aset.pfds[i].fd);
  724|      0|        }
  725|      0|        pthread_join(cmd_cf->acpt_thread_id, NULL);
  726|      0|    }
  727|      0|e6:
  728|      0|    CALL_METHOD(cmd_cf->rcache, shutdown);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  729|      0|    RTPP_OBJ_DECREF(cmd_cf->rcache);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  730|      0|e5:
  731|      0|    pthread_mutex_destroy(&cmd_cf->cmd_mutex);
  732|      0|e4:
  733|      0|    free_accptset(&cmd_cf->aset);
  734|      0|e3:
  735|      0|    free_pollset(&cmd_cf->pset);
  736|      0|e2:
  737|      0|    for (int k = 0; k < 2; k++)
  ------------------
  |  Branch (737:21): [True: 0, False: 0]
  ------------------
  738|      0|        close(cmd_cf->wakefds[k]);
  739|      0|e1:
  740|      0|    free(cmd_cf);
  741|      0|e0:
  742|      0|    return (NULL);
  743|      0|}
rtpp_command_async.c:init_pollset:
  543|      2|{
  544|      2|    struct rtpp_ctrl_sock *ctrl_sock;
  545|      2|    int pfds_used, i;
  546|       |
  547|      2|    ctrl_sock = RTPP_LIST_HEAD(cfsp->ctrl_socks);
  ------------------
  |  |   60|      2|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  548|      4|    for (pfds_used = 1; ctrl_sock != NULL; ctrl_sock = RTPP_ITER_NEXT(ctrl_sock)) {
  ------------------
  |  |   63|      2|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (548:25): [True: 2, False: 2]
  ------------------
  549|      2|        if (RTPP_CTRL_ACCEPTABLE(ctrl_sock))
  ------------------
  |  |   51|      2|#define RTPP_CTRL_ACCEPTABLE(rcsp) ((rcsp)->type == RTPC_IFSUN || (rcsp)->type == RTPC_IFSUN_C \
  |  |  ------------------
  |  |  |  Branch (51:37): [True: 0, False: 2]
  |  |  |  Branch (51:67): [True: 0, False: 2]
  |  |  ------------------
  |  |   52|      2|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_SYSD)
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 2]
  |  |  |  Branch (52:35): [True: 0, False: 2]
  |  |  |  Branch (52:64): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  550|      0|            continue;
  551|      2|        pfds_used++;
  552|      2|    }
  553|      2|    psp->pfds = malloc(sizeof(struct pollfd) * pfds_used);
  554|      2|    if (psp->pfds == NULL) {
  ------------------
  |  Branch (554:9): [True: 0, False: 2]
  ------------------
  555|      0|        return (-1);
  556|      0|    }
  557|      2|    if (pthread_mutex_init(&psp->pfds_mutex, NULL) != 0) {
  ------------------
  |  Branch (557:9): [True: 0, False: 2]
  ------------------
  558|      0|        goto e1;
  559|      0|    }
  560|      2|    psp->pfds_used = pfds_used;
  561|      2|    if (psp->pfds_used == 0) {
  ------------------
  |  Branch (561:9): [True: 0, False: 2]
  ------------------
  562|      0|        return (0);
  563|      0|    }
  564|      2|    psp->pfds[0].fd = wakefd;
  565|      2|    psp->pfds[0].events = POLLIN;
  566|      2|    psp->pfds[0].revents = 0;
  567|      2|    psp->rccs[0] = NULL;
  568|      2|    ctrl_sock = RTPP_LIST_HEAD(cfsp->ctrl_socks);
  ------------------
  |  |   60|      2|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  569|      4|    for (i = 1; ctrl_sock != NULL; ctrl_sock = RTPP_ITER_NEXT(ctrl_sock)) {
  ------------------
  |  |   63|      2|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (569:17): [True: 2, False: 2]
  ------------------
  570|      2|        if (RTPP_CTRL_ACCEPTABLE(ctrl_sock))
  ------------------
  |  |   51|      2|#define RTPP_CTRL_ACCEPTABLE(rcsp) ((rcsp)->type == RTPC_IFSUN || (rcsp)->type == RTPC_IFSUN_C \
  |  |  ------------------
  |  |  |  Branch (51:37): [True: 0, False: 2]
  |  |  |  Branch (51:67): [True: 0, False: 2]
  |  |  ------------------
  |  |   52|      2|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_SYSD)
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 2]
  |  |  |  Branch (52:35): [True: 0, False: 2]
  |  |  |  Branch (52:64): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  571|      0|            continue;
  572|      2|        psp->pfds[i].fd = ctrl_sock->controlfd_in;
  573|      2|        psp->pfds[i].events = POLLIN;
  574|      2|        psp->pfds[i].revents = 0;
  575|      2|        psp->rccs[i] = rtpp_cmd_connection_ctor(ctrl_sock->controlfd_in, 
  576|      2|          ctrl_sock->controlfd_out, ctrl_sock, NULL);
  577|      2|        if (psp->rccs[i] == NULL) {
  ------------------
  |  Branch (577:13): [True: 0, False: 2]
  ------------------
  578|      0|            int j;
  579|       |
  580|      0|            for (j = i - 1; j >= 0; j --)
  ------------------
  |  Branch (580:29): [True: 0, False: 0]
  ------------------
  581|      0|                rtpp_cmd_connection_dtor(psp->rccs[j]);
  582|      0|            goto e1;
  583|      0|        }
  584|      2|        i++;
  585|      2|    }
  586|      2|    if (i == 2 && RTPP_CTRL_ISSTREAM(psp->rccs[1]->csock)) {
  ------------------
  |  |   49|      2|#define RTPP_CTRL_ISSTREAM(rcsp) ((rcsp)->type == RTPC_IFSUN_C || (rcsp)->type == RTPC_STDIO \
  |  |  ------------------
  |  |  |  Branch (49:35): [True: 0, False: 2]
  |  |  |  Branch (49:67): [True: 2, False: 0]
  |  |  ------------------
  |  |   50|      2|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_FD)
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 0, False: 0]
  |  |  |  Branch (50:35): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (586:9): [True: 2, False: 0]
  ------------------
  587|      2|        psp->rccs[1]->csock->exit_on_close = 1;
  588|      2|    }
  589|      2|    return (0);
  590|      0|e1:
  591|      0|    free(psp->pfds);
  592|      0|    return (-1);
  593|      2|}
rtpp_command_async.c:rtpp_cmd_connection_ctor:
  267|      2|{
  268|      2|    struct rtpp_cmd_connection *rcc;
  269|       |
  270|      2|    rcc = rtpp_zmalloc(sizeof(struct rtpp_cmd_connection));
  271|      2|    if (rcc == NULL) {
  ------------------
  |  Branch (271:9): [True: 0, False: 2]
  ------------------
  272|      0|        return (NULL);
  273|      0|    }
  274|      2|    rcc->controlfd_in = controlfd_in;
  275|      2|    rcc->controlfd_out = controlfd_out;
  276|      2|    rcc->csock = csock;
  277|      2|    if (rap != NULL && RTPP_CTRL_ISUNIX(csock) == 0) {
  ------------------
  |  |   48|      0|#define RTPP_CTRL_ISUNIX(rcsp) ((rcsp)->type == RTPC_IFSUN || (rcsp)->type == RTPC_IFSUN_C)
  |  |  ------------------
  |  |  |  Branch (48:33): [True: 0, False: 0]
  |  |  |  Branch (48:63): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (277:9): [True: 0, False: 2]
  |  Branch (277:24): [True: 0, False: 0]
  ------------------
  278|      0|        rcc->rlen = SA_LEN(rap);
  ------------------
  |  |   62|      0|   (((sa)->sa_family == AF_INET) ? \
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 0, False: 0]
  |  |  ------------------
  |  |   63|      0|   sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
  ------------------
  279|      0|        memcpy(&rcc->raddr, rap, rcc->rlen);
  280|      0|    }
  281|      2|    return (rcc);
  282|      2|}
rtpp_command_async.c:init_accptset:
  608|      2|{
  609|      2|    int i, pfds_used;
  610|      2|    struct rtpp_ctrl_sock *ctrl_sock;
  611|       |
  612|      2|    pfds_used = 0;
  613|      2|    ctrl_sock = RTPP_LIST_HEAD(cfsp->ctrl_socks);
  ------------------
  |  |   60|      2|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  614|      4|    for (pfds_used = 0; ctrl_sock != NULL; ctrl_sock = RTPP_ITER_NEXT(ctrl_sock)) {
  ------------------
  |  |   63|      2|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (614:25): [True: 2, False: 2]
  ------------------
  615|      2|        if (RTPP_CTRL_ACCEPTABLE(ctrl_sock) == 0)
  ------------------
  |  |   51|      2|#define RTPP_CTRL_ACCEPTABLE(rcsp) ((rcsp)->type == RTPC_IFSUN || (rcsp)->type == RTPC_IFSUN_C \
  |  |  ------------------
  |  |  |  Branch (51:37): [True: 0, False: 2]
  |  |  |  Branch (51:67): [True: 0, False: 2]
  |  |  ------------------
  |  |   52|      2|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_SYSD)
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 2]
  |  |  |  Branch (52:35): [True: 0, False: 2]
  |  |  |  Branch (52:64): [True: 0, False: 2]
  |  |  ------------------
  ------------------
  |  Branch (615:13): [True: 2, False: 0]
  ------------------
  616|      2|            continue;
  617|      0|        pfds_used++;
  618|      0|    }
  619|      2|    if (pfds_used == 0) {
  ------------------
  |  Branch (619:9): [True: 2, False: 0]
  ------------------
  620|      2|        return (0);
  621|      2|    }
  622|       |
  623|      0|    asp->pfds = malloc(sizeof(struct pollfd) * pfds_used);
  624|      0|    if (asp->pfds == NULL) {
  ------------------
  |  Branch (624:9): [True: 0, False: 0]
  ------------------
  625|      0|        return (-1);
  626|      0|    }
  627|      0|    asp->pfds_used = pfds_used;
  628|      0|    asp->csocks = malloc(sizeof(struct rtpp_ctrl_sock) * pfds_used);
  629|      0|    if (asp->csocks == NULL) {
  ------------------
  |  Branch (629:9): [True: 0, False: 0]
  ------------------
  630|      0|        free(asp->pfds);
  631|      0|        return (-1);
  632|      0|    }
  633|      0|    ctrl_sock = RTPP_LIST_HEAD(cfsp->ctrl_socks);
  ------------------
  |  |   60|      0|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  634|      0|    for (i = 0; i < asp->pfds_used; ctrl_sock = RTPP_ITER_NEXT(ctrl_sock)) {
  ------------------
  |  |   63|      0|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (634:17): [True: 0, False: 0]
  ------------------
  635|      0|        if (RTPP_CTRL_ACCEPTABLE(ctrl_sock) == 0)
  ------------------
  |  |   51|      0|#define RTPP_CTRL_ACCEPTABLE(rcsp) ((rcsp)->type == RTPC_IFSUN || (rcsp)->type == RTPC_IFSUN_C \
  |  |  ------------------
  |  |  |  Branch (51:37): [True: 0, False: 0]
  |  |  |  Branch (51:67): [True: 0, False: 0]
  |  |  ------------------
  |  |   52|      0|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_SYSD)
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 0]
  |  |  |  Branch (52:35): [True: 0, False: 0]
  |  |  |  Branch (52:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (635:13): [True: 0, False: 0]
  ------------------
  636|      0|            continue;
  637|      0|        asp->pfds[i].fd = ctrl_sock->controlfd_in;
  638|      0|        asp->pfds[i].events = POLLIN;
  639|      0|        asp->pfds[i].revents = 0;
  640|      0|        asp->csocks[i] = ctrl_sock;
  641|      0|        i++;
  642|      0|    }
  643|      0|    return (pfds_used);
  644|      0|}
rtpp_command_async.c:init_cstats:
  116|      2|{
  117|       |
  118|      2|    csp->ncmds_rcvd.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "ncmds_rcvd");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  119|      2|    csp->ncmds_rcvd_ndups.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "ncmds_rcvd_ndups");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  120|      2|    csp->ncmds_succd.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "ncmds_succd");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  121|      2|    csp->ncmds_errs.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "ncmds_errs");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  122|      2|    csp->ncmds_repld.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "ncmds_repld");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  123|       |
  124|      2|    csp->nsess_complete.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "nsess_complete");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  125|      2|    csp->nsess_created.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "nsess_created");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  126|       |
  127|      2|    csp->nplrs_created.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "nplrs_created");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  128|      2|    csp->nplrs_destroyed.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "nplrs_destroyed");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  129|      2|}
rtpp_command_async.c:rtpp_cmd_queue_run:
  383|      2|{
  384|      2|    struct rtpp_cmd_async_cf *cmd_cf;
  385|      2|    struct rtpp_cmd_pollset *psp;
  386|      2|    int i, nready, rval;
  387|      2|    struct rtpp_timestamp sptime;
  388|      2|    struct rtpp_command_stats *csp;
  389|      2|    struct rtpp_stats *rtpp_stats_cf;
  390|       |
  391|      2|    cmd_cf = (struct rtpp_cmd_async_cf *)arg;
  392|      2|    rtpp_stats_cf = cmd_cf->cf_save->rtpp_stats;
  393|      2|    csp = &cmd_cf->cstats;
  394|       |
  395|      2|    psp = &cmd_cf->pset;
  396|       |
  397|      4|    for (;;) {
  398|      4|        pthread_mutex_lock(&cmd_cf->cmd_mutex);
  399|      4|        if (cmd_cf->tstate_queue != TSTATE_RUN) {
  ------------------
  |  |   30|      4|#define TSTATE_RUN   0x0
  ------------------
  |  Branch (399:13): [True: 0, False: 4]
  ------------------
  400|      0|            pthread_mutex_unlock(&cmd_cf->cmd_mutex);
  401|      0|            break;
  402|      0|        }
  403|      4|        pthread_mutex_unlock(&cmd_cf->cmd_mutex);
  404|      4|        pthread_mutex_lock(&psp->pfds_mutex);
  405|      4|        nready = poll(psp->pfds, psp->pfds_used, INFTIM);
  ------------------
  |  |   70|      4|#define	INFTIM		(-1)
  ------------------
  406|      4|        if (nready == 0) {
  ------------------
  |  Branch (406:13): [True: 0, False: 4]
  ------------------
  407|      0|            pthread_mutex_unlock(&psp->pfds_mutex);
  408|      0|            continue;
  409|      0|        }
  410|      4|        if (nready < 0 && errno == EINTR) {
  ------------------
  |  Branch (410:13): [True: 0, False: 4]
  |  Branch (410:27): [True: 0, False: 0]
  ------------------
  411|      0|            pthread_mutex_unlock(&psp->pfds_mutex);
  412|      0|            continue;
  413|      0|        }
  414|      4|        if (nready > 0) {
  ------------------
  |  Branch (414:13): [True: 2, False: 2]
  ------------------
  415|      6|            for (i = 0; i < psp->pfds_used; i++) {
  ------------------
  |  Branch (415:25): [True: 4, False: 2]
  ------------------
  416|      4|                if (i == 0) {
  ------------------
  |  Branch (416:21): [True: 2, False: 2]
  ------------------
  417|      2|                    unsigned int dummy;
  418|      2|                    if (psp->pfds[i].revents & POLLIN) {
  ------------------
  |  Branch (418:25): [True: 0, False: 2]
  ------------------
  419|      0|                        read(psp->pfds[i].fd, &dummy, sizeof(dummy));
  420|      0|                    }
  421|      2|                    continue;
  422|      2|                }
  423|      2|again:
  424|      2|                if ((psp->pfds[i].revents & (POLLERR | POLLHUP)) != 0) {
  ------------------
  |  Branch (424:21): [True: 0, False: 2]
  ------------------
  425|      0|                    if (RTPP_CTRL_ACCEPTABLE(psp->rccs[i]->csock)) {
  ------------------
  |  |   51|      0|#define RTPP_CTRL_ACCEPTABLE(rcsp) ((rcsp)->type == RTPC_IFSUN || (rcsp)->type == RTPC_IFSUN_C \
  |  |  ------------------
  |  |  |  Branch (51:37): [True: 0, False: 0]
  |  |  |  Branch (51:67): [True: 0, False: 0]
  |  |  ------------------
  |  |   52|      0|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_SYSD)
  |  |  ------------------
  |  |  |  Branch (52:6): [True: 0, False: 0]
  |  |  |  Branch (52:35): [True: 0, False: 0]
  |  |  |  Branch (52:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  426|      0|                        goto closefd;
  427|      0|                    }
  428|      0|                    if (psp->rccs[i]->csock->type == RTPC_STDIO && (psp->pfds[i].revents & POLLIN) == 0) {
  ------------------
  |  Branch (428:25): [True: 0, False: 0]
  |  Branch (428:68): [True: 0, False: 0]
  ------------------
  429|      0|                        goto closefd;
  430|      0|                    }
  431|      0|                }
  432|      2|                if ((psp->pfds[i].revents & POLLIN) == 0) {
  ------------------
  |  Branch (432:21): [True: 0, False: 2]
  ------------------
  433|      0|                    continue;
  434|      0|                }
  435|      2|                rtpp_timestamp_get(&sptime);
  436|      2|                if (RTPP_CTRL_ISSTREAM(psp->rccs[i]->csock)) {
  ------------------
  |  |   49|      2|#define RTPP_CTRL_ISSTREAM(rcsp) ((rcsp)->type == RTPC_IFSUN_C || (rcsp)->type == RTPC_STDIO \
  |  |  ------------------
  |  |  |  Branch (49:35): [True: 0, False: 2]
  |  |  |  Branch (49:67): [True: 2, False: 0]
  |  |  ------------------
  |  |   50|      2|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_FD)
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 0, False: 0]
  |  |  |  Branch (50:35): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  437|      2|                    rval = process_commands_stream(CONST(cmd_cf->cf_save), psp->rccs[i], &sptime, csp, rtpp_stats_cf);
  ------------------
  |  |  149|      2|#define CONST(p) ((const typeof(*p) *)(p))
  ------------------
  438|      2|                } else {
  439|      0|                    rval = process_commands(psp->rccs[i]->csock, CONST(cmd_cf->cf_save), psp->pfds[i].fd,
  ------------------
  |  |  149|      0|#define CONST(p) ((const typeof(*p) *)(p))
  ------------------
  440|      0|                      &sptime, csp, rtpp_stats_cf, cmd_cf->rcache);
  441|      0|                }
  442|       |                /*
  443|       |                 * Shut down non-datagram sockets that got I/O error
  444|       |                 * and also all non-continuous UNIX sockets are recycled
  445|       |                 * after each use.
  446|       |                 */
  447|      2|                if (!RTPP_CTRL_ISDG(psp->rccs[i]->csock) && (rval == -1 || !RTPP_CTRL_ISSTREAM(psp->rccs[i]->csock))) {
  ------------------
  |  |   47|      4|#define RTPP_CTRL_ISDG(rcsp) ((rcsp)->type == RTPC_UDP4 || (rcsp)->type == RTPC_UDP6)
  |  |  ------------------
  |  |  |  Branch (47:31): [True: 0, False: 2]
  |  |  |  Branch (47:60): [True: 0, False: 2]
  |  |  ------------------
  ------------------
                              if (!RTPP_CTRL_ISDG(psp->rccs[i]->csock) && (rval == -1 || !RTPP_CTRL_ISSTREAM(psp->rccs[i]->csock))) {
  ------------------
  |  |   49|      0|#define RTPP_CTRL_ISSTREAM(rcsp) ((rcsp)->type == RTPC_IFSUN_C || (rcsp)->type == RTPC_STDIO \
  |  |  ------------------
  |  |  |  Branch (49:35): [True: 0, False: 0]
  |  |  |  Branch (49:67): [True: 0, False: 0]
  |  |  ------------------
  |  |   50|      0|  || (rcsp)->type == RTPC_TCP4 || (rcsp)->type == RTPC_TCP6 || (rcsp)->type == RTPC_FD)
  |  |  ------------------
  |  |  |  Branch (50:6): [True: 0, False: 0]
  |  |  |  Branch (50:35): [True: 0, False: 0]
  |  |  |  Branch (50:64): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  |  Branch (447:62): [True: 2, False: 0]
  ------------------
  448|      2|closefd:
  449|      2|                    if (psp->rccs[i]->csock->type == RTPC_STDIO && psp->rccs[i]->csock->exit_on_close != 0) {
  ------------------
  |  Branch (449:25): [True: 2, False: 0]
  |  Branch (449:68): [True: 2, False: 0]
  ------------------
  450|      2|                        cmd_cf->cf_save->slowshutdown = 1;
  451|      2|                    }
  452|      2|                    rtpp_cmd_connection_dtor(psp->rccs[i]);
  453|      2|                    psp->pfds_used--;
  454|      2|                    if (psp->pfds_used > 0 && i < psp->pfds_used) {
  ------------------
  |  Branch (454:25): [True: 2, False: 0]
  |  Branch (454:47): [True: 0, False: 2]
  ------------------
  455|      0|                        memmove(&psp->pfds[i], &psp->pfds[i + 1],
  456|      0|                          (psp->pfds_used - i) * sizeof(struct pollfd));
  457|      0|                        memmove(&psp->rccs[i], &psp->rccs[i + 1],
  458|      0|                          (psp->pfds_used - i) * sizeof(struct rtpp_ctrl_connection *));
  459|      0|                        goto again;
  460|      0|                    }
  461|      2|                }
  462|      2|            }
  463|      2|        }
  464|      4|        pthread_mutex_unlock(&psp->pfds_mutex);
  465|      4|        if (nready > 0) {
  ------------------
  |  Branch (465:13): [True: 2, False: 2]
  ------------------
  466|      2|            rtpp_anetio_pump(cmd_cf->cf_save->rtpp_proc_cf->netio);
  467|      2|        }
  468|      4|        flush_cstats(rtpp_stats_cf, csp);
  469|      4|    }
  470|      2|}
rtpp_command_async.c:process_commands_stream:
  225|      2|{
  226|      2|    int rval;
  227|      2|    struct rtpp_command *cmd;
  228|       |
  229|      2|    rval = rtpp_command_stream_doio(cfsp, rcc);
  230|      2|    if (rval <= 0) {
  ------------------
  |  Branch (230:9): [True: 2, False: 0]
  ------------------
  231|      2|        return (-1);
  232|      2|    }
  233|      0|    do {
  234|      0|again:
  235|      0|        cmd = rtpp_command_stream_get(cfsp, rcc, &rval, dtime, csp);
  236|      0|        if (cmd == NULL) {
  ------------------
  |  Branch (236:13): [True: 0, False: 0]
  ------------------
  237|      0|            switch (rval) {
  238|      0|            case GET_CMD_EAGAIN:
  ------------------
  |  |   45|      0|#define GET_CMD_EAGAIN (-4)
  ------------------
  |  Branch (238:13): [True: 0, False: 0]
  ------------------
  239|      0|                return (0);
  240|      0|            case GET_CMD_OK:
  ------------------
  |  |   41|      0|#define GET_CMD_OK     (0)
  ------------------
  |  Branch (240:13): [True: 0, False: 0]
  ------------------
  241|      0|            case GET_CMD_INVAL:
  ------------------
  |  |   46|      0|#define GET_CMD_INVAL (-5)
  ------------------
  |  Branch (241:13): [True: 0, False: 0]
  ------------------
  242|      0|            case GET_CMD_ENOMEM:
  ------------------
  |  |   44|      0|#define GET_CMD_ENOMEM (-3)
  ------------------
  |  Branch (242:13): [True: 0, False: 0]
  ------------------
  243|      0|                goto again;
  244|      0|            default:
  ------------------
  |  Branch (244:13): [True: 0, False: 0]
  ------------------
  245|      0|                return (-1);
  246|      0|            }
  247|      0|        }
  248|      0|        cmd->laddr = sstosa(&rcc->csock->bindaddr);
  ------------------
  |  |   82|      0|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  249|      0|        if (cmd->cca.op == GET_STATS || cmd->cca.op == INFO) {
  ------------------
  |  Branch (249:13): [True: 0, False: 0]
  |  Branch (249:41): [True: 0, False: 0]
  ------------------
  250|      0|            flush_cstats(rsc, csp);
  251|      0|        }
  252|      0|        if (cmd->no_glock == 0) {
  ------------------
  |  Branch (252:13): [True: 0, False: 0]
  ------------------
  253|      0|            pthread_mutex_lock(&(cfsp->locks->glob));
  254|      0|        }
  255|      0|        rval = handle_command(cfsp, cmd);
  256|      0|        if (cmd->no_glock == 0) {
  ------------------
  |  Branch (256:13): [True: 0, False: 0]
  ------------------
  257|      0|            pthread_mutex_unlock(&(cfsp->locks->glob));
  258|      0|        }
  259|      0|        free_command(cmd);
  260|      0|    } while (rval == 0);
  ------------------
  |  Branch (260:14): [True: 0, False: 0]
  ------------------
  261|      0|    return (rval);
  262|      0|}
rtpp_command_async.c:flush_cstats:
  140|      2|{
  141|       |
  142|      2|    FLUSH_CSTAT(sobj, csp->ncmds_rcvd);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  143|      2|    FLUSH_CSTAT(sobj, csp->ncmds_rcvd_ndups);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  144|      2|    FLUSH_CSTAT(sobj, csp->ncmds_succd);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  145|      2|    FLUSH_CSTAT(sobj, csp->ncmds_errs);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  146|      2|    FLUSH_CSTAT(sobj, csp->ncmds_repld);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  147|       |
  148|      2|    FLUSH_CSTAT(sobj, csp->nsess_complete);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  149|      2|    FLUSH_CSTAT(sobj, csp->nsess_created);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  150|       |
  151|      2|    FLUSH_CSTAT(sobj, csp->nplrs_created);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  152|      2|    FLUSH_CSTAT(sobj, csp->nplrs_destroyed);
  ------------------
  |  |  131|      2|#define FLUSH_CSTAT(sobj, st)    { \
  |  |  132|      2|    if ((st).cnt > 0) { \
  |  |  ------------------
  |  |  |  Branch (132:9): [True: 0, False: 2]
  |  |  ------------------
  |  |  133|      0|        CALL_SMETHOD(sobj, updatebyidx, (st).cnt_idx, (st).cnt); \
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  134|      0|        (st).cnt = 0; \
  |  |  135|      0|    } \
  |  |  136|      2|}
  ------------------
  153|      2|}
rtpp_command_async.c:rtpp_command_async_get_aload:
  474|     19|{
  475|       |#if 0
  476|       |    double aload;
  477|       |    struct rtpp_cmd_async_cf *cmd_cf;
  478|       |
  479|       |    PUB2PVT(pub, cmd_cf);
  480|       |
  481|       |    pthread_mutex_lock(&cmd_cf->cmd_mutex);
  482|       |    aload = cmd_cf->average_load.lastval;
  483|       |    pthread_mutex_unlock(&cmd_cf->cmd_mutex);
  484|       |
  485|       |    return (aload);
  486|       |#else
  487|     19|    return (0);
  488|     19|#endif
  489|     19|}

rtpp_command_pre_parse:
  253|  1.92k|{
  254|  1.92k|    struct cmd_props cprops = {};
  255|       |
  256|  1.92k|    if (fill_cmd_props(cfsp, cmd, &cprops) != 0) {
  ------------------
  |  Branch (256:9): [True: 44, False: 1.87k]
  ------------------
  257|     44|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "unknown command \"%c\"",
  ------------------
  |  |   57|     44|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     88|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     44|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     44|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  257|     44|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "unknown command \"%c\"",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     44|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  258|     44|          cmd->args.v[0].s[0]);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     44|  __LINE__, ## args)
  ------------------
  258|     44|          cmd->args.v[0].s[0]);
  259|     44|        reply_error(cmd, ECODE_CMDUNKN);
  ------------------
  |  |   32|     44|#define ECODE_CMDUNKN      0
  ------------------
  260|     44|        return (-1);
  261|     44|    }
  262|  1.87k|    if (cmd->args.c < cprops.min_argc || cmd->args.c > cprops.max_argc) {
  ------------------
  |  Branch (262:9): [True: 30, False: 1.84k]
  |  Branch (262:42): [True: 8, False: 1.84k]
  ------------------
  263|     38|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "%s command syntax error"
  ------------------
  |  |   57|     38|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     76|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     38|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     38|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  263|     38|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "%s command syntax error"
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     38|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  264|     38|          ": invalid number of arguments (%d)", cmd->cca.rname, cmd->args.c);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     38|  __LINE__, ## args)
  ------------------
  264|     38|          ": invalid number of arguments (%d)", cmd->cca.rname, cmd->args.c);
  265|     38|        reply_error(cmd, ECODE_PARSE_NARGS);
  ------------------
  |  |   34|     38|#define ECODE_PARSE_NARGS  1
  ------------------
  266|     38|        return (-1);
  267|     38|    }
  268|  1.84k|    if (cprops.has_cmods == 0 && cprops.cmods[0] != '\0') {
  ------------------
  |  Branch (268:9): [True: 118, False: 1.72k]
  |  Branch (268:34): [True: 20, False: 98]
  ------------------
  269|     20|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "%s command syntax error"
  ------------------
  |  |   57|     20|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     40|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|     20|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|     20|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  269|     20|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "%s command syntax error"
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|     20|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  270|     20|          ": modifiers are not supported by the command", cmd->cca.rname);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|     20|  __LINE__, ## args)
  ------------------
  270|     20|          ": modifiers are not supported by the command", cmd->cca.rname);
  271|     20|        reply_error(cmd, ECODE_PARSE_MODS);
  ------------------
  |  |   35|     20|#define ECODE_PARSE_MODS   2
  ------------------
  272|     20|        return (-1);
  273|     20|    }
  274|  1.82k|    if (cprops.has_subc == 0 && cmd->subc.n > 0) {
  ------------------
  |  Branch (274:9): [True: 425, False: 1.39k]
  |  Branch (274:33): [True: 7, False: 418]
  ------------------
  275|      7|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "%s command syntax error"
  ------------------
  |  |   57|      7|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|     14|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      7|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      7|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  275|      7|        RTPP_LOG(cfsp->glog, RTPP_LOG_ERR, "%s command syntax error"
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      7|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  276|      7|          ": subcommand is not supported", cmd->cca.rname);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      7|  __LINE__, ## args)
  ------------------
  276|      7|          ": subcommand is not supported", cmd->cca.rname);
  277|      7|        reply_error(cmd, ECODE_PARSE_SUBC);
  ------------------
  |  |   36|      7|#define ECODE_PARSE_SUBC   3
  ------------------
  278|      7|        return (-1);
  279|      7|    }
  280|  1.81k|    if (cprops.has_call_id) {
  ------------------
  |  Branch (280:9): [True: 1.52k, False: 284]
  ------------------
  281|  1.52k|        cmd->cca.call_id = rtpp_str_fix(&cmd->args.v[1]);
  ------------------
  |  |   57|  1.52k|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  282|  1.52k|    }
  283|  1.81k|    if (cprops.fpos > 0) {
  ------------------
  |  Branch (283:9): [True: 1.52k, False: 284]
  ------------------
  284|  1.52k|        cmd->cca.from_tag = rtpp_str_fix(&cmd->args.v[cprops.fpos]);
  ------------------
  |  |   57|  1.52k|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  285|  1.52k|    }
  286|  1.81k|    if (cprops.tpos > 0) {
  ------------------
  |  Branch (286:9): [True: 1.52k, False: 284]
  ------------------
  287|  1.52k|        cmd->cca.to_tag = rtpp_str_fix(&cmd->args.v[cprops.tpos]);
  ------------------
  |  |   57|  1.52k|#define rtpp_str_fix(src) ((const rtpp_str_t *)(src))
  ------------------
  288|  1.52k|    }
  289|  1.81k|    return (0);
  290|  1.82k|}
rtpp_command_parse.c:fill_cmd_props:
   64|  1.92k|{
   65|       |
   66|  1.92k|    cpp->has_call_id = 1;
   67|  1.92k|    cpp->has_subc = 0;
   68|  1.92k|    cpp->fpos = -1;
   69|  1.92k|    cpp->tpos = -1;
   70|  1.92k|    cpp->cmods = &(cmd->args.v[0].s[1]);
   71|  1.92k|    switch (cmd->args.v[0].s[0]) {
   72|    146|    case 'u':
  ------------------
  |  Branch (72:5): [True: 146, False: 1.77k]
  ------------------
   73|  1.08k|    case 'U':
  ------------------
  |  Branch (73:5): [True: 939, False: 983]
  ------------------
   74|  1.08k|        cmd->cca.op = UPDATE;
   75|  1.08k|        cmd->cca.rname = "update/create";
   76|  1.08k|        cmd->cca.hint = "U[opts] callid remote_ip remote_port from_tag [to_tag] [notify_socket notify_tag]";
   77|  1.08k|        cpp->max_argc = 8;
   78|  1.08k|        cpp->min_argc = 5;
   79|  1.08k|        cpp->has_cmods = 1;
   80|  1.08k|        cpp->fpos = 4;
   81|  1.08k|        cpp->tpos = 5;
   82|  1.08k|        cpp->has_subc = 1;
   83|  1.08k|        break;
   84|       |
   85|      3|    case 'l':
  ------------------
  |  Branch (85:5): [True: 3, False: 1.91k]
  ------------------
   86|     96|    case 'L':
  ------------------
  |  Branch (86:5): [True: 93, False: 1.82k]
  ------------------
   87|     96|        cmd->cca.op = LOOKUP;
   88|     96|        cmd->cca.rname = "lookup";
   89|     96|        cmd->cca.hint = "L[opts] callid remote_ip remote_port from_tag [to_tag]";
   90|     96|        cpp->max_argc = 6;
   91|     96|        cpp->min_argc = 5;
   92|     96|        cpp->has_cmods = 1;
   93|     96|        cpp->fpos = 4;
   94|     96|        cpp->tpos = 5;
   95|     96|        cpp->has_subc = 1;
   96|     96|        break;
   97|       |
   98|     13|    case 'd':
  ------------------
  |  Branch (98:5): [True: 13, False: 1.90k]
  ------------------
   99|     41|    case 'D':
  ------------------
  |  Branch (99:5): [True: 28, False: 1.89k]
  ------------------
  100|     41|        cmd->cca.op = DELETE;
  101|     41|        cmd->cca.rname = "delete";
  102|     41|        cmd->cca.hint = "D[w] callid from_tag [to_tag]";
  103|     41|        cpp->max_argc = 4;
  104|     41|        cpp->min_argc = 3;
  105|     41|        cpp->has_cmods = 1;
  106|     41|        cpp->fpos = 2;
  107|     41|        cpp->tpos = 3;
  108|     41|        break;
  109|       |
  110|      5|    case 'p':
  ------------------
  |  Branch (110:5): [True: 5, False: 1.91k]
  ------------------
  111|     18|    case 'P':
  ------------------
  |  Branch (111:5): [True: 13, False: 1.90k]
  ------------------
  112|     18|        cmd->cca.op = PLAY;
  113|     18|        cmd->cca.rname = "play";
  114|     18|        cmd->cca.hint = "P[n] callid pname codecs from_tag [to_tag]";
  115|     18|        cpp->max_argc = 6;
  116|     18|        cpp->min_argc = 5;
  117|     18|        cpp->has_cmods = 1;
  118|     18|        cpp->fpos = 4;
  119|     18|        cpp->tpos = 5;
  120|     18|        break;
  121|       |
  122|     20|    case 'r':
  ------------------
  |  Branch (122:5): [True: 20, False: 1.90k]
  ------------------
  123|     43|    case 'R':
  ------------------
  |  Branch (123:5): [True: 23, False: 1.89k]
  ------------------
  124|     43|        cmd->cca.op = RECORD;
  125|     43|        cmd->cca.rname = "record";
  126|     43|        if (cfsp->record_pcap != 0) {
  ------------------
  |  Branch (126:13): [True: 0, False: 43]
  ------------------
  127|      0|            cmd->cca.hint = "R[s] call_id from_tag [to_tag]";
  128|     43|        } else {
  129|     43|            cmd->cca.hint = "R call_id from_tag [to_tag]";
  130|     43|        }
  131|     43|        cpp->max_argc = 4;
  132|     43|        cpp->min_argc = 3;
  133|     43|        cpp->has_cmods = 1;
  134|     43|        cpp->fpos = 2;
  135|     43|        cpp->tpos = 3;
  136|     43|        break;
  137|       |
  138|      1|    case 'c':
  ------------------
  |  Branch (138:5): [True: 1, False: 1.92k]
  ------------------
  139|      4|    case 'C':
  ------------------
  |  Branch (139:5): [True: 3, False: 1.91k]
  ------------------
  140|      4|        cmd->cca.op = COPY;
  141|      4|        cmd->cca.rname = "copy";
  142|      4|        cmd->cca.hint = "C[-xxx-] call_id -XXX- from_tag [to_tag]";
  143|      4|        cpp->max_argc = 5;
  144|      4|        cpp->min_argc = 4;
  145|      4|        cpp->has_cmods = 1;
  146|      4|        cpp->fpos = 3;
  147|      4|        cpp->tpos = 4;
  148|      4|        break;
  149|       |
  150|      3|    case 's':
  ------------------
  |  Branch (150:5): [True: 3, False: 1.91k]
  ------------------
  151|      9|    case 'S':
  ------------------
  |  Branch (151:5): [True: 6, False: 1.91k]
  ------------------
  152|      9|        cmd->cca.op = NOPLAY;
  153|      9|        cmd->cca.rname = "noplay";
  154|      9|        cmd->cca.hint = "S call_id from_tag [to_tag]";
  155|      9|        cpp->max_argc = 4;
  156|      9|        cpp->min_argc = 3;
  157|      9|        cpp->has_cmods = 0;
  158|      9|        cpp->fpos = 2;
  159|      9|        cpp->tpos = 3;
  160|      9|        break;
  161|       |
  162|     19|    case 'n':
  ------------------
  |  Branch (162:5): [True: 19, False: 1.90k]
  ------------------
  163|     34|    case 'N':
  ------------------
  |  Branch (163:5): [True: 15, False: 1.90k]
  ------------------
  164|     34|        cmd->cca.op = NORECORD;
  165|     34|        cmd->cca.rname = "norecord";
  166|     34|        cmd->cca.hint = "N[a] call_id from_tag [to_tag]";
  167|     34|        cpp->max_argc = 4;
  168|     34|        cpp->min_argc = 3;
  169|     34|        cpp->has_cmods = 1;
  170|     34|        cpp->fpos = 2;
  171|     34|        cpp->tpos = 3;
  172|     34|        break;
  173|       |
  174|     34|    case 'v':
  ------------------
  |  Branch (174:5): [True: 34, False: 1.88k]
  ------------------
  175|    115|    case 'V':
  ------------------
  |  Branch (175:5): [True: 81, False: 1.84k]
  ------------------
  176|    115|        if (cpp->cmods[0] == 'F' || cpp->cmods[0] == 'f') {
  ------------------
  |  Branch (176:13): [True: 45, False: 70]
  |  Branch (176:37): [True: 44, False: 26]
  ------------------
  177|     89|            cpp->cmods += 1;
  178|     89|            cmd->cca.op = VER_FEATURE;
  179|     89|            cmd->cca.rname = "feature_check";
  180|     89|            cmd->cca.hint = "VF feature_num";
  181|     89|            cmd->no_glock = 1;
  182|     89|            cpp->max_argc = 2;
  183|     89|            cpp->min_argc = 2;
  184|     89|            cpp->has_cmods = 0;
  185|     89|            cpp->has_call_id = 0;
  186|     89|            break;
  187|     89|        }
  188|     26|        cmd->cca.op = GET_VER;
  189|     26|        cmd->cca.rname = "get_version";
  190|     26|        cmd->cca.hint = "V";
  191|     26|        cmd->no_glock = 1;
  192|     26|        cpp->max_argc = 1;
  193|     26|        cpp->min_argc = 1;
  194|     26|        cpp->has_cmods = 0;
  195|     26|        cpp->has_call_id = 0;
  196|     26|        break;
  197|       |
  198|     24|    case 'i':
  ------------------
  |  Branch (198:5): [True: 24, False: 1.89k]
  ------------------
  199|     51|    case 'I':
  ------------------
  |  Branch (199:5): [True: 27, False: 1.89k]
  ------------------
  200|     51|        cmd->cca.op = INFO;
  201|     51|        cmd->cca.rname = "get_info";
  202|     51|        cmd->cca.hint = "I[b]";
  203|     51|        cpp->max_argc = 1;
  204|     51|        cpp->min_argc = 1;
  205|     51|        cpp->has_cmods = 1;
  206|     51|        cpp->has_call_id = 0;
  207|     51|        break;
  208|       |
  209|    201|    case 'q':
  ------------------
  |  Branch (209:5): [True: 201, False: 1.72k]
  ------------------
  210|    230|    case 'Q':
  ------------------
  |  Branch (210:5): [True: 29, False: 1.89k]
  ------------------
  211|    230|        cmd->cca.op = QUERY;
  212|    230|        cmd->cca.rname = "query";
  213|    230|        cmd->cca.hint = "Q[v] call_id from_tag [to_tag [stat_name1 ...[stat_nameN]]]";
  214|    230|        cpp->max_argc = 4 + RTPP_QUERY_NSTATS;
  ------------------
  |  |   28|    230|#define RTPP_QUERY_NSTATS    11
  ------------------
  215|    230|        cpp->min_argc = 3;
  216|    230|        cpp->has_cmods = 1;
  217|    230|        cpp->fpos = 2;
  218|    230|        cpp->tpos = 3;
  219|    230|        cpp->has_subc = 1;
  220|    230|        break;
  221|       |
  222|      2|    case 'x':
  ------------------
  |  Branch (222:5): [True: 2, False: 1.92k]
  ------------------
  223|      4|    case 'X':
  ------------------
  |  Branch (223:5): [True: 2, False: 1.92k]
  ------------------
  224|      4|        cmd->cca.op = DELETE_ALL;
  225|      4|        cmd->cca.rname = "delete_all";
  226|      4|        cmd->cca.hint = "X";
  227|      4|        cpp->max_argc = 1;
  228|      4|        cpp->min_argc = 1;
  229|      4|        cpp->has_cmods = 0;
  230|      4|        cpp->has_call_id = 0;
  231|      4|        break;
  232|       |
  233|     54|    case 'g':
  ------------------
  |  Branch (233:5): [True: 54, False: 1.86k]
  ------------------
  234|    148|    case 'G':
  ------------------
  |  Branch (234:5): [True: 94, False: 1.82k]
  ------------------
  235|    148|        cmd->cca.op = GET_STATS;
  236|    148|        cmd->cca.rname = "get_stats";
  237|    148|        cmd->cca.hint = "G[v] [stat_name1 [stat_name2 [stat_name3 ...[stat_nameN]]]]";
  238|    148|        cmd->no_glock = 1;
  239|    148|        cpp->max_argc = CALL_SMETHOD(cfsp->rtpp_stats, getnstats) + 1;
  ------------------
  |  |  134|    148|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|    148|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|    148|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|    148|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|    148|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|    148|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|    148|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|    148|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|    148|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|    148|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|    148|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|    148|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|    148|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|    148|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|    148|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|    148|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|    148|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|    148|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|    148|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|    148|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|    148|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|    148|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|    148|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|    148|)
  |  |  ------------------
  ------------------
  240|    148|        cpp->min_argc = 1;
  241|    148|        cpp->has_cmods = 1;
  242|    148|        cpp->has_call_id = 0;
  243|    148|        break;
  244|       |
  245|     44|    default:
  ------------------
  |  Branch (245:5): [True: 44, False: 1.87k]
  ------------------
  246|     44|        return (-1);
  247|  1.92k|    }
  248|  1.87k|    return (0);
  249|  1.92k|}

rtpp_cmd_rcache_ctor:
   74|      2|{
   75|      2|    struct rtpp_cmd_rcache_pvt *pvt;
   76|       |
   77|      2|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_cmd_rcache_pvt), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   78|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (78:9): [True: 0, False: 2]
  ------------------
   79|      0|        return (NULL);
   80|      0|    }
   81|      2|#if !defined(RTPP_DEBUG)
   82|      2|    pvt->ht = rtpp_hash_table_ctor(rtpp_ht_key_str_t, RTPP_HT_NODUPS);
  ------------------
  |  |   70|      2|#define RTPP_HT_NODUPS    0x1
  ------------------
   83|       |#else
   84|       |    pvt->ht = rtpp_hash_table_ctor(rtpp_ht_key_str_t, RTPP_HT_NODUPS |
   85|       |      RTPP_HT_DUP_ABRT);
   86|       |#endif
   87|      2|    if (pvt->ht == NULL) {
  ------------------
  |  Branch (87:9): [True: 0, False: 2]
  ------------------
   88|      0|        goto e0;
   89|      0|    }
   90|      2|    pvt->timeout = CALL_SMETHOD(rtpp_timed_cf, schedule_rc, RTPP_RCACHE_CPERD,
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  |  |               #define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |   90|      2|    pvt->timeout = CALL_SMETHOD(rtpp_timed_cf, schedule_rc, RTPP_RCACHE_CPERD,
  |  |  |  |  ------------------
  |  |  |  |  |  |   46|      2|#define	RTPP_RCACHE_CPERD	3.0
  |  |  |  |  ------------------
  |  |  |  |   91|      4|      pvt->pub.rcnt, rtpp_cmd_rcache_cleanup, NULL, pvt);
  |  |  ------------------
  ------------------
   91|      2|      pvt->pub.rcnt, rtpp_cmd_rcache_cleanup, NULL, pvt);
   92|      2|    if (pvt->timeout == NULL) {
  ------------------
  |  Branch (92:9): [True: 0, False: 2]
  ------------------
   93|      0|        goto e2;
   94|      0|    }
   95|      2|    pvt->min_ttl = min_ttl;
   96|      2|    pvt->timeout_rval = CB_MORE;
   97|      2|    pvt->pub.insert = &rtpp_cmd_rcache_insert;
   98|      2|    pvt->pub.lookup = &rtpp_cmd_rcache_lookup;
   99|      2|    pvt->pub.shutdown = &rtpp_cmd_rcache_shutdown;
  100|      2|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_cmd_rcache_dtor,
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  101|      2|      pvt);
  102|      2|    return (&pvt->pub);
  103|       |
  104|      0|e2:
  105|      0|    RTPP_OBJ_DECREF(pvt->ht);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  106|      0|e0:
  107|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  108|      0|    free(pvt);
  109|      0|    return (NULL);
  110|      0|}

rtpp_command_stream_doio:
   73|      2|{
   74|      2|    int len, blen;
   75|      2|    char *cp;
   76|       |
   77|      2|    rtpp_command_stream_compact(rcs);
   78|      2|    cp = &(rcs->inbuf[rcs->inbuf_epos]);
   79|      2|    blen = sizeof(rcs->inbuf) - rcs->inbuf_epos;
   80|       |
   81|      2|    for (;;) {
   82|      2|        len = read(rcs->controlfd_in, cp, blen);
   83|      2|        if (len != -1 || (errno != EAGAIN && errno != EINTR))
  ------------------
  |  Branch (83:13): [True: 2, False: 0]
  |  Branch (83:27): [True: 0, False: 0]
  |  Branch (83:46): [True: 0, False: 0]
  ------------------
   84|      2|            break;
   85|      2|    }
   86|      2|    if (len == -1) {
  ------------------
  |  Branch (86:9): [True: 0, False: 2]
  ------------------
   87|      0|        if (errno != EAGAIN && errno != EINTR)
  ------------------
  |  Branch (87:13): [True: 0, False: 0]
  |  Branch (87:32): [True: 0, False: 0]
  ------------------
   88|      0|            RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "can't read from control socket");
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   88|      0|            RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "can't read from control socket");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
   89|      0|        return (-1);
   90|      0|    }
   91|      2|    rcs->inbuf_epos += len;
   92|      2|    return (len);
   93|      2|}
rtpp_command_stream.c:rtpp_command_stream_compact:
   53|      2|{
   54|      2|    char *cp;
   55|      2|    int clen;
   56|       |
   57|      2|    if (rcs->inbuf_ppos == 0 || rcs->inbuf_epos == 0)
  ------------------
  |  Branch (57:9): [True: 2, False: 0]
  |  Branch (57:33): [True: 0, False: 0]
  ------------------
   58|      2|        return;
   59|      0|    if (rcs->inbuf_ppos == rcs->inbuf_epos) {
  ------------------
  |  Branch (59:9): [True: 0, False: 0]
  ------------------
   60|      0|        rcs->inbuf_ppos = 0;
   61|      0|        rcs->inbuf_epos = 0;
   62|      0|        return;
   63|      0|    }
   64|      0|    cp = &rcs->inbuf[rcs->inbuf_ppos];
   65|      0|    clen = rcs->inbuf_epos - rcs->inbuf_ppos;
   66|      0|    memmove(rcs->inbuf, cp, clen);
   67|      0|    rcs->inbuf_epos = clen;
   68|      0|    rcs->inbuf_ppos = 0;
   69|      0|}   

rtpp_controlfd_init:
  228|      2|{
  229|      2|    int controlfd_in, controlfd_out, flags;
  230|      2|    struct rtpp_ctrl_sock *ctrl_sock;
  231|       |
  232|      2|    for (ctrl_sock = RTPP_LIST_HEAD(cfsp->ctrl_socks);
  ------------------
  |  |   60|      2|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  233|      4|      ctrl_sock != NULL; ctrl_sock = RTPP_ITER_NEXT(ctrl_sock)) {
  ------------------
  |  |   63|      2|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (233:7): [True: 2, False: 2]
  ------------------
  234|      2|        switch (ctrl_sock->type) {
  ------------------
  |  Branch (234:17): [True: 0, False: 2]
  ------------------
  235|      0|        case RTPC_SYSD:
  ------------------
  |  Branch (235:9): [True: 0, False: 2]
  ------------------
  236|      0|            controlfd_in = controlfd_out = controlfd_init_systemd();
  237|      0|            break;
  238|       |
  239|      0|        case RTPC_IFSUN:
  ------------------
  |  Branch (239:9): [True: 0, False: 2]
  ------------------
  240|      0|        case RTPC_IFSUN_C:
  ------------------
  |  Branch (240:9): [True: 0, False: 2]
  ------------------
  241|      0|            controlfd_in = controlfd_out = controlfd_init_ifsun(cfsp, ctrl_sock);
  242|      0|            break;
  243|       |
  244|      0|        case RTPC_UDP4:
  ------------------
  |  Branch (244:9): [True: 0, False: 2]
  ------------------
  245|      0|        case RTPC_UDP6:
  ------------------
  |  Branch (245:9): [True: 0, False: 2]
  ------------------
  246|      0|            controlfd_in = controlfd_out = controlfd_init_udp(cfsp, ctrl_sock);
  247|      0|            break;
  248|       |
  249|      0|        case RTPC_TCP4:
  ------------------
  |  Branch (249:9): [True: 0, False: 2]
  ------------------
  250|      0|        case RTPC_TCP6:
  ------------------
  |  Branch (250:9): [True: 0, False: 2]
  ------------------
  251|      0|            controlfd_in = controlfd_out = controlfd_init_tcp(cfsp, ctrl_sock);
  252|      0|            break;
  253|       |
  254|      2|        case RTPC_STDIO:
  ------------------
  |  Branch (254:9): [True: 2, False: 0]
  ------------------
  255|      2|            controlfd_in = fileno(stdin);
  256|      2|            controlfd_out = fileno(stdout);
  257|      2|            break;
  258|       |
  259|      0|        case RTPC_FD:
  ------------------
  |  Branch (259:9): [True: 0, False: 2]
  ------------------
  260|      0|            if (atoi_safe(ctrl_sock->cmd_sock, &controlfd_in) != ATOI_OK ||
  ------------------
  |  Branch (260:17): [True: 0, False: 0]
  ------------------
  261|      0|              controlfd_in < 0) {
  ------------------
  |  Branch (261:15): [True: 0, False: 0]
  ------------------
  262|      0|                warnx("invalid fd: %s", ctrl_sock->cmd_sock);
  263|      0|                return (-1);
  264|      0|            }
  265|      0|            controlfd_out = controlfd_in;
  266|      0|            break;
  267|      2|        }
  268|      2|        if (controlfd_in < 0 || controlfd_out < 0) {
  ------------------
  |  Branch (268:13): [True: 0, False: 2]
  |  Branch (268:33): [True: 0, False: 2]
  ------------------
  269|      0|            return (-1);
  270|      0|        }
  271|      2|        ctrl_sock->controlfd_in = controlfd_in;
  272|      2|        ctrl_sock->controlfd_out = controlfd_out;
  273|      2|        flags = fcntl(controlfd_in, F_GETFL);
  274|      2|        if (flags < 0 || fcntl(controlfd_in, F_SETFL, flags | O_NONBLOCK) < 0) {
  ------------------
  |  Branch (274:13): [True: 0, False: 2]
  |  Branch (274:26): [True: 0, False: 2]
  ------------------
  275|      0|            warn("can't set O_NONBLOCK on a socket: %d", controlfd_in);
  276|      0|            return (-1);
  277|      0|        }
  278|      2|    }
  279|       |
  280|      2|    return (0);
  281|      2|}
rtpp_ctrl_sock_parse:
  325|      2|{
  326|      2|    struct rtpp_ctrl_sock *rcsp;
  327|       |
  328|      2|    rcsp = rtpp_zmalloc(sizeof(struct rtpp_ctrl_sock));
  329|      2|    if (rcsp == NULL) {
  ------------------
  |  Branch (329:9): [True: 0, False: 2]
  ------------------
  330|      0|        return (NULL);
  331|      0|    }
  332|      2|    rcsp->type= RTPC_IFSUN;
  333|      2|    if (strncmp("udp:", optarg, 4) == 0) {
  ------------------
  |  Branch (333:9): [True: 0, False: 2]
  ------------------
  334|      0|        rcsp->type= RTPC_UDP4;
  335|      0|        optarg += 4;
  336|      2|    } else if (strncmp("udp6:", optarg, 5) == 0) {
  ------------------
  |  Branch (336:16): [True: 0, False: 2]
  ------------------
  337|      0|        rcsp->type= RTPC_UDP6;
  338|      0|        optarg += 5;
  339|      2|    } else if (strncmp("unix:", optarg, 5) == 0) {
  ------------------
  |  Branch (339:16): [True: 0, False: 2]
  ------------------
  340|      0|        rcsp->type= RTPC_IFSUN;
  341|      0|        optarg += 5;
  342|      2|    } else if (strncmp("cunix:", optarg, 6) == 0) {
  ------------------
  |  Branch (342:16): [True: 0, False: 2]
  ------------------
  343|      0|        rcsp->type= RTPC_IFSUN_C;
  344|      0|        optarg += 6;
  345|      2|    } else if (strncmp("systemd:", optarg, 8) == 0) {
  ------------------
  |  Branch (345:16): [True: 0, False: 2]
  ------------------
  346|      0|        rcsp->type= RTPC_SYSD;
  347|      0|        optarg += 8;
  348|      2|    } else if (strncmp("stdio:", optarg, 6) == 0) {
  ------------------
  |  Branch (348:16): [True: 2, False: 0]
  ------------------
  349|      2|        rcsp->type= RTPC_STDIO;
  350|      2|        optarg += 6;
  351|      2|    } else if (strncmp("stdioc:", optarg, 7) == 0) {
  ------------------
  |  Branch (351:16): [True: 0, False: 0]
  ------------------
  352|      0|        rcsp->type= RTPC_STDIO;
  353|      0|        rcsp->exit_on_close = 1;
  354|      0|        optarg += 7;
  355|      0|    } else if (strncmp("fd:", optarg, 3) == 0) {
  ------------------
  |  Branch (355:16): [True: 0, False: 0]
  ------------------
  356|      0|        rcsp->type= RTPC_FD;
  357|      0|        optarg += 3;
  358|      0|    } else if (strncmp("tcp:", optarg, 4) == 0) {
  ------------------
  |  Branch (358:16): [True: 0, False: 0]
  ------------------
  359|      0|        rcsp->type= RTPC_TCP4;
  360|      0|        optarg += 4;
  361|      0|    } else if (strncmp("tcp6:", optarg, 5) == 0) {
  ------------------
  |  Branch (361:16): [True: 0, False: 0]
  ------------------
  362|      0|        rcsp->type= RTPC_TCP6;
  363|      0|        optarg += 5;
  364|      0|    }
  365|      2|    rcsp->cmd_sock = optarg;
  366|       |
  367|      2|    return (rcsp);
  368|      2|}

rtpp_epoll_create:
   47|      4|{
   48|       |#if HAVE_KQUEUE
   49|       |    int qid = kqueue();
   50|       |
   51|       |    return (qid);
   52|       |#else
   53|      4|    return (epoll_create(1));
   54|      4|#endif
   55|      4|}
rtpp_epoll_ctl:
   59|      4|{
   60|       |#if HAVE_KQUEUE
   61|       |    struct kevent k_event;
   62|       |    void *udata;
   63|       |
   64|       |    if (op == EPOLL_CTL_DEL) {
   65|       |        EV_SET(&k_event, fd, EVFILT_READ, op, 0, 0, NULL);
   66|       |        int r1 = kevent(epfd, &k_event, 1, NULL, 0, NULL);
   67|       |#if 0
   68|       |        EV_SET(&k_event, fd, EVFILT_WRITE, op, 0, 0, NULL);
   69|       |        int r2 = kevent(epfd, &k_event, 1, NULL, 0, NULL);
   70|       |        return (r1 == 0 || r2 == 0) ? 0 : -1;
   71|       |#endif
   72|       |        return (r1);
   73|       |    }
   74|       |
   75|       |    udata = event->data.ptr;
   76|       |    if (event->events & EPOLLIN) {
   77|       |        EV_SET(&k_event, fd, EVFILT_READ, op, 0, 0, udata);
   78|       |        if (kevent(epfd, &k_event, 1, NULL, 0, NULL) != 0)
   79|       |            return (-1);
   80|       |        return (0);
   81|       |    }
   82|       |#if 0
   83|       |    if (event->events & EPOLLOUT) {
   84|       |        EV_SET(&k_event, fd, EVFILT_WRITE, op, 0, 0, udata);
   85|       |        if (kevent(epfd, &k_event, 1, NULL, 0, NULL) != 0)
   86|       |            return (-1);
   87|       |    }
   88|       |#endif
   89|       |    return (-1);
   90|       |#else
   91|      4|    return (epoll_ctl(epfd, op, fd, event));
   92|      4|#endif
   93|      4|}
rtpp_epoll_wait:
  132|      4|{
  133|       |#if HAVE_KQUEUE
  134|       |    struct kevent *kep;
  135|       |    struct timespec tot, *top;
  136|       |    int ret, kret;
  137|       |
  138|       |    kep = alloca(sizeof(struct kevent) * maxevents);
  139|       |    if (kep == NULL)
  140|       |        return (-1);
  141|       |    if (timeout >= 0) {
  142|       |        tot.tv_sec = timeout / 1000;
  143|       |        tot.tv_nsec = (timeout % 1000) * 1000000;
  144|       |        top = &tot;
  145|       |    } else {
  146|       |        top = NULL;
  147|       |    }
  148|       |    kret = kevent(epfd, NULL, 0, kep, maxevents, top);
  149|       |    if (kret <= 0)
  150|       |        return (kret);
  151|       |    ret = 0;
  152|       |    for (int i = 0; i < kret; i++) {
  153|       |        ret = append_kevent(events, ret, kep, i);
  154|       |    }
  155|       |    return (ret);
  156|       |#else
  157|      4|    return (epoll_wait(epfd, events, maxevents, timeout));
  158|      4|#endif
  159|      4|}

rtpp_genuid_ctor:
   48|      2|{
   49|      2|    struct rtpp_genuid_priv *pvt;
   50|       |
   51|      2|    pvt = rtpp_zmalloc(sizeof(struct rtpp_genuid_priv));
   52|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (52:9): [True: 0, False: 2]
  ------------------
   53|      0|        goto e0;
   54|      0|    }
   55|      2|    atomic_init(&pvt->lastuid, 0);
   56|      2|    pvt->pub.dtor = &rtpp_genuid_dtor;
   57|      2|    pvt->pub.gen = &rtpp_genuid_gen;
   58|      2|    return (&pvt->pub);
   59|       |
   60|      0|e0:
   61|      0|    return (NULL);
   62|      2|}
rtpp_genuid.c:rtpp_genuid_gen:
   76|      2|{
   77|      2|    struct rtpp_genuid_priv *pvt;
   78|       |
   79|      2|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|      2|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
   80|       |
   81|      2|    *vp = atomic_fetch_add_explicit(&(pvt->lastuid), 1,
   82|      2|      memory_order_relaxed);
   83|      2|}

rtpp_gen_uid_init:
   39|      2|{
   40|       |
   41|      2|    gup = rtpp_genuid_ctor();
   42|      2|    return (gup != NULL ? 0: -1);
  ------------------
  |  Branch (42:13): [True: 2, False: 0]
  ------------------
   43|      2|}
rtpp_gen_uid:
   56|      2|{
   57|       |
   58|      2|    CALL_METHOD(gup, gen, uip);
  ------------------
  |  |   83|      2|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
   59|      2|}

rtpp_hash_table_ctor:
  148|     14|{
  149|     14|    struct rtpp_hash_table *pub;
  150|     14|    struct rtpp_hash_table_priv *pvt;
  151|     14|    int ht_len = 256;
  152|       |
  153|     14|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_hash_table_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|     14|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  154|     14|    if (pvt == NULL) {
  ------------------
  |  Branch (154:9): [True: 0, False: 14]
  ------------------
  155|      0|        goto e0;
  156|      0|    }
  157|     14|    pvt->l1 = rtpp_zmalloc(rtpp_hash_table_l1_sizeof(ht_len));
  158|     14|    if (pvt->l1 == NULL) {
  ------------------
  |  Branch (158:9): [True: 0, False: 14]
  ------------------
  159|      0|        goto e1;
  160|      0|    }
  161|     14|    if (pthread_mutex_init(&pvt->hash_table_lock, NULL) != 0)
  ------------------
  |  Branch (161:9): [True: 0, False: 14]
  ------------------
  162|      0|        goto e2;
  163|     14|    pvt->key_type = key_type;
  164|     14|    pvt->flags = flags;
  165|     14|    pvt->l1->ht_len = ht_len;
  166|     14|    pub = &(pvt->pub);
  167|     14|    pvt->pub.seed = ((uint64_t)random()) << 32 | (uint64_t)random();
  168|     14|    PUBINST_FININIT(&pvt->pub, pvt, hash_table_dtor);
  ------------------
  |  |   76|     14|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|     14|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|     14|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|     14|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|     14|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|     14|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|     14|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|     14|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|     14|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|     14|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|     14|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|     14|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|     14|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|     14|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|     14|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|     14|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|     14|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|     14|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|     14|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|     14|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|     14|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|     14|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|     14|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|     14|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|     14|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|     14|      pvt_inst);
  ------------------
  169|     14|    return (pub);
  170|      0|e2:
  171|      0|    free(pvt->l1);
  172|      0|e1:
  173|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|      0|    free(pvt);
  175|      0|e0:
  176|      0|    return (NULL);
  177|      0|}
rtpp_hash_table.c:rtpp_ht_hashkey:
  209|    692|{
  210|       |
  211|    692|    return XXH64(key, ksize, pvt->pub.seed);
  ------------------
  |  |  209|    692|#  define XXH64 XXH_NAME2(XXH_NAMESPACE, XXH64)
  |  |  ------------------
  |  |  |  |  196|    692|#  define XXH_NAME2(A,B) XXH_CAT(A,B)
  |  |  |  |  ------------------
  |  |  |  |  |  |  195|    692|#  define XXH_CAT(A,B) A##B
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  212|    692|}
rtpp_hash_table.c:hash_table_foreach:
  633|      7|{
  634|      7|    struct rtpp_hash_table_entry *sp, *sp_next;
  635|      7|    struct rtpp_hash_table_priv *pvt;
  636|      7|    struct rtpp_refcnt *rptr;
  637|      7|    int i, mval;
  638|       |
  639|      7|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      7|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  640|      7|    pthread_mutex_lock(&pvt->hash_table_lock);
  641|      7|    if (pvt->l1->hte_num == 0) {
  ------------------
  |  Branch (641:9): [True: 7, False: 0]
  ------------------
  642|      7|        pthread_mutex_unlock(&pvt->hash_table_lock);
  643|      7|        return;
  644|      7|    }
  645|      0|    for (i = 0; i < pvt->l1->ht_len; i++) {
  ------------------
  |  Branch (645:17): [True: 0, False: 0]
  ------------------
  646|      0|        for (sp = pvt->l1->hash_table[i]; sp != NULL; sp = sp_next) {
  ------------------
  |  Branch (646:43): [True: 0, False: 0]
  ------------------
  647|      0|            RTPP_DBG_ASSERT(sp->hte_type == rtpp_hte_refcnt_t);
  648|      0|            rptr = (struct rtpp_refcnt *)sp->sptr;
  649|      0|            sp_next = sp->next;
  650|      0|            mval = hte_ematch(CALL_SMETHOD(rptr, getdata), marg);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  651|      0|            RTPP_DBG_ASSERT(VDTE_MVAL(mval));
  652|      0|            if (mval & RTPP_HT_MATCH_DEL) {
  ------------------
  |  |   75|      0|#define RTPP_HT_MATCH_DEL   (1 << 1)
  ------------------
  |  Branch (652:17): [True: 0, False: 0]
  ------------------
  653|      0|                hash_table_remove_locked(pvt, sp, sp->hash, hosp);
  654|      0|                RC_DECREF(rptr);
  ------------------
  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  655|      0|                free(sp);
  656|      0|            }
  657|      0|            if (mval & RTPP_HT_MATCH_BRK) {
  ------------------
  |  |   74|      0|#define RTPP_HT_MATCH_BRK   (1 << 0)
  ------------------
  |  Branch (657:17): [True: 0, False: 0]
  ------------------
  658|      0|                break;
  659|      0|            }
  660|      0|        }
  661|      0|    }
  662|      0|    pthread_mutex_unlock(&pvt->hash_table_lock);
  663|      0|}
rtpp_hash_table.c:hash_table_foreach_key_raw:
  668|    692|{
  669|    692|    struct rtpp_hash_table_entry *sp, *sp_next;
  670|    692|    struct rtpp_refcnt *rptr;
  671|    692|    int mval;
  672|    692|    uint64_t hash;
  673|       |
  674|    692|    hash = rtpp_ht_hashkey(pvt, key, klen);
  675|    692|    pthread_mutex_lock(&pvt->hash_table_lock);
  676|    692|    if (pvt->l1->hte_num == 0) {
  ------------------
  |  Branch (676:9): [True: 692, False: 0]
  ------------------
  677|    692|        pthread_mutex_unlock(&pvt->hash_table_lock);
  678|    692|        return;
  679|    692|    }
  680|      0|    for (sp = HT_GET(pvt->l1, hash); sp != NULL; sp = sp_next) {
  ------------------
  |  |   45|      0|#define HT_GET(l1p, hash) ((l1p)->hash_table[(hash) & ((l1p)->ht_len - 1)])
  ------------------
  |  Branch (680:38): [True: 0, False: 0]
  ------------------
  681|      0|        sp_next = sp->next;
  682|      0|        if (pvt->key_type == rtpp_ht_key_str_t && hash != sp->hash)
  ------------------
  |  Branch (682:13): [True: 0, False: 0]
  |  Branch (682:51): [True: 0, False: 0]
  ------------------
  683|      0|            continue;
  684|      0|        if (!rtpp_ht_cmpkey(pvt, sp, key, klen)) {
  ------------------
  |  Branch (684:13): [True: 0, False: 0]
  ------------------
  685|      0|            continue;
  686|      0|        }
  687|      0|        RTPP_DBG_ASSERT(sp->hte_type == rtpp_hte_refcnt_t);
  688|      0|        rptr = (struct rtpp_refcnt *)sp->sptr;
  689|      0|        mval = hte_ematch(CALL_SMETHOD(rptr, getdata), marg);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  690|      0|        RTPP_DBG_ASSERT(VDTE_MVAL(mval));
  691|      0|        if (mval & RTPP_HT_MATCH_DEL) {
  ------------------
  |  |   75|      0|#define RTPP_HT_MATCH_DEL   (1 << 1)
  ------------------
  |  Branch (691:13): [True: 0, False: 0]
  ------------------
  692|      0|            hash_table_remove_locked(pvt, sp, sp->hash, NULL);
  693|      0|            RC_DECREF(rptr);
  ------------------
  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  694|      0|            free(sp);
  695|      0|        }
  696|      0|        if (mval & RTPP_HT_MATCH_BRK) {
  ------------------
  |  |   74|      0|#define RTPP_HT_MATCH_BRK   (1 << 0)
  ------------------
  |  Branch (696:13): [True: 0, False: 0]
  ------------------
  697|      0|            break;
  698|      0|        }
  699|      0|    }
  700|      0|    pthread_mutex_unlock(&pvt->hash_table_lock);
  701|      0|}
rtpp_hash_table.c:hash_table_foreach_key_str:
  718|    692|{
  719|    692|    struct rtpp_hash_table_priv *pvt;
  720|       |
  721|    692|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|    692|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  722|    692|    hash_table_foreach_key_raw(pvt, key->s, key->len, hte_ematch, marg);
  723|    692|}
rtpp_hash_table.c:hash_table_get_length:
  727|     40|{
  728|     40|    struct rtpp_hash_table_priv *pvt;
  729|     40|    int rval;
  730|       |
  731|     40|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|     40|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  732|     40|    pthread_mutex_lock(&pvt->hash_table_lock);
  733|     40|    rval = pvt->l1->hte_num;
  734|     40|    pthread_mutex_unlock(&pvt->hash_table_lock);
  735|       |
  736|     40|    return (rval);
  737|     40|}
rtpp_hash_table.c:hash_table_purge:
  751|      6|{
  752|      6|    int npurged;
  753|       |
  754|      6|    npurged = 0;
  755|      6|    CALL_SMETHOD(self, foreach, hash_table_purge_f, &npurged, NULL);
  ------------------
  |  |  134|      6|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      6|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      6|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      6|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      6|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      6|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      6|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      6|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      6|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      6|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      6|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      6|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      6|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      6|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      6|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      6|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      6|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      6|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      6|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      6|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      6|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      6|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      6|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      6|)
  |  |  ------------------
  |  |               #define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  755|      6|    CALL_SMETHOD(self, foreach, hash_table_purge_f, &npurged, NULL);
  |  |  ------------------
  ------------------
  756|      6|    return (npurged);
  757|      6|}
rtpp_hash_table.c:rtpp_hash_table_l1_sizeof:
  140|     14|{
  141|       |
  142|     14|    return (sizeof(struct rtpp_hash_table_l1) +
  143|     14|      (sizeof(struct rtpp_hash_table_entry *) * ht_len));
  144|     14|}

main.c:rtpp_list_append:
   40|      2|{
   41|      2|    struct rtpp_type_linkable *elem;
   42|       |
   43|      2|    elem = (struct rtpp_type_linkable *)p;
   44|       |#ifdef RTPP_DEBUG
   45|       |#if 0
   46|       |    assert(RTPP_TYPE_IS_LINKABLE(elem));
   47|       |#endif
   48|       |    assert(elem->next == NULL);
   49|       |#endif
   50|      2|    if (lst->head == NULL) {
  ------------------
  |  Branch (50:9): [True: 2, False: 0]
  ------------------
   51|      2|        lst->head = lst->tail = elem;
   52|      2|    } else {
   53|      0|        lst->tail->next = elem;
   54|      0|        lst->tail = elem;
   55|      0|    }
   56|      2|    lst->len += 1;
   57|      2|}
rtpp_modman.c:rtpp_list_append:
   40|      6|{
   41|      6|    struct rtpp_type_linkable *elem;
   42|       |
   43|      6|    elem = (struct rtpp_type_linkable *)p;
   44|       |#ifdef RTPP_DEBUG
   45|       |#if 0
   46|       |    assert(RTPP_TYPE_IS_LINKABLE(elem));
   47|       |#endif
   48|       |    assert(elem->next == NULL);
   49|       |#endif
   50|      6|    if (lst->head == NULL) {
  ------------------
  |  Branch (50:9): [True: 2, False: 4]
  ------------------
   51|      2|        lst->head = lst->tail = elem;
   52|      4|    } else {
   53|      4|        lst->tail->next = elem;
   54|      4|        lst->tail = elem;
   55|      4|    }
   56|      6|    lst->len += 1;
   57|      6|}

rtpp_log_ctor:
   74|      2|{
   75|      2|    struct rtpp_log_priv *pvt;
   76|       |
   77|      2|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_log_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   78|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (78:9): [True: 0, False: 2]
  ------------------
   79|      0|        return (NULL);
   80|      0|    }
   81|      2|    rtpp_gen_uid(&pvt->pub.lguid);
   82|      2|    pvt->pub.genwrite = rtpp_log_obj_write_early;
   83|      2|    pvt->pub.errwrite = rtpp_log_obj_ewrite_early;
   84|      2|    pvt->pub.setlevel = rtpp_log_obj_setlevel_early;
   85|      2|    pvt->pub.start = rtpp_log_obj_start;
   86|      2|    pvt->app = app;
   87|      2|    pvt->call_id = call_id;
   88|      2|    pvt->flags = flags;
   89|      2|    pvt->level = -1;
   90|      2|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_log_obj_dtor,
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
   91|      2|      pvt);
   92|      2|    return (&pvt->pub);
   93|      2|}
rtpp_log_obj.c:rtpp_log_obj_setlevel_early:
  120|      4|{
  121|      4|    struct rtpp_log_priv *pvt;
  122|       |
  123|      4|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      4|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  124|      4|    pvt->level = log_level;
  125|      4|}
rtpp_log_obj.c:rtpp_log_obj_start:
  195|      2|{
  196|      2|    struct rtpp_log_priv *pvt;
  197|       |
  198|      2|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      2|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  199|       |
  200|      2|    pvt->log = rtpp_log_open(cfs, pvt->app, pvt->call_id, pvt->flags);
  ------------------
  |  |   50|      2|#define	rtpp_log_open(cf, app, call_id, flag) _rtpp_log_open(cf, app, call_id);
  ------------------
  201|      2|    if (pvt->log == NULL)
  ------------------
  |  Branch (201:9): [True: 0, False: 2]
  ------------------
  202|      0|        return (-1);
  203|      2|    pvt->pub.genwrite = rtpp_log_obj_write;
  204|      2|    pvt->pub.errwrite = rtpp_log_obj_ewrite;
  205|      2|    pvt->pub.setlevel = rtpp_log_obj_setlevel;
  206|      2|    if (pvt->level != -1) {
  ------------------
  |  Branch (206:9): [True: 2, False: 0]
  ------------------
  207|      2|        rtpp_log_setlevel(pvt->log, pvt->level);
  208|      2|    }
  209|      2|    return (0);
  210|      2|}
rtpp_log_obj.c:rtpp_log_obj_write:
  130|  6.63k|{
  131|  6.63k|    va_list ap;
  132|  6.63k|    struct rtpp_log_priv *pvt;
  133|       |
  134|  6.63k|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|  6.63k|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  135|  6.63k|    va_start(ap, fmt);
  136|  6.63k|    _rtpp_log_write_va(pvt->log, level, fname, lnum, fmt, ap);
  137|  6.63k|    va_end(ap);
  138|  6.63k|    return;
  139|  6.63k|}

_rtpp_log_open:
   75|      2|{
   76|      2|    const char *stritime;
   77|      2|    const char *tform;
   78|      2|    char *se;
   79|      2|    struct rtpp_log_inst *rli;
   80|      2|#ifdef RTPP_LOG_ADVANCED
   81|      2|    int facility;
   82|       |
   83|      2|    facility = cf->log_facility;
   84|      2|    if (facility == -1)
  ------------------
  |  Branch (84:9): [True: 2, False: 0]
  ------------------
   85|      2|	facility = LOG_DAEMON;
   86|       |
   87|      2|    if (cf->ropts.no_daemon == 0 && atomic_load(&syslog_async_opened) == 0) {
  ------------------
  |  Branch (87:9): [True: 0, False: 2]
  |  Branch (87:37): [True: 0, False: 0]
  ------------------
   88|      0|	if (syslog_async_init(app, facility) == 0) {
  ------------------
  |  Branch (88:6): [True: 0, False: 0]
  ------------------
   89|      0|	    atomic_store(&syslog_async_opened, 1);
   90|      0|        } else {
   91|      0|            return (NULL);
   92|      0|        }
   93|      0|    }
   94|      2|#endif
   95|      2|    rli = rtpp_zmalloc(sizeof(struct rtpp_log_inst));
   96|      2|    if (rli == NULL) {
  ------------------
  |  Branch (96:9): [True: 0, False: 2]
  ------------------
   97|      0|        return (NULL);
   98|      0|    }
   99|      2|    tform = getenv("RTPP_LOG_TFORM");
  100|      2|    if (tform != NULL && strcmp(tform, "rel") == 0) {
  ------------------
  |  Branch (100:9): [True: 0, False: 2]
  |  Branch (100:26): [True: 0, False: 0]
  ------------------
  101|      0|        stritime = getenv("RTPP_LOG_TSTART");
  102|      0|        if (stritime != NULL) {
  ------------------
  |  Branch (102:13): [True: 0, False: 0]
  ------------------
  103|      0|            rli->itime = strtod(stritime, &se);
  104|      0|        } else {
  105|      0|            if (iitime == 0.0) {
  ------------------
  |  Branch (105:17): [True: 0, False: 0]
  ------------------
  106|      0|                iitime = getdtime();
  107|      0|            }
  108|      0|            rli->itime = iitime;
  109|      0|        }
  110|      0|    }
  111|      2|    if (call_id != NULL) {
  ------------------
  |  Branch (111:9): [True: 0, False: 2]
  ------------------
  112|      0|        rli->call_id = strdup(call_id);
  113|      0|    }
  114|      2|    if (cf->log_level == -1) {
  ------------------
  |  Branch (114:9): [True: 0, False: 2]
  ------------------
  115|      0|	rli->level = (cf->ropts.no_daemon != 0) ? RTPP_LOG_DBUG : RTPP_LOG_WARN;
  ------------------
  |  |   44|      0|#define	RTPP_LOG_DBUG	LOG_DEBUG
  ------------------
              	rli->level = (cf->ropts.no_daemon != 0) ? RTPP_LOG_DBUG : RTPP_LOG_WARN;
  ------------------
  |  |   46|      0|#define	RTPP_LOG_WARN	LOG_WARNING
  ------------------
  |  Branch (115:15): [True: 0, False: 0]
  ------------------
  116|      2|    } else {
  117|      2|        rli->level = cf->log_level;
  118|      2|    }
  119|      2|    rli->format_se[0] = "%s%s:%s:%s:%d: ";
  120|      2|    rli->format_se[1] = "\n";
  121|      2|    rli->eformat_se[0] = "%s%s:%s:%s:%d: ";
  122|      2|    rli->eformat_se[1] = ": %s (%d)\n";
  123|      2|    rli->format_sl[0] = "%s:%s:%s:%d: ";
  124|      2|    rli->format_sl[1] = NULL;
  125|      2|    rli->eformat_sl[0] = "%s:%s:%s:%d: ";
  126|      2|    rli->eformat_sl[1] = ": %s (%d)";
  127|      2|    return (rli);
  128|      2|}
rtpp_log_str2lvl:
  171|      2|{
  172|       |
  173|      2|    if (strcasecmp(strl, "DBUG") == 0)
  ------------------
  |  Branch (173:9): [True: 0, False: 2]
  ------------------
  174|      0|	return RTPP_LOG_DBUG;
  ------------------
  |  |   44|      0|#define	RTPP_LOG_DBUG	LOG_DEBUG
  ------------------
  175|       |
  176|      2|    if (strcasecmp(strl, "INFO") == 0)
  ------------------
  |  Branch (176:9): [True: 0, False: 2]
  ------------------
  177|      0|	return RTPP_LOG_INFO;
  ------------------
  |  |   45|      0|#define	RTPP_LOG_INFO	LOG_INFO
  ------------------
  178|       |
  179|      2|    if (strcasecmp(strl, "WARN") == 0)
  ------------------
  |  Branch (179:9): [True: 0, False: 2]
  ------------------
  180|      0|	return RTPP_LOG_WARN;
  ------------------
  |  |   46|      0|#define	RTPP_LOG_WARN	LOG_WARNING
  ------------------
  181|       |
  182|      2|    if (strcasecmp(strl, "ERR") == 0)
  ------------------
  |  Branch (182:9): [True: 0, False: 2]
  ------------------
  183|      0|	return RTPP_LOG_ERR;
  ------------------
  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  ------------------
  184|       |
  185|      2|    if (strcasecmp(strl, "CRIT") == 0)
  ------------------
  |  Branch (185:9): [True: 2, False: 0]
  ------------------
  186|      2|	return RTPP_LOG_CRIT;
  ------------------
  |  |   48|      2|#define	RTPP_LOG_CRIT	LOG_CRIT
  ------------------
  187|       |
  188|      0|    return -1;
  189|      2|}
rtpp_log_setlevel:
  200|      2|{
  201|       |
  202|      2|    rli->level = level;
  203|      2|}
_rtpp_log_write_va:
  248|  6.63k|{
  249|  6.63k|    char rtpp_log_buff[2048];
  250|  6.63k|    char rtpp_time_buff[32];
  251|  6.63k|    const char *call_id;
  252|  6.63k|#ifdef RTPP_LOG_ADVANCED
  253|  6.63k|    va_list apc;
  254|  6.63k|#endif
  255|       |
  256|  6.63k|    if (check_level(rli, level) == 0)
  ------------------
  |  Branch (256:9): [True: 6.63k, False: 0]
  ------------------
  257|  6.63k|	return;
  258|       |
  259|      0|    if (rli->call_id != NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 0]
  ------------------
  260|      0|        call_id = rli->call_id;
  261|      0|    } else {
  262|      0|        call_id = CALL_ID_NONE;
  ------------------
  |  |   56|      0|#define CALL_ID_NONE "GLOBAL"
  ------------------
  263|      0|    }
  264|       |
  265|      0|#ifdef RTPP_LOG_ADVANCED
  266|      0|    if (atomic_load(&syslog_async_opened) != 0) {
  ------------------
  |  Branch (266:9): [True: 0, False: 0]
  ------------------
  267|      0|        snprintf(rtpp_log_buff, sizeof(rtpp_log_buff), rli->format_sl[0],
  268|      0|          strlvl(level), call_id, function, lnum);
  269|      0|        va_copy(apc, ap);
  270|      0|	vsyslog_async(level, rtpp_log_buff, rli->format_sl[1], format, apc);
  271|      0|        va_end(apc);
  272|      0|#if !defined(RTPP_DEBUG)
  273|      0|        return;
  274|      0|#endif
  275|      0|    }
  276|      0|#endif
  277|       |
  278|      0|    ftime(rli, getdtime(), rtpp_time_buff, sizeof(rtpp_time_buff));
  279|      0|    _rtpp_log_lock();
  280|      0|    fprintf(stderr, rli->format_se[0], rtpp_time_buff, strlvl(level),
  281|      0|      call_id, function, lnum);
  282|      0|    vfprintf(stderr, format, ap);
  283|      0|    fprintf(stderr, "%s", rli->format_se[1]);
  284|      0|    fflush(stderr);
  285|      0|    _rtpp_log_unlock();
  286|      0|}
rtpp_log_stand.c:check_level:
  193|  6.63k|{
  194|       |
  195|  6.63k|    return (level <= rli->level);
  196|  6.63k|}

rtpp_zmalloc:
   46|  3.53k|{
   47|  3.53k|    void *rval;
   48|       |
   49|  3.53k|#if !defined(RTPP_CHECK_LEAKS)
   50|  3.53k|    rval = malloc(msize);
   51|       |#else
   52|       |    rval = rtpp_memdeb_malloc(msize, memdeb_p, mlp);
   53|       |#endif
   54|  3.53k|    if (rval != NULL) {
  ------------------
  |  Branch (54:9): [True: 3.53k, False: 0]
  ------------------
   55|  3.53k|        memset(rval, '\0', msize);
   56|  3.53k|    }
   57|  3.53k|    return (rval);
   58|  3.53k|}
rtpp_rzmalloc:
   74|     64|{
   75|     64|    void *rval;
   76|     64|    struct rtpp_refcnt *rcnt;
   77|     64|    size_t pad_size, asize;
   78|     64|    void *rco;
   79|       |
   80|     64|    RTPP_DBG_ASSERT(msize >= rcntp_offs + sizeof(struct rtpp_refcnt *));
   81|     64|    size_t norm_off = offsetof(struct alig_help, b);
   82|     64|    pad_size = (norm_off - msize) & (norm_off - 1);
   83|     64|    asize = msize + pad_size + rtpp_refcnt_osize;
   84|     64|#if !defined(RTPP_CHECK_LEAKS)
   85|     64|    rval = malloc(asize);
   86|       |#else
   87|       |    rval = rtpp_memdeb_malloc(asize, memdeb_p, mlp);
   88|       |#endif
   89|     64|    if (rval == NULL) {
  ------------------
  |  Branch (89:9): [True: 0, False: 64]
  ------------------
   90|      0|        return (NULL);
   91|      0|    }
   92|     64|    memset(rval, '\0', asize);
   93|     64|    rco = (char *)rval + msize + pad_size;
   94|     64|    rcnt = rtpp_refcnt_ctor_pa(rco);
   95|     64|    *PpP(rval, rcntp_offs, struct rtpp_refcnt **) = rcnt;
  ------------------
  |  |   65|     64|#define PpP(p1, p2, type) (type)(((char *)p1) + ((size_t)p2))
  ------------------
   96|       |
   97|     64|    return (rval);
   98|     64|}
rtpp_rmalloc:
  107|     18|{
  108|     18|    void *rval;
  109|     18|    struct rtpp_refcnt *rcnt;
  110|     18|    size_t pad_size, asize;
  111|     18|    void *rco;
  112|       |
  113|     18|    RTPP_DBG_ASSERT(msize >= rcntp_offs + sizeof(struct rtpp_refcnt *));
  114|     18|    size_t norm_off = offsetof(struct alig_help, b);
  115|     18|    pad_size = (norm_off - msize) & (norm_off - 1);
  116|     18|    asize = msize + pad_size + rtpp_refcnt_osize;
  117|     18|#if !defined(RTPP_CHECK_LEAKS)
  118|     18|    rval = malloc(asize);
  119|       |#else
  120|       |    rval = rtpp_memdeb_malloc(asize, memdeb_p, mlp);
  121|       |#endif
  122|     18|    if (rval == NULL) {
  ------------------
  |  Branch (122:9): [True: 0, False: 18]
  ------------------
  123|      0|        return (NULL);
  124|      0|    }
  125|     18|    rco = (char *)rval + msize + pad_size;
  126|     18|    memset(rco, '\0', rtpp_refcnt_osize);
  127|     18|    rcnt = rtpp_refcnt_ctor_pa(rco);
  128|     18|    *PpP(rval, rcntp_offs, struct rtpp_refcnt **) = rcnt;
  ------------------
  |  |   65|     18|#define PpP(p1, p2, type) (type)(((char *)p1) + ((size_t)p2))
  ------------------
  129|       |
  130|     18|    return (rval);
  131|     18|}

rtpp_modman_ctor:
   60|      2|{
   61|      2|    struct rtpp_modman_priv *pvt;
   62|       |
   63|      2|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_modman_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   64|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (64:9): [True: 0, False: 2]
  ------------------
   65|      0|        goto e0;
   66|      0|    }
   67|      2|    pvt->pub.insert = rtpp_modman_insert;
   68|      2|    pvt->pub.startall = rtpp_modman_startall;
   69|      2|    pvt->pub.get_next_id = rtpp_modman_get_next_id;
   70|      2|    pvt->pub.do_acct = rtpp_modman_do_acct;
   71|      2|    pvt->pub.get_ul_subc_h = rtpp_modman_get_ul_subc_h;
   72|      2|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_modman_dtor,
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
   73|      2|      pvt);
   74|      2|    return ((&pvt->pub));
   75|       |
   76|      0|e0:
   77|      0|    return (NULL);
   78|      2|}
rtpp_modman.c:rtpp_modman_insert:
   96|      6|{
   97|      6|    struct rtpp_modman_priv *pvt;
   98|       |
   99|      6|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  100|      6|    mif->ids->module_idx = self->count.total;
  101|      6|    rtpp_list_append(&pvt->all, mif);
  102|      6|    self->count.total++;
  103|      6|    if (mif->has.do_acct)
  ------------------
  |  Branch (103:9): [True: 2, False: 4]
  ------------------
  104|      2|        self->count.sess_acct++;
  105|      6|}
rtpp_modman.c:rtpp_modman_startall:
  110|      2|{
  111|      2|    struct rtpp_module_if *mif;
  112|      2|    struct rtpp_modman_priv *pvt;
  113|       |
  114|      2|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      2|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  115|      8|    for (mif = RTPP_LIST_HEAD(&pvt->all); mif != NULL; mif = RTPP_ITER_NEXT(mif)) {
  ------------------
  |  |   60|      2|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
                  for (mif = RTPP_LIST_HEAD(&pvt->all); mif != NULL; mif = RTPP_ITER_NEXT(mif)) {
  ------------------
  |  |   63|      6|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (115:43): [True: 6, False: 2]
  ------------------
  116|      6|        if (CALL_METHOD(mif, construct, cfp) != 0) {
  ------------------
  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (116:13): [True: 0, False: 6]
  ------------------
  117|      0|            goto failed;
  118|      0|        }
  119|      6|        if (CALL_METHOD(mif, start, cfp) != 0) {
  ------------------
  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  |  Branch (119:13): [True: 0, False: 6]
  ------------------
  120|      0|            goto failed;
  121|      0|        }
  122|      6|    }
  123|      2|    return (0);
  124|      0|failed:
  125|      0|    *failedmod = mif->descr->name;
  126|      0|    return (-1);
  127|      2|}
rtpp_modman.c:rtpp_modman_get_next_id:
  131|      6|{
  132|      6|    unsigned int ri;
  133|      6|    struct rtpp_modman_priv *pvt;
  134|       |
  135|      6|    ri = 1;
  136|      6|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  137|      6|    for (struct rtpp_module_if *tmp = RTPP_LIST_HEAD(&pvt->all);
  ------------------
  |  |   60|      6|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  138|     12|      tmp != NULL; tmp = RTPP_ITER_NEXT(tmp)) {
  ------------------
  |  |   63|      6|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (138:7): [True: 6, False: 6]
  ------------------
  139|      6|        if (tmp->descr->module_id != module_id)
  ------------------
  |  Branch (139:13): [True: 6, False: 0]
  ------------------
  140|      6|            continue;
  141|      0|        ri += 1;
  142|      0|    }
  143|      6|    return (ri);
  144|      6|}
rtpp_modman.c:rtpp_modman_get_ul_subc_h:
  162|    121|{
  163|    121|    struct rtpp_modman_priv *pvt;
  164|    121|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|    121|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  165|    121|    for (struct rtpp_module_if *tmp = RTPP_LIST_HEAD(&pvt->all);
  ------------------
  |  |   60|    121|#define RTPP_LIST_HEAD(lst)  (void *)((lst)->head)
  ------------------
  166|    389|      tmp != NULL; tmp = RTPP_ITER_NEXT(tmp)) {
  ------------------
  |  |   63|    268|#define RTPP_ITER_NEXT(stlp)     ((void *)((stlp)->t.next))
  ------------------
  |  Branch (166:7): [True: 331, False: 58]
  ------------------
  167|    331|        if (tmp->descr->module_id != mod_id || tmp->ids->instance_id != inst_id)
  ------------------
  |  Branch (167:13): [True: 234, False: 97]
  |  Branch (167:48): [True: 34, False: 63]
  ------------------
  168|    268|            continue;
  169|     63|        if (tmp->has.ul_subc_h == 0)
  ------------------
  |  Branch (169:13): [True: 1, False: 62]
  ------------------
  170|      1|            break;
  171|     62|        ashp->handler = (after_success_t)tmp->ul_subc_handle;
  172|     62|        ashp->args.stat = tmp;
  173|     62|        return (0);
  174|     63|    }
  175|     59|    return (-1);
  176|    121|}

rtpp_module_if_ctor:
  120|      6|{
  121|      6|    struct rtpp_module_if_priv *pvt;
  122|       |
  123|      6|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_module_if_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      6|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  124|      6|    if (pvt == NULL) {
  ------------------
  |  Branch (124:9): [True: 0, False: 6]
  ------------------
  125|      0|        goto e0;
  126|      0|    }
  127|      6|    pvt->mpath = strdup(mpath);
  128|      6|    if (pvt->mpath == NULL) {
  ------------------
  |  Branch (128:9): [True: 0, False: 6]
  ------------------
  129|      0|        goto e1;
  130|      0|    }
  131|      6|    pvt->pub.load = &rtpp_mif_load;
  132|      6|    pvt->pub.construct = &rtpp_mif_construct;
  133|      6|    pvt->pub.do_acct = &rtpp_mif_do_acct;
  134|      6|    pvt->pub.do_acct_rtcp = &rtpp_mif_do_acct_rtcp;
  135|      6|    pvt->pub.start = &rtpp_mif_start;
  136|      6|    pvt->pub.get_mconf = &rtpp_mif_get_mconf;
  137|      6|    pvt->pub.ul_subc_handle = &rtpp_mif_ul_subc_handle;
  138|      6|    pvt->pub.kaput = &rtpp_mif_kaput;
  139|      6|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_mif_dtor,
  ------------------
  |  |  134|      6|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      6|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      6|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      6|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      6|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      6|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      6|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      6|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      6|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      6|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      6|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      6|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      6|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      6|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      6|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      6|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      6|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      6|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      6|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      6|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      6|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      6|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      6|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      6|)
  |  |  ------------------
  ------------------
  140|      6|      pvt);
  141|      6|    return ((&pvt->pub));
  142|       |
  143|      0|e1:
  144|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  145|      0|    free(pvt);
  146|      0|e0:
  147|      0|    return (NULL);
  148|      0|}
rtpp_module_if.c:rtpp_mif_load:
  181|      6|{
  182|      6|    struct rtpp_module_if_priv *pvt;
  183|      6|    const char *derr;
  184|      6|    struct rtpp_minfo *mip = NULL;
  185|       |
  186|      6|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  187|      6|#if defined(LIBRTPPROXY)
  188|      6|    mip = rtpp_static_modules_lookup(pvt->mpath);
  189|      6|#endif
  190|      6|    if (mip == NULL) {
  ------------------
  |  Branch (190:9): [True: 0, False: 6]
  ------------------
  191|      0|        pvt->dmp = dlopen(pvt->mpath, RTLD_NOW);
  192|      0|        if (pvt->dmp == NULL) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            derr = dlerror();
  194|      0|            if (strstr(derr, pvt->mpath) == NULL) {
  ------------------
  |  Branch (194:17): [True: 0, False: 0]
  ------------------
  195|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't dlopen(%s): %s", pvt->mpath, derr);
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  195|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't dlopen(%s): %s", pvt->mpath, derr);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  196|      0|            } else {
  197|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't dlopen() module: %s", derr);
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  197|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't dlopen() module: %s", derr);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  198|      0|            }
  199|      0|            goto e1;
  200|      0|        }
  201|      0|        mip = dlsym(pvt->dmp, "rtpp_module");
  202|      0|        if (mip == NULL) {
  ------------------
  |  Branch (202:13): [True: 0, False: 0]
  ------------------
  203|      0|            derr = dlerror();
  204|      0|            if (strstr(derr, pvt->mpath) == NULL) {
  ------------------
  |  Branch (204:17): [True: 0, False: 0]
  ------------------
  205|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't find 'rtpp_module' symbol in the %s"
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  205|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't find 'rtpp_module' symbol in the %s"
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  206|      0|                  ": %s", pvt->mpath, derr);
  207|      0|            } else {
  208|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't find 'rtpp_module' symbol: %s",
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  208|      0|                RTPP_LOG(log, RTPP_LOG_ERR, "can't find 'rtpp_module' symbol: %s",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  209|      0|                  derr);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  209|      0|                  derr);
  210|      0|            }
  211|      0|            goto e2;
  212|      0|        }
  213|      0|    }
  214|      6|    pvt->mip = mip;
  215|      6|    if (!MI_VER_CHCK(pvt->mip)) {
  ------------------
  |  |  192|      6|#define MI_VER_CHCK(sptr) ( \
  |  |  193|      6|  (sptr)->descr.ver.rev == MODULE_API_REVISION && \
  |  |  ------------------
  |  |  |  |   30|     12|#define MODULE_API_REVISION 11
  |  |  ------------------
  |  |  |  Branch (193:3): [True: 6, False: 0]
  |  |  ------------------
  |  |  194|      6|  (sptr)->descr.ver.mi_size == sizeof(struct rtpp_minfo) && \
  |  |  ------------------
  |  |  |  Branch (194:3): [True: 6, False: 0]
  |  |  ------------------
  |  |  195|      6|  strcmp((sptr)->descr.ver.build, RTPP_SW_VERSION) == 0)
  |  |  ------------------
  |  |  |  |   10|      6|#define RTPP_SW_VERSION (PACKAGE_VERSION "." VERSION_GIT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  210|      6|#define PACKAGE_VERSION "3.0-rc.1"
  |  |  |  |  ------------------
  |  |  |  |               #define RTPP_SW_VERSION (PACKAGE_VERSION "." VERSION_GIT)
  |  |  |  |  ------------------
  |  |  |  |  |  |  238|      6|#define VERSION_GIT "6dbdd9ce"
  |  |  |  |  ------------------
  |  |  ------------------
  |  |  |  Branch (195:3): [True: 6, False: 0]
  |  |  ------------------
  ------------------
  216|      0|        RTPP_LOG(log, RTPP_LOG_ERR, "incompatible API version in the %s, "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  216|      0|        RTPP_LOG(log, RTPP_LOG_ERR, "incompatible API version in the %s, "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  217|      0|          "consider recompiling the module", pvt->mpath);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  217|      0|          "consider recompiling the module", pvt->mpath);
  218|      0|        goto e2;
  219|      0|    }
  220|       |
  221|       |#if RTPP_CHECK_LEAKS
  222|       |    if (pvt->mip->memdeb_p == NULL) {
  223|       |        RTPP_LOG(log, RTPP_LOG_ERR, "memdeb pointer is NULL in the %s, "
  224|       |          "trying to load non-debug module?", pvt->mpath);
  225|       |        goto e2;
  226|       |    }
  227|       |    pvt->mip->_malloc = &rtpp_memdeb_malloc;
  228|       |    pvt->mip->_zmalloc = &rtpp_zmalloc_memdeb;
  229|       |    pvt->mip->_rzmalloc = &rtpp_rzmalloc_memdeb;
  230|       |    pvt->mip->_free = &rtpp_memdeb_free;
  231|       |    pvt->mip->_realloc = &rtpp_memdeb_realloc;
  232|       |    pvt->mip->_strdup = &rtpp_memdeb_strdup;
  233|       |    pvt->mip->_asprintf = &rtpp_memdeb_asprintf;
  234|       |    pvt->mip->_vasprintf = &rtpp_memdeb_vasprintf;
  235|       |    pvt->memdeb_p = rtpp_memdeb_init(false);
  236|       |    if (pvt->memdeb_p == NULL) {
  237|       |        goto e2;
  238|       |    }
  239|       |    rtpp_memdeb_setlog(pvt->memdeb_p, log);
  240|       |    rtpp_memdeb_setname(pvt->memdeb_p, pvt->mip->descr.name);
  241|       |    /* We make a copy, so that the module cannot screw us up */
  242|       |    *pvt->mip->memdeb_p = pvt->memdeb_p;
  243|       |#else
  244|      6|    if (pvt->mip->memdeb_p != NULL) {
  ------------------
  |  Branch (244:9): [True: 0, False: 6]
  ------------------
  245|      0|        RTPP_LOG(log, RTPP_LOG_ERR, "memdeb pointer is not NULL in the %s, "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  245|      0|        RTPP_LOG(log, RTPP_LOG_ERR, "memdeb pointer is not NULL in the %s, "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  246|      0|          "trying to load debug module?", pvt->mpath);
  247|      0|        goto e2;
  248|      0|    }
  249|      6|    pvt->mip->_malloc = &malloc;
  250|      6|    pvt->mip->_zmalloc = &rtpp_zmalloc;
  251|      6|    pvt->mip->_rzmalloc = &rtpp_rzmalloc;
  252|      6|    pvt->mip->_free = &free;
  253|      6|    pvt->mip->_realloc = &realloc;
  254|      6|    pvt->mip->_strdup = &strdup;
  255|      6|    pvt->mip->_asprintf = &asprintf;
  256|      6|    pvt->mip->_vasprintf = &vasprintf;
  257|      6|#endif
  258|      6|    pvt->mip->wthr.sigterm = rtpp_wi_malloc_sgnl(SIGTERM, NULL, 0);
  259|      6|    if (pvt->mip->wthr.sigterm == NULL) {
  ------------------
  |  Branch (259:9): [True: 0, False: 6]
  ------------------
  260|      0|        goto e3;
  261|      0|    }
  262|      6|    pvt->mip->wthr.mod_q = rtpp_queue_init(RTPQ_SMALL_CB_LEN, "rtpp_module_if(%s)",
  ------------------
  |  |   74|      6|#define RTPQ_SMALL_CB_LEN 16
  ------------------
  263|      6|      pvt->mip->descr.name);
  264|      6|    if (pvt->mip->wthr.mod_q == NULL) {
  ------------------
  |  Branch (264:9): [True: 0, False: 6]
  ------------------
  265|      0|        goto e4;
  266|      0|    }
  267|      6|    RTPP_OBJ_INCREF(log);
  ------------------
  |  |  151|      6|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      6|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      6|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      6|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      6|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      6|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      6|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      6|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      6|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      6|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      6|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      6|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      6|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      6|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      6|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      6|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      6|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      6|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      6|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      6|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      6|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      6|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      6|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      6|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      6|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      6|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  268|      6|    pvt->mip->log = log;
  269|      6|    if (pvt->mip->aapi != NULL) {
  ------------------
  |  Branch (269:9): [True: 2, False: 4]
  ------------------
  270|      2|        if (pvt->mip->aapi->on_session_end.func != NULL &&
  ------------------
  |  Branch (270:13): [True: 2, False: 0]
  ------------------
  271|      2|          pvt->mip->aapi->on_session_end.argsize != rtpp_acct_OSIZE()) {
  ------------------
  |  |   61|      2|#define rtpp_acct_OSIZE() (sizeof(struct rtpp_acct) + sizeof(struct rtpps_pcount) + \
  |  |   62|      2|  sizeof(struct rtpps_pcount) + sizeof(struct rtpp_pcnts_strm) + \
  |  |   63|      2|  sizeof(struct rtpp_pcnts_strm) + sizeof(struct rtpp_pcnts_strm) + \
  |  |   64|      2|  sizeof(struct rtpp_pcnts_strm) + sizeof(struct rtpa_stats) + \
  |  |   65|      2|  sizeof(struct rtpa_stats) + sizeof(struct rtpa_stats_jitter) + \
  |  |   66|      2|  sizeof(struct rtpa_stats_jitter))
  ------------------
  |  Branch (271:11): [True: 0, False: 2]
  ------------------
  272|      0|            RTPP_LOG(log, RTPP_LOG_ERR, "incompatible API version in the %s, "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  272|      0|            RTPP_LOG(log, RTPP_LOG_ERR, "incompatible API version in the %s, "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  273|      0|              "consider recompiling the module", pvt->mpath);
  274|      0|            goto e5;
  275|      0|        }
  276|      2|        if (pvt->mip->aapi->on_rtcp_rcvd.func != NULL &&
  ------------------
  |  Branch (276:13): [True: 0, False: 2]
  ------------------
  277|      2|          pvt->mip->aapi->on_rtcp_rcvd.argsize != rtpp_acct_rtcp_OSIZE()) {
  ------------------
  |  |   43|      0|#define rtpp_acct_rtcp_OSIZE() (sizeof(struct rtpp_acct_rtcp) + \
  |  |   44|      0|  sizeof(struct rtpa_stats_jitter))
  ------------------
  |  Branch (277:11): [True: 0, False: 0]
  ------------------
  278|      0|            RTPP_LOG(log, RTPP_LOG_ERR, "incompatible API version in the %s, "
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  278|      0|            RTPP_LOG(log, RTPP_LOG_ERR, "incompatible API version in the %s, "
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  279|      0|              "consider recompiling the module", pvt->mpath);
  280|      0|            goto e5;
  281|      0|        }
  282|      2|        self->has.do_acct = (pvt->mip->aapi->on_session_end.func != NULL);
  283|      2|    }
  284|      6|    self->has.ul_subc_h = (pvt->mip->capi != NULL &&
  ------------------
  |  Branch (284:28): [True: 4, False: 2]
  ------------------
  285|      6|      pvt->mip->capi->ul_subc_handle != NULL);
  ------------------
  |  Branch (285:7): [True: 4, False: 0]
  ------------------
  286|      6|    pvt->ids.instance_id = CALL_METHOD(cfsp->modules_cf, get_next_id,
  ------------------
  |  |   83|      6|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  287|      6|      pvt->mip->descr.module_id);
  288|      6|    pvt->mip->ids = self->ids = &pvt->ids;
  289|      6|    pvt->mip->module_rcnt = self->rcnt;
  290|      6|    self->descr = &(pvt->mip->descr);
  291|      6|    pvt->sessions_wrt = cfsp->sessions_wrt;
  292|       |
  293|      6|    return (0);
  294|      0|e5:
  295|      0|    RTPP_OBJ_DECREF(pvt->mip->log);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  296|      0|    rtpp_queue_destroy(pvt->mip->wthr.mod_q);
  297|      0|    pvt->mip->wthr.mod_q = NULL;
  298|       |#if RTPP_CHECK_LEAKS
  299|       |    if (rtpp_memdeb_dumpstats(pvt->memdeb_p, 1) != 0) {
  300|       |        RTPP_LOG(log, RTPP_LOG_ERR, "module '%s' leaked memory in the failed "
  301|       |          "constructor", pvt->mip->descr.name);
  302|       |    }
  303|       |#endif
  304|      0|e4:
  305|      0|    RTPP_OBJ_DECREF(pvt->mip->wthr.sigterm);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  306|      0|    pvt->mip->wthr.sigterm = NULL;
  307|      0|e3:
  308|       |#if RTPP_CHECK_LEAKS
  309|       |    rtpp_memdeb_dtor(pvt->memdeb_p);
  310|       |#endif
  311|      0|e2:
  312|      0|    if (pvt->dmp != NULL)
  ------------------
  |  Branch (312:9): [True: 0, False: 0]
  ------------------
  313|      0|        dlclose(pvt->dmp);
  314|      0|    pvt->mip = NULL;
  315|      0|e1:
  316|      0|    return (-1);
  317|      0|}
rtpp_module_if.c:rtpp_mif_construct:
  449|      6|{
  450|      6|    struct rtpp_module_if_priv *pvt;
  451|       |
  452|      6|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  453|      6|    if (pvt->mip->proc.ctor != NULL) {
  ------------------
  |  Branch (453:9): [True: 6, False: 0]
  ------------------
  454|      6|        pvt->mpvt = pvt->mip->proc.ctor(cfsp);
  455|      6|        if (pvt->mpvt == NULL) {
  ------------------
  |  Branch (455:13): [True: 0, False: 6]
  ------------------
  456|      0|            RTPP_LOG(pvt->mip->log, RTPP_LOG_ERR, "module '%s' failed to initialize",
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  456|      0|            RTPP_LOG(pvt->mip->log, RTPP_LOG_ERR, "module '%s' failed to initialize",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  457|      0|              pvt->mip->descr.name);
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  457|      0|              pvt->mip->descr.name);
  458|      0|            return (-1);
  459|      0|        }
  460|      6|    }
  461|      6|    if (pvt->mip->proc.config != NULL) {
  ------------------
  |  Branch (461:9): [True: 0, False: 6]
  ------------------
  462|      0|        if (pvt->mip->proc.config(pvt->mpvt) != 0) {
  ------------------
  |  Branch (462:13): [True: 0, False: 0]
  ------------------
  463|      0|            RTPP_LOG(pvt->mip->log, RTPP_LOG_ERR, "%p->config() method has failed: %s",
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  463|      0|            RTPP_LOG(pvt->mip->log, RTPP_LOG_ERR, "%p->config() method has failed: %s",
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  464|      0|              self, pvt->mip->descr.name);
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  464|      0|              self, pvt->mip->descr.name);
  465|      0|            if (pvt->mip->proc.dtor != NULL) {
  ------------------
  |  Branch (465:17): [True: 0, False: 0]
  ------------------
  466|      0|                pvt->mip->proc.dtor(pvt->mpvt);
  467|      0|            }
  468|      0|            return (-1);
  469|      0|        }
  470|      0|    }
  471|      6|    return (0);
  472|      6|}
rtpp_module_if.c:rtpp_mif_start:
  476|      6|{
  477|      6|    struct rtpp_module_if_priv *pvt;
  478|       |
  479|      6|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  480|      6|    if (pvt->mip->aapi == NULL && pvt->mip->wapi == NULL)
  ------------------
  |  Branch (480:9): [True: 4, False: 2]
  |  Branch (480:35): [True: 0, False: 4]
  ------------------
  481|      0|        return (0);
  482|      6|    if (pvt->mip->aapi != NULL) {
  ------------------
  |  Branch (482:9): [True: 2, False: 4]
  ------------------
  483|      2|        if (pvt->mip->aapi->on_rtcp_rcvd.func != NULL) {
  ------------------
  |  Branch (483:13): [True: 0, False: 2]
  ------------------
  484|      0|            struct packet_processor_if acct_rtcp_poi = {
  485|      0|                .descr = "acct_rtcp",
  486|      0|                .taste = packet_is_rtcp,
  487|      0|                .enqueue = acct_rtcp_enqueue,
  488|      0|                .arg = pvt
  489|      0|            };
  490|      0|            if (CALL_SMETHOD(cfsp->pproc_manager, reg, PPROC_ORD_WITNESS, &acct_rtcp_poi) < 0)
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  |  Branch (490:17): [True: 0, False: 0]
  ------------------
  491|      0|                return (-1);
  492|      0|        }
  493|      2|        if (pthread_create(&pvt->mip->wthr.thread_id, NULL,
  ------------------
  |  Branch (493:13): [True: 0, False: 2]
  ------------------
  494|      2|          PTH_CB(&rtpp_mif_run_acct), pvt) != 0) {
  ------------------
  |  |  445|      2|#define PTH_CB(x) ((void *(*)(void *))(x))
  ------------------
  495|      0|            return (-1);
  496|      0|        }
  497|      4|    } else {
  498|      4|        pvt->mip->wthr.mpvt = pvt->mpvt;
  499|      4|        if (pthread_create(&pvt->mip->wthr.thread_id, NULL,
  ------------------
  |  Branch (499:13): [True: 0, False: 4]
  ------------------
  500|      4|          PTH_CB(pvt->mip->wapi->main_thread), &pvt->mip->wthr) != 0) {
  ------------------
  |  |  445|      4|#define PTH_CB(x) ((void *(*)(void *))(x))
  ------------------
  501|      0|            return (-1);
  502|      0|        }
  503|      4|    }
  504|       |#if HAVE_PTHREAD_SETNAME_NP
  505|       |    (void)pthread_setname_np(pvt->mip->wthr.thread_id, pvt->mip->descr.name);
  506|       |#endif
  507|      6|    pvt->started = 1;
  508|      6|    return (0);
  509|      6|}
rtpp_module_if.c:rtpp_mif_run_acct:
  371|      2|{
  372|      2|    struct rtpp_module_if_priv *pvt;
  373|      2|    struct rtpp_wi *wi;
  374|      2|    int signum;
  375|      2|    const char *aname;
  376|      2|    const struct rtpp_acct_handlers *aap;
  377|       |
  378|      2|    pvt = (struct rtpp_module_if_priv *)argp;
  379|      2|    aap = pvt->mip->aapi;
  380|      2|    for (;;) {
  381|      2|        wi = rtpp_queue_get_item(pvt->mip->wthr.mod_q, 0);
  382|      2|        if (rtpp_wi_get_type(wi) == RTPP_WI_TYPE_SGNL) {
  ------------------
  |  |   36|      2|#define rtpp_wi_get_type(wip) ((wip)->wi_type)
  ------------------
  |  Branch (382:13): [True: 0, False: 2]
  ------------------
  383|      0|            signum = rtpp_wi_sgnl_get_signum(wi);
  384|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  385|      0|            if (signum == SIGTERM) {
  ------------------
  |  Branch (385:17): [True: 0, False: 0]
  ------------------
  386|      0|                break;
  387|      0|            }
  388|      0|            continue;
  389|      0|        }
  390|      2|        aname = rtpp_wi_apis_getname(wi);
  391|      2|        if (aname == do_acct_aname) {
  ------------------
  |  Branch (391:13): [True: 0, False: 2]
  ------------------
  392|      0|            struct rtpp_acct *rap;
  393|       |
  394|      0|            rtpp_wi_apis_getnamearg(wi, (void **)&rap, sizeof(rap));
  395|      0|            if (aap->on_session_end.func != NULL)
  ------------------
  |  Branch (395:17): [True: 0, False: 0]
  ------------------
  396|      0|                aap->on_session_end.func(pvt->mpvt, rap);
  397|      0|            RTPP_OBJ_DECREF(rap);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  398|      0|        }
  399|      2|        if (aname == do_acct_rtcp_aname) {
  ------------------
  |  Branch (399:13): [True: 0, False: 2]
  ------------------
  400|      0|            struct rtpp_acct_rtcp *rapr;
  401|       |
  402|      0|            rtpp_wi_apis_getnamearg(wi, (void **)&rapr, sizeof(rapr));
  403|      0|            if (aap->on_rtcp_rcvd.func != NULL)
  ------------------
  |  Branch (403:17): [True: 0, False: 0]
  ------------------
  404|      0|                aap->on_rtcp_rcvd.func(pvt->mpvt, rapr);
  405|      0|            RTPP_OBJ_DECREF(rapr);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  406|      0|        }
  407|      2|        RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      2|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      2|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  408|      2|    }
  409|      2|}
rtpp_module_if.c:rtpp_mif_get_mconf:
  513|      6|{
  514|      6|    struct rtpp_module_if_priv *pvt;
  515|      6|    struct rtpp_module_conf *rval;
  516|       |
  517|      6|    PUB2PVT(self, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  518|      6|    if (pvt->mip->proc.get_mconf == NULL) {
  ------------------
  |  Branch (518:9): [True: 6, False: 0]
  ------------------
  519|      6|        *mcpp = NULL;
  520|      6|        return (0);
  521|      6|    }
  522|      0|    rval = pvt->mip->proc.get_mconf();
  523|      0|    if (rval == NULL) {
  ------------------
  |  Branch (523:9): [True: 0, False: 0]
  ------------------
  524|      0|        return (-1);
  525|      0|    }
  526|      0|    *mcpp = rval;
  527|      0|    return (0);
  528|      0|}

rtpp_static_modules_lookup:
   46|     12|{
   47|       |
   48|     32|    for (int i = 0; rtpp_modules.all[i] != NULL; i++) {
  ------------------
  |  Branch (48:21): [True: 32, False: 0]
  ------------------
   49|     32|        if (strcmp(rtpp_modules.all[i]->descr.name, name) == 0) {
  ------------------
  |  Branch (49:13): [True: 12, False: 20]
  ------------------
   50|     12|             return (rtpp_modules.all[i]);
   51|     12|        }
   52|     32|    }
   53|      0|    return (NULL);
   54|     12|}

rtpp_anetio_pump:
  208|      2|{
  209|       |
  210|      2|    rtpp_queue_pump(netio_cf->args[0].out_q);
  211|      2|}
rtpp_netio_async_init:
  278|      2|{
  279|      2|    struct rtpp_anetio_cf *netio_cf;
  280|      2|    int i, ri;
  281|       |
  282|      2|    netio_cf = rtpp_zmalloc(sizeof(*netio_cf));
  283|      2|    if (netio_cf == NULL)
  ------------------
  |  Branch (283:9): [True: 0, False: 2]
  ------------------
  284|      0|        return (NULL);
  285|       |
  286|      4|    for (i = 0; i < SEND_THREADS; i++) {
  ------------------
  |  |   78|      4|#define SEND_THREADS 1
  ------------------
  |  Branch (286:17): [True: 2, False: 2]
  ------------------
  287|      2|        netio_cf->args[i].out_q = rtpp_queue_init(RTPQ_LARGE_CB_LEN, "RTPP->NET%.2d", i);
  ------------------
  |  |   75|      2|#define RTPQ_LARGE_CB_LEN 1024
  ------------------
  288|      2|        if (netio_cf->args[i].out_q == NULL) {
  ------------------
  |  Branch (288:13): [True: 0, False: 2]
  ------------------
  289|      0|            for (ri = i - 1; ri >= 0; ri--) {
  ------------------
  |  Branch (289:30): [True: 0, False: 0]
  ------------------
  290|      0|                rtpp_queue_destroy(netio_cf->args[ri].out_q);
  291|      0|                RTPP_OBJ_DECREF(netio_cf->args[ri].glog);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  292|      0|            }
  293|      0|            goto e0;
  294|      0|        }
  295|      2|        rtpp_queue_setqlen(netio_cf->args[i].out_q, qlen);
  296|      2|        RTPP_OBJ_INCREF(cfsp->glog);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  297|      2|        netio_cf->args[i].glog = cfsp->glog;
  298|      2|        netio_cf->args[i].dmode = cfsp->dmode;
  299|       |#if RTPP_DEBUG_timers
  300|       |        recfilter_init(&netio_cf->args[i].average_load, 0.9, 0.0, 0);
  301|       |#endif
  302|      2|    }
  303|       |
  304|      4|    for (i = 0; i < SEND_THREADS; i++) {
  ------------------
  |  |   78|      4|#define SEND_THREADS 1
  ------------------
  |  Branch (304:17): [True: 2, False: 2]
  ------------------
  305|      2|        netio_cf->args[i].sigterm = rtpp_wi_malloc_sgnl(SIGTERM, NULL, 0);
  306|      2|        if (netio_cf->args[i].sigterm == NULL) {
  ------------------
  |  Branch (306:13): [True: 0, False: 2]
  ------------------
  307|      0|            for (ri = i - 1; ri >= 0; ri--) {
  ------------------
  |  Branch (307:30): [True: 0, False: 0]
  ------------------
  308|      0|                RTPP_OBJ_DECREF(netio_cf->args[ri].sigterm);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  309|      0|            }
  310|      0|            goto e1;
  311|      0|        }
  312|      2|    }
  313|       |
  314|      4|    for (i = 0; i < SEND_THREADS; i++) {
  ------------------
  |  |   78|      4|#define SEND_THREADS 1
  ------------------
  |  Branch (314:17): [True: 2, False: 2]
  ------------------
  315|      2|        if (pthread_create(&(netio_cf->thread_id[i]), NULL, (void *(*)(void *))&rtpp_anetio_sthread, &netio_cf->args[i]) != 0) {
  ------------------
  |  Branch (315:13): [True: 0, False: 2]
  ------------------
  316|      0|             for (ri = i - 1; ri >= 0; ri--) {
  ------------------
  |  Branch (316:31): [True: 0, False: 0]
  ------------------
  317|      0|                 rtpp_queue_put_item(netio_cf->args[ri].sigterm, netio_cf->args[ri].out_q);
  318|      0|                 pthread_join(netio_cf->thread_id[ri], NULL);
  319|      0|             }
  320|      0|             for (ri = i; ri < SEND_THREADS; ri++) {
  ------------------
  |  |   78|      0|#define SEND_THREADS 1
  ------------------
  |  Branch (320:27): [True: 0, False: 0]
  ------------------
  321|      0|                 RTPP_OBJ_DECREF(netio_cf->args[ri].sigterm);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  322|      0|             }
  323|      0|             goto e1;
  324|      0|        }
  325|       |#if HAVE_PTHREAD_SETNAME_NP
  326|       |        (void)pthread_setname_np(netio_cf->thread_id[i], "rtpp_anetio_sender");
  327|       |#endif
  328|      2|    }
  329|       |
  330|      2|    return (netio_cf);
  331|       |
  332|       |#if 0
  333|       |e2:
  334|       |    for (i = 0; i < SEND_THREADS; i++) {
  335|       |        RTPP_OBJ_DECREF(netio_cf->args[i].sigterm);
  336|       |    }
  337|       |#endif
  338|      0|e1:
  339|      0|    for (i = 0; i < SEND_THREADS; i++) {
  ------------------
  |  |   78|      0|#define SEND_THREADS 1
  ------------------
  |  Branch (339:17): [True: 0, False: 0]
  ------------------
  340|      0|        rtpp_queue_destroy(netio_cf->args[i].out_q);
  341|      0|        RTPP_OBJ_DECREF(netio_cf->args[i].glog);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  342|      0|    }
  343|      0|e0:
  344|      0|    free(netio_cf);
  345|      0|    return (NULL);
  346|      0|}
rtpp_netio_async.c:rtpp_anetio_sthread:
   90|      2|{
   91|      2|    int n, nsend, i, send_errno, nretry;
   92|      2|    struct rtpp_wi *wi, *wis[RTPQ_LARGE_CB_LEN / 8];
   93|      2|    struct rtpp_wi_pvt *wipp;
   94|       |#if RTPP_DEBUG_timers
   95|       |    double tp[3], runtime, sleeptime;
   96|       |    long run_n;
   97|       |
   98|       |    runtime = sleeptime = 0.0;
   99|       |    run_n = 0;
  100|       |    tp[0] = getdtime();
  101|       |#endif
  102|      2|    for (;;) {
  103|      2|        nsend = rtpp_queue_get_items(args->out_q, wis, RTPP_ANETIO_BATCH_LEN, 0);
  ------------------
  |  |   86|      2|#define RTPP_ANETIO_BATCH_LEN (RTPQ_LARGE_CB_LEN / 8)
  |  |  ------------------
  |  |  |  |   75|      2|#define RTPQ_LARGE_CB_LEN 1024
  |  |  ------------------
  ------------------
  104|       |#if RTPP_DEBUG_timers
  105|       |        tp[1] = getdtime();
  106|       |#endif
  107|       |
  108|      2|        for (i = 0; i < nsend; i++) {
  ------------------
  |  Branch (108:21): [True: 0, False: 2]
  ------------------
  109|      0|	    wi = wis[i];
  110|      0|            PUB2PVT(wi, wipp);
  ------------------
  |  |  147|      0|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  111|      0|            if (wi->wi_type == RTPP_WI_TYPE_SGNL) {
  ------------------
  |  Branch (111:17): [True: 0, False: 0]
  ------------------
  112|      0|                RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  113|      0|                goto out;
  114|      0|            }
  115|      0|            nretry = 0;
  116|      0|            do {
  117|      0|                n = sendto(wipp->sock, wipp->msg, wipp->msg_len, wipp->flags,
  118|      0|                  wipp->sendto, wipp->tolen);
  119|      0|                send_errno = (n < 0) ? errno : 0;
  ------------------
  |  Branch (119:30): [True: 0, False: 0]
  ------------------
  120|       |#if RTPP_DEBUG_netio >= 1
  121|       |                if (wipp->debug != 0) {
  122|       |                    char daddr[MAX_AP_STRBUF];
  123|       |
  124|       |                    addrport2char_r(wipp->sendto, daddr, sizeof(daddr), ':');
  125|       |                    if (n < 0) {
  126|       |                        RTPP_ELOG(wipp->log, RTPP_LOG_DBUG,
  127|       |                          "sendto(%d, %p, %lld, %d, %p (%s), %d) = %d",
  128|       |                          wipp->sock, wipp->msg, (long long)wipp->msg_len, wipp->flags,
  129|       |                          wipp->sendto, daddr, wipp->tolen, n);
  130|       |                    } else if (n < wipp->msg_len) {
  131|       |                        RTPP_LOG(wipp->log, RTPP_LOG_DBUG,
  132|       |                          "sendto(%d, %p, %lld, %d, %p (%s), %d) = %d: short write",
  133|       |                          wipp->sock, wipp->msg, (long long)wipp->msg_len, wipp->flags,
  134|       |                          wipp->sendto, daddr, wipp->tolen, n);
  135|       |#if RTPP_DEBUG_netio >= 2
  136|       |                    } else {
  137|       |                        RTPP_LOG(wipp->log, RTPP_LOG_DBUG,
  138|       |                          "sendto(%d, %p, %d, %d, %p (%s), %d) = %d",
  139|       |                          wipp->sock, wipp->msg, wipp->msg_len, wipp->flags, wipp->sendto, daddr,
  140|       |                          wipp->tolen, n);
  141|       |#endif
  142|       |                    }
  143|       |                }
  144|       |#endif
  145|      0|                if (n >= 0) {
  ------------------
  |  Branch (145:21): [True: 0, False: 0]
  ------------------
  146|      0|                    wipp->nsend--;
  147|      0|                } else {
  148|       |                    /* "EPERM" is Linux thing, yield and retry */
  149|      0|                    if ((send_errno == EPERM || send_errno == ENOBUFS)
  ------------------
  |  Branch (149:26): [True: 0, False: 0]
  |  Branch (149:49): [True: 0, False: 0]
  ------------------
  150|      0|                      && nretry < RTPP_ANETIO_MAX_RETRY) {
  ------------------
  |  |   85|      0|#define RTPP_ANETIO_MAX_RETRY 3
  ------------------
  |  Branch (150:26): [True: 0, False: 0]
  ------------------
  151|      0|                        sched_yield();
  152|      0|                        nretry++;
  153|      0|                    } else {
  154|      0|                        break;
  155|      0|                    }
  156|      0|                }
  157|      0|            } while (wipp->nsend > 0);
  ------------------
  |  Branch (157:22): [True: 0, False: 0]
  ------------------
  158|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  159|      0|        }
  160|       |#if RTPP_DEBUG_timers
  161|       |        sleeptime += tp[1] - tp[0];
  162|       |        tp[0] = getdtime();
  163|       |        runtime += tp[0] - tp[1];
  164|       |        if ((run_n % 10000) == 0) {
  165|       |            RTPP_LOG(args->glog, RTPP_LOG_DBUG, "rtpp_anetio_sthread(%p): run %ld aload = %f filtered = %f", \
  166|       |              args, run_n, runtime / (runtime + sleeptime), args->average_load.lastval);
  167|       |        }
  168|       |        if (runtime + sleeptime > 1.0) {
  169|       |            recfilter_apply(&args->average_load, runtime / (runtime + sleeptime));
  170|       |            runtime = sleeptime = 0.0;
  171|       |        }
  172|       |        run_n += 1;
  173|       |#endif
  174|      2|    }
  175|      2|out:
  176|      0|    return;
  177|      2|}

ishostseq:
   51|  48.1M|{
   52|       |
   53|  48.1M|    if (ia1->sa_family != ia2->sa_family)
  ------------------
  |  Branch (53:9): [True: 20.0M, False: 28.0M]
  ------------------
   54|  20.0M|	return 0;
   55|       |
   56|  28.0M|    switch (ia1->sa_family) {
   57|  28.0M|    case AF_INET:
  ------------------
  |  Branch (57:5): [True: 28.0M, False: 24.8k]
  ------------------
   58|  28.0M|	return (satosin(ia1)->sin_addr.s_addr ==
  ------------------
  |  |   76|  28.0M|#define	satosin(sa)	((struct sockaddr_in *)(sa))
  ------------------
   59|  28.0M|	  satosin(ia2)->sin_addr.s_addr);
  ------------------
  |  |   76|  28.0M|#define	satosin(sa)	((struct sockaddr_in *)(sa))
  ------------------
   60|       |
   61|  24.8k|    case AF_INET6:
  ------------------
  |  Branch (61:5): [True: 24.8k, False: 28.0M]
  ------------------
   62|  24.8k|	return (memcmp(&satosin6(ia1)->sin6_addr.s6_addr[0],
  ------------------
  |  |   79|  24.8k|#define	satosin6(sa)	((struct sockaddr_in6 *)(sa))
  ------------------
   63|  24.8k|	  &satosin6(ia2)->sin6_addr.s6_addr[0],
  ------------------
  |  |   79|  24.8k|#define	satosin6(sa)	((struct sockaddr_in6 *)(sa))
  ------------------
   64|  24.8k|	  sizeof(struct in6_addr)) == 0);
   65|       |
   66|      0|    default:
  ------------------
  |  Branch (66:5): [True: 0, False: 28.0M]
  ------------------
   67|      0|	break;
   68|  28.0M|    }
   69|       |    /* Can't happen */
   70|      0|    abort();
   71|  28.0M|}
ishostnull:
   75|    195|{
   76|    195|    struct in6_addr *ap;
   77|       |
   78|    195|    switch (ia->sa_family) {
   79|     27|    case AF_INET:
  ------------------
  |  Branch (79:5): [True: 27, False: 168]
  ------------------
   80|     27|	return (satosin(ia)->sin_addr.s_addr == INADDR_ANY);
  ------------------
  |  |   76|     27|#define	satosin(sa)	((struct sockaddr_in *)(sa))
  ------------------
   81|       |
   82|    168|    case AF_INET6:
  ------------------
  |  Branch (82:5): [True: 168, False: 27]
  ------------------
   83|    168|	ap = &satosin6(ia)->sin6_addr;
  ------------------
  |  |   79|    168|#define	satosin6(sa)	((struct sockaddr_in6 *)(sa))
  ------------------
   84|    168|	return ((*(const uint32_t *)(const void *)(&ap->s6_addr[0]) == 0) &&
  ------------------
  |  Branch (84:10): [True: 119, False: 49]
  ------------------
   85|    168|		(*(const uint32_t *)(const void *)(&ap->s6_addr[4]) == 0) &&
  ------------------
  |  Branch (85:3): [True: 73, False: 46]
  ------------------
   86|    168|		(*(const uint32_t *)(const void *)(&ap->s6_addr[8]) == 0) &&
  ------------------
  |  Branch (86:3): [True: 24, False: 49]
  ------------------
   87|    168|		(*(const uint32_t *)(const void *)(&ap->s6_addr[12]) == 0));
  ------------------
  |  Branch (87:3): [True: 1, False: 23]
  ------------------
   88|       |
   89|      0|    default:
  ------------------
  |  Branch (89:5): [True: 0, False: 195]
  ------------------
   90|      0|	break;
   91|    195|    }
   92|       |
   93|      0|    abort();
   94|    195|}
resolve:
  222|   235k|{
  223|   235k|    int n;
  224|   235k|    struct addrinfo hints, *res;
  225|       |
  226|   235k|    memset(&hints, 0, sizeof(hints));
  227|   235k|    hints.ai_flags = flags;	     /* We create listening sockets */
  228|   235k|    hints.ai_family = pf;	       /* Protocol family */
  229|   235k|    hints.ai_socktype = SOCK_DGRAM;     /* UDP */
  230|       |
  231|   235k|    n = getaddrinfo(host, servname, &hints, &res);
  232|   235k|    if (n == 0) {
  ------------------
  |  Branch (232:9): [True: 235k, False: 311]
  ------------------
  233|       |	/* Use the first socket address returned */
  234|   235k|	memcpy(ia, res->ai_addr, res->ai_addrlen);
  235|   235k|	freeaddrinfo(res);
  236|   235k|    }
  237|       |
  238|   235k|    return n;
  239|   235k|}
local4remote:
  293|    139|{
  294|    139|    int s, r;
  295|    139|    socklen_t llen;
  296|       |
  297|    139|    s = socket(ra->sa_family, SOCK_DGRAM, 0);
  298|    139|    if (s == -1) {
  ------------------
  |  Branch (298:9): [True: 0, False: 139]
  ------------------
  299|      0|        return (-1);
  300|      0|    }
  301|    139|    if (connect(s, ra, SA_LEN(ra)) == -1) {
  ------------------
  |  |   62|    139|   (((sa)->sa_family == AF_INET) ? \
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 138, False: 1]
  |  |  ------------------
  |  |   63|    139|   sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
  ------------------
  |  Branch (301:9): [True: 1, False: 138]
  ------------------
  302|      1|        close(s);
  303|      1|        return (-1);
  304|      1|    }
  305|    138|    llen = sizeof(*la);
  306|    138|    r = getsockname(s, sstosa(la), &llen);
  ------------------
  |  |   82|    138|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  307|    138|    close(s);
  308|    138|    return (r);
  309|    139|}
extractaddr:
  313|   235k|{
  314|   235k|    const char *t;
  315|   235k|    int tpf;
  316|       |
  317|   235k|    if (*str != '[') {
  ------------------
  |  Branch (317:9): [True: 235k, False: 393]
  ------------------
  318|   235k|	tpf = AF_INET;
  319|   484k|	for (t = str; *str != '\0'; str++) {
  ------------------
  |  Branch (319:16): [True: 484k, False: 211]
  ------------------
  320|   484k|	    if (!isdigit(*str) && *str != '.')
  ------------------
  |  Branch (320:10): [True: 240k, False: 243k]
  |  Branch (320:28): [True: 234k, False: 6.03k]
  ------------------
  321|   234k|		break;
  322|   484k|	}
  323|   235k|    } else {
  324|    393|	tpf = AF_INET6;
  325|    393|	str++;
  326|  8.86k|	for (t = str; *str != '\0'; str++) {
  ------------------
  |  Branch (326:16): [True: 8.86k, False: 5]
  ------------------
  327|  8.86k|	    if (!isxdigit(*str) && *str != ':')
  ------------------
  |  Branch (327:10): [True: 3.44k, False: 5.41k]
  |  Branch (327:29): [True: 388, False: 3.06k]
  ------------------
  328|    388|		break;
  329|  8.86k|	}
  330|    393|	if (*str != ']')
  ------------------
  |  Branch (330:6): [True: 22, False: 371]
  ------------------
  331|     22|	    return (-1);
  332|    393|    }
  333|   235k|    if (t == str)
  ------------------
  |  Branch (333:9): [True: 91, False: 235k]
  ------------------
  334|     91|	return (-1);
  335|   235k|    if (tpf == AF_INET6)
  ------------------
  |  Branch (335:9): [True: 364, False: 234k]
  ------------------
  336|    364|	*end = (char *)(str + 1);
  337|   234k|    else
  338|   234k|	*end = (char *)str;
  339|   235k|    *pf = tpf;
  340|   235k|    *begin = (char *)t;
  341|   235k|    return(str - t);
  342|   235k|}

rtpp_nofile_ctor:
   64|      2|{
   65|      2|    struct rtpp_nofile_pvt *priv;
   66|       |
   67|      2|    priv = rtpp_zmalloc(sizeof(*priv));
   68|      2|    if (priv == NULL)
  ------------------
  |  Branch (68:9): [True: 0, False: 2]
  ------------------
   69|      0|        return (NULL);
   70|      2|    if (getrlimit(RLIMIT_NOFILE, &(priv->limit_storage)) != 0)
  ------------------
  |  Branch (70:9): [True: 0, False: 2]
  ------------------
   71|      0|        err(1, "getrlimit");
   72|      2|    atomic_init(&(priv->pub.warned), 0);
   73|      2|    priv->pub.dtor = rtpp_nofile_dtor;
   74|      2|    priv->pub.limit = &(priv->limit_storage);
   75|      2|    return (&(priv->pub));
   76|      2|}

rtpp_notify_ctor:
  111|      2|{
  112|      2|    struct rtpp_notify_priv *pvt;
  113|       |
  114|      2|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_notify_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  115|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (115:9): [True: 0, False: 2]
  ------------------
  116|      0|        goto e0;
  117|      0|    }
  118|      2|    pvt->nqueue = rtpp_queue_init(RTPQ_SMALL_CB_LEN, "rtpp_notify");
  ------------------
  |  |   74|      2|#define RTPQ_SMALL_CB_LEN 16
  ------------------
  119|      2|    if (pvt->nqueue == NULL) {
  ------------------
  |  Branch (119:9): [True: 0, False: 2]
  ------------------
  120|      0|        goto e1;
  121|      0|    }
  122|       |
  123|       |    /* Pre-allocate sigterm, so that we don't have any malloc() in dtor() */
  124|      2|    pvt->sigterm = rtpp_wi_malloc_sgnl(SIGTERM, NULL, 0);
  125|      2|    if (pvt->sigterm == NULL) {
  ------------------
  |  Branch (125:9): [True: 0, False: 2]
  ------------------
  126|      0|        goto e2;
  127|      0|    }
  128|       |
  129|      2|    if (pthread_create(&pvt->thread_id, NULL, (void *(*)(void *))&rtpp_notify_queue_run, pvt) != 0) {
  ------------------
  |  Branch (129:9): [True: 0, False: 2]
  ------------------
  130|      0|        goto e3;
  131|      0|    }
  132|       |#if HAVE_PTHREAD_SETNAME_NP
  133|       |    (void)pthread_setname_np(pvt->thread_id, "rtpp_notify_queue");
  134|       |#endif
  135|       |
  136|      2|    RTPP_OBJ_INCREF(glog);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|      2|    pvt->glog = glog;
  138|      2|    pvt->pub.schedule = &rtpp_notify_schedule;
  139|       |
  140|      2|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_notify_dtor,
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  141|      2|      pvt);
  142|      2|    return (&pvt->pub);
  143|       |
  144|      0|e3:
  145|      0|    RTPP_OBJ_DECREF(pvt->sigterm);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  146|      0|e2:
  147|      0|    rtpp_queue_destroy(pvt->nqueue);
  148|      0|e1:
  149|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  150|      0|    free(pvt);
  151|      0|e0:
  152|      0|    return (NULL);
  153|      0|}
rtpp_notify.c:rtpp_notify_queue_run:
   86|      2|{
   87|      2|    struct rtpp_wi *wi;
   88|      2|    struct rtpp_notify_wi *wi_data;
   89|      2|    struct rtpp_notify_priv *pvt;
   90|       |
   91|      2|    pvt = (struct rtpp_notify_priv *)arg;
   92|      2|    for (;;) {
   93|      2|        wi = rtpp_queue_get_item(pvt->nqueue, 0);
   94|      2|        if (rtpp_wi_get_type(wi) == RTPP_WI_TYPE_SGNL) {
  ------------------
  |  |   36|      2|#define rtpp_wi_get_type(wip) ((wip)->wi_type)
  ------------------
  |  Branch (94:13): [True: 0, False: 2]
  ------------------
   95|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   96|      0|            break;
   97|      0|        }
   98|      2|        wi_data = rtpp_wi_data_get_ptr(wi, sizeof(struct rtpp_notify_wi), 0);
   99|       |
  100|       |        /* main work here */
  101|      2|        do_notification(wi_data, 3);
  102|       |
  103|       |        /* deallocate wi */
  104|      2|        RTPP_OBJ_DECREF(wi_data->glog);
  ------------------
  |  |  152|      2|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      2|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  105|      2|        RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      2|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      2|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  106|      2|    }
  107|      2|}

rtpp_pearson_shuffle:
   37|     10|{
   38|     10|    int i;
   39|     10|    uint8_t rval;
   40|       |
   41|     10|    memset(rpp->rand_table, '\0', sizeof(rpp->rand_table));
   42|  2.56k|    for (i = 1; i < 256; i++) {
  ------------------
  |  Branch (42:17): [True: 2.55k, False: 10]
  ------------------
   43|  13.3k|        do {
   44|  13.3k|            rval = random() & 0xff;
   45|  13.3k|        } while (rpp->rand_table[rval] != 0);
  ------------------
  |  Branch (45:18): [True: 10.7k, False: 2.55k]
  ------------------
   46|  2.55k|        rpp->rand_table[rval] = i;
   47|  2.55k|    }
   48|     10|}
rtpp_pearson_hash8:
   52|  1.12k|{
   53|  1.12k|    uint8_t res;
   54|       |
   55|  19.8k|    for (res = rpp->rand_table[0]; bp[0] != '\0' && bp != ep; bp++) {
  ------------------
  |  Branch (55:36): [True: 18.7k, False: 1.12k]
  |  Branch (55:53): [True: 18.7k, False: 0]
  ------------------
   56|  18.7k|        res = rpp->rand_table[res ^ (uint8_t)(bp[0])];
   57|  18.7k|    }
   58|  1.12k|    return res;
   59|  1.12k|}

rtpp_pearson_perfect_ctor:
   80|      2|{
   81|      2|    struct rtpp_pearson_perfect_priv *rppp;
   82|      2|    struct rtpp_pearson_perfect *pub;
   83|       |
   84|      2|    rppp = rtpp_rzmalloc(sizeof(struct rtpp_pearson_perfect_priv), PVT_RCOFFS(rppp));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   85|      2|    if (rppp == NULL) {
  ------------------
  |  Branch (85:9): [True: 0, False: 2]
  ------------------
   86|      0|        return (NULL);
   87|      0|    }
   88|      2|    rppp->gv = gv;
   89|      2|    rppp->gv_arg = gv_arg;
   90|      2|    pub = &rppp->pub;
   91|       |
   92|      2|    compute_perfect_hash(rppp);
   93|      2|    PUBINST_FININIT(pub, rppp, rtpp_pearson_perfect_dtor);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
   94|      2|    return(pub);
   95|      2|}
rtpp_pearson_perfect.c:rtpp_pearson_perfect_hash:
   99|    899|{
  100|    899|    int rval;
  101|    899|    const char *sval;
  102|    899|    struct rtpp_pearson_perfect_priv *rppp;
  103|       |
  104|    899|    PUB2PVT(self, rppp);
  ------------------
  |  |  147|    899|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  105|    899|    rval = (int)(rppp->omap_table[rtpp_pearson_hash8(&rppp->rp, isval, NULL)]) - 1;
  106|    899|    if (rval == -1) {
  ------------------
  |  Branch (106:9): [True: 73, False: 826]
  ------------------
  107|     73|        return (-1);
  108|     73|    }
  109|    826|    sval = rppp->gv(rppp->gv_arg, rval);
  110|    826|    if (strcmp(isval, sval) != 0) {
  ------------------
  |  Branch (110:9): [True: 10, False: 816]
  ------------------
  111|     10|        return (-1);
  112|     10|    }
  113|    816|    return (rval);
  114|    826|}
rtpp_pearson_perfect.c:compute_perfect_hash:
   59|      2|{
   60|      2|    int i;
   61|      2|    const char *sval;
   62|      2|    uint8_t hval;
   63|       |
   64|     10|again:
   65|     10|    rtpp_pearson_shuffle(&rppp->rp);
   66|     10|    memset(rppp->omap_table, '\0', sizeof(rppp->omap_table));
   67|       |
   68|    226|    for (i = 0; rppp->gv(rppp->gv_arg, i) != NULL; i++) {
  ------------------
  |  Branch (68:17): [True: 224, False: 2]
  ------------------
   69|    224|        sval = rppp->gv(rppp->gv_arg, i);
   70|    224|        hval = rtpp_pearson_hash8(&rppp->rp, sval, NULL);
   71|    224|        if (rppp->omap_table[hval] != 0) {
  ------------------
  |  Branch (71:13): [True: 8, False: 216]
  ------------------
   72|      8|            goto again;
   73|      8|        }
   74|    216|        rppp->omap_table[hval] = i + 1;
   75|    216|    }
   76|     10|}

rtpp_port_table_ctor:
   55|      4|{
   56|      4|    struct rtpp_ptbl_priv *pvt;
   57|      4|    int i, j;
   58|      4|    uint16_t portnum;
   59|       |
   60|      4|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_ptbl_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      4|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   61|      4|    if (pvt == NULL) {
  ------------------
  |  Branch (61:9): [True: 0, False: 4]
  ------------------
   62|      0|        goto e0;
   63|      0|    }
   64|      4|    if (pthread_mutex_init(&pvt->lock, NULL) != 0) {
  ------------------
  |  Branch (64:9): [True: 0, False: 4]
  ------------------
   65|      0|        goto e1;
   66|      0|    }
   67|      4|    pvt->port_table_len = ((port_max - port_min) / 2) + 1;
   68|      4|    pvt->port_table = malloc(sizeof(uint16_t) * pvt->port_table_len);
   69|      4|    if (pvt->port_table == NULL) {
  ------------------
  |  Branch (69:9): [True: 0, False: 4]
  ------------------
   70|      0|        goto e2;
   71|      0|    }
   72|      4|    pvt->port_ctl = port_ctl;
   73|       |
   74|       |    /* Generate linear table */
   75|      4|    portnum = port_min;
   76|  60.0k|    for (i = 0; i < pvt->port_table_len; i += 1) {
  ------------------
  |  Branch (76:17): [True: 60.0k, False: 4]
  ------------------
   77|  60.0k|        pvt->port_table[i] = portnum;
   78|  60.0k|        portnum += 2;
   79|  60.0k|    }
   80|      4|    if (seq_ports == 0) {
  ------------------
  |  Branch (80:9): [True: 4, False: 0]
  ------------------
   81|       |        /* Shuffle elements ramdomly */
   82|  60.0k|        for (i = 0; i < pvt->port_table_len; i += 1) {
  ------------------
  |  Branch (82:21): [True: 60.0k, False: 4]
  ------------------
   83|  60.0k|            j = random() % pvt->port_table_len;
   84|  60.0k|            portnum = pvt->port_table[i];
   85|  60.0k|            pvt->port_table[i] = pvt->port_table[j];
   86|  60.0k|            pvt->port_table[j] = portnum;
   87|  60.0k|        }
   88|      4|    }
   89|      4|    pvt->seq_ports = seq_ports;
   90|       |    /* Set the last used element to be the last element */
   91|      4|    pvt->port_table_idx = pvt->port_table_len - 1;
   92|       |
   93|      4|    pvt->pub.get_port = &rtpp_ptbl_get_port;
   94|      4|    CALL_SMETHOD(pvt->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_ptbl_dtor,
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
   95|      4|      pvt);
   96|      4|    return ((&pvt->pub));
   97|       |
   98|      0|e2:
   99|      0|    pthread_mutex_destroy(&pvt->lock);
  100|      0|e1:
  101|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  102|      0|    free(pvt);
  103|      0|e0:
  104|      0|    return (NULL);
  105|      0|}

rtpp_proc_async_setprocname:
  212|      6|{
  213|       |#if HAVE_PTHREAD_SETNAME_NP
  214|       |    const char ppr[] = "rtpp_proc: ";
  215|       |    char *ptrname = alloca(sizeof(ppr) + strlen(pname));
  216|       |    if (ptrname != NULL) {
  217|       |        sprintf(ptrname, "%s%s", ppr, pname);
  218|       |        (void)pthread_setname_np(thread_id, ptrname);
  219|       |    }
  220|       |#endif
  221|      6|}
rtpp_proc_async_ctor:
  327|      2|{
  328|      2|    struct rtpp_proc_async_cf *proc_cf;
  329|       |
  330|      2|    proc_cf = rtpp_zmalloc(sizeof(*proc_cf));
  331|      2|    if (proc_cf == NULL)
  ------------------
  |  Branch (331:9): [True: 0, False: 2]
  ------------------
  332|      0|        return (NULL);
  333|       |
  334|      2|    proc_cf->npkts_relayed_idx = CALL_SMETHOD(cfsp->rtpp_stats, getidxbyname, "npkts_relayed");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  335|      2|    if (proc_cf->npkts_relayed_idx < 0)
  ------------------
  |  Branch (335:9): [True: 0, False: 2]
  ------------------
  336|      0|        goto e0;
  337|       |
  338|      2|    proc_cf->pub.netio = rtpp_netio_async_init(cfsp, 1);
  339|      2|    if (proc_cf->pub.netio == NULL) {
  ------------------
  |  Branch (339:9): [True: 0, False: 2]
  ------------------
  340|      0|        goto e0;
  341|      0|    }
  342|       |
  343|      2|    proc_cf->cf_save = cfsp;
  344|       |
  345|      2|    const struct packet_processor_if relay_packet_poi = {
  346|      2|        .descr = "relay_packet",
  347|      2|        .arg = (void *)proc_cf,
  348|      2|        .key = (void *)&relay_packet,
  349|      2|        .enqueue = &relay_packet
  350|      2|    };
  351|      2|    if (CALL_SMETHOD(cfsp->pproc_manager, reg, PPROC_ORD_RELAY, &relay_packet_poi) < 0)
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  |  Branch (351:9): [True: 0, False: 2]
  ------------------
  352|      0|        goto e1;
  353|       |
  354|      2|    const struct packet_processor_if record_packet_poi = {
  355|      2|        .descr = "record_packet",
  356|      2|        .arg = (void *)proc_cf,
  357|      2|        .key = (void *)&record_packet,
  358|      2|        .enqueue = &record_packet
  359|      2|    };
  360|      2|    if (CALL_SMETHOD(cfsp->pproc_manager, reg, PPROC_ORD_WITNESS, &record_packet_poi) < 0)
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  |  Branch (360:9): [True: 0, False: 2]
  ------------------
  361|      0|        goto e2;
  362|       |
  363|      2|    if (rtpp_proc_async_thread_init(cfsp, proc_cf, &proc_cf->rtp_thread, PIPE_RTP) != 0) {
  ------------------
  |  |   34|      2|#define PIPE_RTP        1
  ------------------
  |  Branch (363:9): [True: 0, False: 2]
  ------------------
  364|      0|        goto e3;
  365|      0|    }
  366|       |
  367|      2|    if (rtpp_proc_async_thread_init(cfsp, proc_cf, &proc_cf->rtcp_thread, PIPE_RTCP) != 0) {
  ------------------
  |  |   35|      2|#define PIPE_RTCP       2
  ------------------
  |  Branch (367:9): [True: 0, False: 2]
  ------------------
  368|      0|        goto e4;
  369|      0|    }
  370|       |
  371|      2|    proc_cf->wakeup_cf = rtpp_proc_wakeup_ctor(proc_cf->rtp_thread.ptbl.wakefd[1],
  372|      2|      proc_cf->rtcp_thread.ptbl.wakefd[1]);
  373|      2|    if (proc_cf->wakeup_cf == NULL)
  ------------------
  |  Branch (373:9): [True: 0, False: 2]
  ------------------
  374|      0|        goto e5;
  375|       |
  376|      2|    RTPP_OBJ_INCREF(cfsp->rtpp_stats);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  377|      2|    RTPP_OBJ_INCREF(cfsp->pproc_manager);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  378|       |
  379|      2|    proc_cf->pub.dtor = &rtpp_proc_async_dtor;
  380|      2|    proc_cf->pub.nudge = &rtpp_proc_async_nudge;
  381|      2|    return (&proc_cf->pub);
  382|      0|e5:
  383|      0|    rtpp_proc_async_thread_destroy(&proc_cf->rtcp_thread);
  384|      0|e4:
  385|      0|    rtpp_proc_async_thread_destroy(&proc_cf->rtp_thread);
  386|      0|e3:
  387|      0|    CALL_SMETHOD(cfsp->pproc_manager, unreg, record_packet_poi.key);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  388|      0|e2:
  389|      0|    CALL_SMETHOD(cfsp->pproc_manager, unreg, relay_packet_poi.key);
  ------------------
  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      0|)
  |  |  ------------------
  ------------------
  390|      0|e1:
  391|      0|    rtpp_netio_async_destroy(proc_cf->pub.netio);
  392|      0|e0:
  393|      0|    free(proc_cf);
  394|      0|    return (NULL);
  395|      0|}
rtpp_proc_async.c:rtpp_proc_async_thread_init:
  226|      4|{
  227|      4|    struct epoll_event epevent;
  228|       |
  229|      4|    tcp->ptbl.epfd = rtpp_epoll_create();
  230|      4|    if (tcp->ptbl.epfd < 0)
  ------------------
  |  Branch (230:9): [True: 0, False: 4]
  ------------------
  231|      0|        goto e0;
  232|      4|    if (socketpair(PF_LOCAL, SOCK_STREAM, 0, tcp->ptbl.wakefd) != 0)
  ------------------
  |  Branch (232:9): [True: 0, False: 4]
  ------------------
  233|      0|        goto e1;
  234|      4|    epevent.events = EPOLLIN;
  235|      4|    epevent.data.ptr = NULL;
  236|      4|    if (rtpp_epoll_ctl(tcp->ptbl.epfd, EPOLL_CTL_ADD, tcp->ptbl.wakefd[0], &epevent) != 0)
  ------------------
  |  Branch (236:9): [True: 0, False: 4]
  ------------------
  237|      0|        goto e2;
  238|       |
  239|      4|    tcp->proc_cf = proc_cf;
  240|      4|    tcp->pipe_type = pipe_type;
  241|       |
  242|      4|    init_rstats(cfsp->rtpp_stats, &tcp->rstats);
  243|       |
  244|      4|    tcp->events_alloc = 16;
  245|      4|    tcp->events = rtpp_zmalloc(sizeof(tcp->events[0]) * tcp->events_alloc);
  246|      4|    if (tcp->events == NULL)
  ------------------
  |  Branch (246:9): [True: 0, False: 4]
  ------------------
  247|      0|        goto e2;
  248|       |
  249|      4|    if (pthread_create(&tcp->thread_id, NULL, (void *(*)(void *))&rtpp_proc_async_run, tcp) != 0) {
  ------------------
  |  Branch (249:9): [True: 0, False: 4]
  ------------------
  250|      0|        goto e3;
  251|      0|    }
  252|      4|    rtpp_proc_async_setprocname(tcp->thread_id, PP_NAME(pipe_type));
  ------------------
  |  |   37|      4|#define PP_NAME(t)      (((t) == PIPE_RTP) ? "RTP" : "RTCP")
  |  |  ------------------
  |  |  |  |   34|      4|#define PIPE_RTP        1
  |  |  ------------------
  |  |  |  Branch (37:26): [True: 2, False: 2]
  |  |  ------------------
  ------------------
  253|      4|    return (0);
  254|       |
  255|      0|e3:
  256|      0|    free(tcp->events);
  257|      0|e2:
  258|      0|    close(tcp->ptbl.wakefd[0]);
  259|      0|    close(tcp->ptbl.wakefd[1]);
  260|      0|e1:
  261|      0|    close(tcp->ptbl.epfd);
  262|      0|e0:
  263|      0|    return (-1);
  264|      0|}
rtpp_proc_async.c:init_rstats:
  116|      4|{
  117|       |
  118|      4|    rsp->npkts_rcvd.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "npkts_rcvd");
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  119|      4|    rsp->npkts_relayed.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "npkts_relayed");
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  120|      4|    rsp->npkts_resizer_in.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "npkts_resizer_in");
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  121|      4|    rsp->npkts_resizer_out.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "npkts_resizer_out");
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  122|      4|    rsp->npkts_resizer_discard.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "npkts_resizer_discard");
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  123|      4|    rsp->npkts_discard.cnt_idx = CALL_SMETHOD(sobj, getidxbyname, "npkts_discard");
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  124|      4|}
rtpp_proc_async.c:rtpp_proc_async_run:
  128|      4|{
  129|      4|    const struct rtpp_cfg *cfsp;
  130|      4|    int ndrain;
  131|      4|    int nready;
  132|      4|    struct rtpp_proc_thread_cf *tcp;
  133|      4|    const struct rtpp_proc_async_cf *proc_cf;
  134|      4|    long long last_ctick;
  135|      4|    struct sthread_args *sender;
  136|      4|    struct rtpp_proc_rstats *rstats;
  137|      4|    struct rtpp_stats *stats_cf;
  138|      4|    int tstate;
  139|      4|    struct rtpp_timestamp rtime;
  140|       |
  141|      4|    tcp = (struct rtpp_proc_thread_cf *)arg;
  142|      4|    proc_cf = tcp->proc_cf;
  143|      4|    cfsp = proc_cf->cf_save;
  144|      4|    stats_cf = cfsp->rtpp_stats;
  145|      4|    rstats = &tcp->rstats;
  146|       |
  147|      4|    memset(&rtime, '\0', sizeof(rtime));
  148|       |
  149|      4|    RTPP_DBGCODE(netio) {
  ------------------
  |  |   84|      4|#define RTPP_DBGCODE(x) if (_DCOND_##x)
  ------------------
  150|      0|        last_ctick = 0;
  151|      0|    }
  152|       |
  153|      4|    for (;;) {
  154|      4|        tstate = atomic_load(&tcp->tstate);
  155|      4|        CALL_SMETHOD(cfsp->sessinfo, sync_polltbl, &tcp->ptbl, tcp->pipe_type);
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  156|      4|        if (tstate == TSTATE_CEASE) {
  ------------------
  |  |   31|      4|#define TSTATE_CEASE 0x1
  ------------------
  |  Branch (156:13): [True: 0, False: 4]
  ------------------
  157|      0|            break;
  158|      0|        }
  159|       |
  160|      4|        ndrain = 1;
  161|       |
  162|      4|        nready = 0;
  163|      4|        RTPP_DBGCODE(netio > 1) {
  ------------------
  |  |   84|      4|#define RTPP_DBGCODE(x) if (_DCOND_##x)
  |  |  ------------------
  |  |  |  Branch (84:29): [Folded - Ignored]
  |  |  ------------------
  ------------------
  164|      0|            RTPP_LOG(cfsp->glog, RTPP_LOG_DBUG, "run %lld " \
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  164|      0|            RTPP_LOG(cfsp->glog, RTPP_LOG_DBUG, "run %lld " \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|      0|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  165|      0|              "polling for %d %s file descriptors", \
  |  |  |  |  |  |  166|      0|              last_ctick, tcp->ptbl.curlen, PP_NAME(tcp->pipe_type));
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   37|      0|#define PP_NAME(t)      (((t) == PIPE_RTP) ? "RTP" : "RTCP")
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   34|      0|#define PIPE_RTP        1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (37:26): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  165|      0|              "polling for %d %s file descriptors", \
  166|      0|              last_ctick, tcp->ptbl.curlen, PP_NAME(tcp->pipe_type));
  167|      0|        }
  168|      4|        nready = rtpp_epoll_wait(tcp->ptbl.epfd, tcp->events, tcp->events_alloc, -1);
  169|      4|        RTPP_DBGCODE(netio) {
  ------------------
  |  |   84|      4|#define RTPP_DBGCODE(x) if (_DCOND_##x)
  ------------------
  170|      0|            RTPP_DBGCODE(netio > 1 || nready > 0) {
  ------------------
  |  |   84|      0|#define RTPP_DBGCODE(x) if (_DCOND_##x)
  |  |  ------------------
  |  |  |  Branch (84:29): [Folded - Ignored]
  |  |  |  Branch (84:38): [True: 0, False: 0]
  |  |  ------------------
  ------------------
  171|      0|                RTPP_LOG(cfsp->glog, RTPP_LOG_DBUG, "run %lld " \
  ------------------
  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   57|      0|#define RTPP_LOG(log, args...) CALL_METHOD((log), genwrite, __FUNCTION__, \
  |  |  |  |  |  |   58|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  171|      0|                RTPP_LOG(cfsp->glog, RTPP_LOG_DBUG, "run %lld " \
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   44|      0|#define	RTPP_LOG_DBUG	LOG_DEBUG
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|                  "polling for %d %s file descriptors: %d descriptors are ready", \
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  172|      0|                  "polling for %d %s file descriptors: %d descriptors are ready", \
  |  |  |  |  |  |  173|      0|                  last_ctick, tcp->ptbl.curlen, PP_NAME(tcp->pipe_type), nready);
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   37|      0|#define PP_NAME(t)      (((t) == PIPE_RTP) ? "RTP" : "RTCP")
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  |   34|      0|#define PIPE_RTP        1
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  |  Branch (37:26): [True: 0, False: 0]
  |  |  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   58|      0|  __LINE__, ## args)
  ------------------
  172|      0|                  "polling for %d %s file descriptors: %d descriptors are ready", \
  173|      0|                  last_ctick, tcp->ptbl.curlen, PP_NAME(tcp->pipe_type), nready);
  174|      0|            }
  175|      0|        }
  176|      4|        if (nready < 0 && errno == EINTR) {
  ------------------
  |  Branch (176:13): [True: 0, False: 4]
  |  Branch (176:27): [True: 0, False: 0]
  ------------------
  177|      0|            continue;
  178|      0|        }
  179|      4|        if (nready == 0)
  ------------------
  |  Branch (179:13): [True: 0, False: 4]
  ------------------
  180|      0|            goto next;
  181|       |
  182|      4|        rtpp_timestamp_get(&rtime);
  183|      4|        RTPP_DBG_ASSERT(rtime.wall > 0 && rtime.mono > 0);
  184|       |
  185|      4|        sender = rtpp_anetio_pick_sender(proc_cf->pub.netio);
  186|      4|        process_rtp_only(cfsp, &tcp->ptbl, &rtime, ndrain, sender, rstats,
  187|      4|          tcp->events, nready);
  188|       |
  189|      4|        rtpp_anetio_pump_q(sender);
  190|      4|        flush_rstats(stats_cf, rstats);
  191|       |
  192|      4|        if (nready == tcp->events_alloc) {
  ------------------
  |  Branch (192:13): [True: 0, False: 4]
  ------------------
  193|      0|            struct epoll_event *tep;
  194|       |
  195|      0|            tep = realloc(tcp->events, sizeof(tcp->events[0]) * tcp->events_alloc * 2);
  196|      0|            if (tep != NULL) {
  ------------------
  |  Branch (196:17): [True: 0, False: 0]
  ------------------
  197|      0|                tcp->events = tep;
  198|      0|                tcp->events_alloc *= 2;
  199|      0|            }
  200|      0|        }
  201|       |
  202|      4|next:
  203|      0|        RTPP_DBGCODE(netio) {
  ------------------
  |  |   84|      0|#define RTPP_DBGCODE(x) if (_DCOND_##x)
  ------------------
  204|      0|            last_ctick++;
  205|      0|        }
  206|      0|    }
  207|      0|    rtpp_polltbl_free(&tcp->ptbl);
  208|      0|}

rtpp_proc_servers_ctor:
  241|      2|{
  242|      2|    struct rtpp_proc_servers_priv *stap;
  243|       |
  244|      2|    stap = rtpp_rzmalloc(sizeof(*stap), PVT_RCOFFS(stap));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  245|      2|    if (stap == NULL)
  ------------------
  |  Branch (245:9): [True: 0, False: 2]
  ------------------
  246|      0|        goto e0;
  247|      2|    stap->cmd_q = rtpp_queue_init(RTPQ_TINY_CB_LEN, "rtpp_proc_servers(requests)");
  ------------------
  |  |   73|      2|#define RTPQ_TINY_CB_LEN  4
  ------------------
  248|      2|    if (stap->cmd_q == NULL) {
  ------------------
  |  Branch (248:9): [True: 0, False: 2]
  ------------------
  249|      0|        goto e1;
  250|      0|    }
  251|      2|    stap->sigterm = rtpp_wi_malloc_sgnl(SIGTERM, NULL, 0);
  252|      2|    if (stap->sigterm == NULL) {
  ------------------
  |  Branch (252:9): [True: 0, False: 2]
  ------------------
  253|      0|        goto e2;
  254|      0|    }
  255|      2|    stap->act_servers = rtpp_weakref_ctor();
  256|      2|    if (stap->act_servers == NULL) {
  ------------------
  |  Branch (256:9): [True: 0, False: 2]
  ------------------
  257|      0|        goto e3;
  258|      0|    }
  259|      2|    stap->inact_servers = rtpp_weakref_ctor();
  260|      2|    if (stap->inact_servers == NULL) {
  ------------------
  |  Branch (260:9): [True: 0, False: 2]
  ------------------
  261|      0|        goto e4;
  262|      0|    }
  263|       |
  264|      2|    stap->inact_servers->ht->seed = stap->act_servers->ht->seed;
  265|      2|    stap->netio = netio;
  266|      2|    stap->cfsp = cfsp;
  267|      2|    stap->npkts_played.cnt_idx = CALL_SMETHOD(cfsp->rtpp_stats, getidxbyname, "npkts_played");
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  268|       |
  269|      2|    if (pthread_create(&stap->thread_id, NULL,
  ------------------
  |  Branch (269:9): [True: 0, False: 2]
  ------------------
  270|      2|      (void *(*)(void *))&rtpp_proc_servers_run, stap) != 0) {
  271|      0|        goto e5;
  272|      0|    }
  273|       |#if HAVE_PTHREAD_SETNAME_NP
  274|       |    (void)pthread_setname_np(stap->thread_id, "rtpp_proc_servers");
  275|       |#endif
  276|       |
  277|      2|    PUBINST_FININIT(&stap->pub, stap, rtpp_proc_servers_dtor);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
  278|      2|    return (&stap->pub);
  279|      0|e5:
  280|      0|    RTPP_OBJ_DECREF(stap->inact_servers);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  281|      0|e4:
  282|      0|    RTPP_OBJ_DECREF(stap->act_servers);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  283|      0|e3:
  284|      0|    RTPP_OBJ_DECREF(stap->sigterm);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  285|      0|e2:
  286|      0|    rtpp_queue_destroy(stap->cmd_q);
  287|      0|e1:
  288|      0|    RTPP_OBJ_DECREF(&stap->pub);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  289|      0|    free(stap);
  290|      0|e0:
  291|      0|    return (NULL);
  292|      0|}
rtpp_proc_servers.c:rtpp_proc_servers_run:
  175|      2|{
  176|      2|    struct rtpp_proc_servers_priv *stap;
  177|      2|    struct rtpp_wi *wi;
  178|      2|    int signum, rval;
  179|      2|    double next_dtime = 0;
  180|      2|    struct timespec deadline;
  181|       |
  182|      2|    stap = (struct rtpp_proc_servers_priv *)argp;
  183|      2|    for (;;) {
  184|      2|        if (CALL_SMETHOD(stap->act_servers, get_length) == 0) {
  ------------------
  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      2|)
  |  |  ------------------
  ------------------
  |  Branch (184:13): [True: 2, False: 0]
  ------------------
  185|      2|            wi = rtpp_queue_get_item(stap->cmd_q, 1);
  186|      2|            next_dtime = 0;
  187|      2|            if (wi == NULL)
  ------------------
  |  Branch (187:17): [True: 0, False: 2]
  ------------------
  188|      0|                continue;
  189|      2|        } else {
  190|      0|            if (next_dtime != 0) {
  ------------------
  |  Branch (190:17): [True: 0, False: 0]
  ------------------
  191|      0|                dtime2mtimespec(next_dtime, &deadline);
  192|      0|                rval = 0;
  193|      0|                wi = rtpp_queue_get_item_by(stap->cmd_q, &deadline, &rval);
  194|      0|            } else {
  195|      0|                wi = NULL;
  196|      0|                rval = ETIMEDOUT;
  197|      0|                next_dtime = getdtime();
  198|      0|            }
  199|      0|            if (wi == NULL) {
  ------------------
  |  Branch (199:17): [True: 0, False: 0]
  ------------------
  200|      0|                if (rval == ETIMEDOUT) {
  ------------------
  |  Branch (200:21): [True: 0, False: 0]
  ------------------
  201|      0|                    run_servers(stap, next_dtime);
  202|      0|                    next_dtime += 0.01;
  203|      0|                }
  204|      0|                continue;
  205|      0|            }
  206|      0|        }
  207|      2|        switch (wi->wi_type) {
  208|      0|        case RTPP_WI_TYPE_SGNL:
  ------------------
  |  Branch (208:9): [True: 0, False: 2]
  ------------------
  209|      0|            signum = rtpp_wi_sgnl_get_signum(wi);
  210|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  211|      0|            if (signum == SIGTERM) {
  ------------------
  |  Branch (211:17): [True: 0, False: 0]
  ------------------
  212|      0|                goto exit;
  213|      0|            }
  214|      0|            abort();
  215|       |
  216|      0|        default:
  ------------------
  |  Branch (216:9): [True: 0, False: 2]
  ------------------
  217|      0|            abort();
  218|      2|        }
  219|      0|        RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      2|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  220|      0|    }
  221|      0|exit:
  222|       |    /* We are terminating, get rid of all requests */
  223|      0|    return;
  224|      2|}

rtpp_proc_ttl_ctor:
  156|      2|{
  157|      2|    struct rtpp_proc_ttl_pvt *proc_cf;
  158|       |
  159|      2|    proc_cf = rtpp_zmalloc(sizeof(*proc_cf));
  160|      2|    if (proc_cf == NULL)
  ------------------
  |  Branch (160:9): [True: 0, False: 2]
  ------------------
  161|      0|        return (NULL);
  162|       |
  163|      2|    proc_cf->elp = prdic_init(1.0, 0.0);
  164|      2|    if (proc_cf->elp == NULL) {
  ------------------
  |  Branch (164:9): [True: 0, False: 2]
  ------------------
  165|      0|        goto e0;
  166|      0|    }
  167|       |
  168|      2|    proc_cf->fa.rtpp_notify_cf = cfsp->rtpp_notify_cf;
  169|      2|    RTPP_OBJ_INCREF(cfsp->rtpp_notify_cf);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  170|      2|    proc_cf->fa.rtpp_stats = cfsp->rtpp_stats;
  171|      2|    RTPP_OBJ_INCREF(cfsp->rtpp_stats);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  172|      2|    proc_cf->fa.sessions_wrt = cfsp->sessions_wrt;
  173|      2|    RTPP_OBJ_INCREF(cfsp->sessions_wrt);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  174|      2|    proc_cf->sessions_ht = cfsp->sessions_ht;
  175|      2|    RTPP_OBJ_INCREF(cfsp->sessions_ht);
  ------------------
  |  |  151|      2|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      2|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      2|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  176|       |
  177|      2|    if (pthread_create(&proc_cf->thread_id, NULL, (void *(*)(void *))&rtpp_proc_ttl_run, proc_cf) != 0) {
  ------------------
  |  Branch (177:9): [True: 0, False: 2]
  ------------------
  178|      0|        goto e1;
  179|      0|    }
  180|       |#if HAVE_PTHREAD_SETNAME_NP
  181|       |    (void)pthread_setname_np(proc_cf->thread_id, "rtpp_proc_ttl");
  182|       |#endif
  183|      2|    proc_cf->pub.dtor = &rtpp_proc_ttl_dtor;
  184|      2|    return (&proc_cf->pub);
  185|      0|e1:
  186|      0|    RTPP_OBJ_DECREF(cfsp->rtpp_stats);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  187|      0|    RTPP_OBJ_DECREF(cfsp->sessions_ht);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  188|      0|    RTPP_OBJ_DECREF(cfsp->sessions_wrt);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|      0|    RTPP_OBJ_DECREF(cfsp->rtpp_notify_cf);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  190|      0|    prdic_free(proc_cf->elp);
  191|      0|e0:
  192|      0|    free(proc_cf);
  193|      0|    return (NULL);
  194|      0|}
rtpp_proc_ttl.c:rtpp_proc_ttl_run:
  119|      2|{
  120|      2|    struct rtpp_proc_ttl_pvt *proc_cf;
  121|      2|    int tstate;
  122|       |
  123|      2|    proc_cf = (struct rtpp_proc_ttl_pvt *)arg;
  124|       |
  125|      3|    for (;;) {
  126|      3|        tstate = atomic_load(&proc_cf->tstate);
  127|      3|        if (tstate == TSTATE_CEASE) {
  ------------------
  |  |   31|      3|#define TSTATE_CEASE 0x1
  ------------------
  |  Branch (127:13): [True: 0, False: 3]
  ------------------
  128|      0|            break;
  129|      0|        }
  130|      3|        prdic_procrastinate(proc_cf->elp);
  131|      3|        rtpp_proc_ttl(proc_cf->sessions_ht, &proc_cf->fa);
  132|      3|    }
  133|      2|}
rtpp_proc_ttl.c:rtpp_proc_ttl:
  112|      1|{
  113|       |
  114|      1|    CALL_SMETHOD(sessions_ht, foreach, rtpp_proc_ttl_foreach, (void *)fap, NULL);
  ------------------
  |  |  134|      1|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      1|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      1|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      1|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      1|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      1|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      1|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      1|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      1|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      1|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      1|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      1|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      1|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      1|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      1|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      1|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      1|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      1|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      1|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      1|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      1|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      1|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      1|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      1|)
  |  |  ------------------
  |  |               #define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  114|      1|    CALL_SMETHOD(sessions_ht, foreach, rtpp_proc_ttl_foreach, (void *)fap, NULL);
  |  |  ------------------
  ------------------
  115|      1|}

rtpp_proc_wakeup_ctor:
  129|      2|{
  130|      2|    pthread_condattr_t cond_attr;
  131|      2|    struct rtpp_proc_wakeup_priv *pvt;
  132|       |
  133|      2|    RTPP_DBG_ASSERT(rtp_wakefd > 0 && rtcp_wakefd > 0);
  134|      2|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_proc_wakeup_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  135|      2|    if (pvt == NULL)
  ------------------
  |  Branch (135:9): [True: 0, False: 2]
  ------------------
  136|      0|        goto e0;
  137|      2|    if (pthread_mutex_init(&pvt->mutex, NULL) != 0)
  ------------------
  |  Branch (137:9): [True: 0, False: 2]
  ------------------
  138|      0|        goto e1;
  139|      2|    if (pthread_condattr_init(&cond_attr) != 0)
  ------------------
  |  Branch (139:9): [True: 0, False: 2]
  ------------------
  140|      0|        goto e2;
  141|      2|    if (pthread_condattr_setclock(&cond_attr, CLOCK_MONOTONIC) != 0)
  ------------------
  |  Branch (141:9): [True: 0, False: 2]
  ------------------
  142|      0|        goto e3;
  143|      2|    if (pthread_cond_init(&pvt->cond, &cond_attr) != 0)
  ------------------
  |  Branch (143:9): [True: 0, False: 2]
  ------------------
  144|      0|        goto e3;
  145|      2|    atomic_init(&pvt->tstate, TSTATE_CEASE);
  ------------------
  |  |   31|      2|#define TSTATE_CEASE 0x1
  ------------------
  146|      2|    pvt->wakefds.rtp = rtp_wakefd;
  147|      2|    pvt->wakefds.rtcp = rtcp_wakefd;
  148|      2|    if (pthread_create(&pvt->thread_id, NULL, (void *(*)(void *))&rtpp_proc_wakeup_run, pvt) != 0)
  ------------------
  |  Branch (148:9): [True: 0, False: 2]
  ------------------
  149|      0|        goto e4;
  150|      2|    pthread_condattr_destroy(&cond_attr);
  151|      2|    rtpp_proc_async_setprocname(pvt->thread_id, "IO_WKUP");
  152|    106|    while (atomic_load(&pvt->tstate) != TSTATE_RUN)
  ------------------
  |  |   30|    106|#define TSTATE_RUN   0x0
  ------------------
  |  Branch (152:12): [True: 104, False: 2]
  ------------------
  153|       |#if HAVE_PTHREAD_YIELD
  154|       |        pthread_yield();
  155|       |#else
  156|    104|        sched_yield();
  157|      2|#endif
  158|      2|    PUBINST_FININIT(&pvt->pub, pvt, rtpp_proc_wakeup_dtor);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
  159|      2|    return (&pvt->pub);
  160|      0|e4:
  161|      0|    pthread_cond_destroy(&pvt->cond);
  162|      0|e3:
  163|      0|    pthread_condattr_destroy(&cond_attr);
  164|      0|e2:
  165|      0|    pthread_mutex_destroy(&pvt->mutex);
  166|      0|e1:
  167|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  168|      0|    free(pvt);
  169|      0|e0:
  170|      0|    return (NULL);
  171|      0|}
rtpp_proc_wakeup.c:rtpp_proc_wakeup_run:
   75|      2|{
   76|      2|    struct rtpp_proc_wakeup_priv *wtcp;
   77|      2|    int requested_i_wake = 0;
   78|      2|    double last_wakeup = 0, wakeup_at = 0;
   79|      2|    const double wakeup_ival = 1.0 / MAX_WAKEUPS_PS;
  ------------------
  |  |   45|      2|#define MAX_WAKEUPS_PS 1000.0
  ------------------
   80|       |
   81|      2|    wtcp = (struct rtpp_proc_wakeup_priv *)arg;
   82|       |
   83|      2|    atomic_store(&wtcp->tstate, TSTATE_RUN);
   84|      2|    for (;;) {
   85|      2|        int ret;
   86|       |
   87|      2|        pthread_mutex_lock(&wtcp->mutex);
   88|      4|        while ((atomic_load(&wtcp->tstate) == TSTATE_RUN) && (requested_i_wake == wtcp->requested_i_wake)) {
  ------------------
  |  |   30|      4|#define TSTATE_RUN   0x0
  ------------------
  |  Branch (88:16): [True: 2, False: 2]
  |  Branch (88:62): [True: 2, False: 0]
  ------------------
   89|      2|            if (wakeup_at == 0) {
  ------------------
  |  Branch (89:17): [True: 2, False: 0]
  ------------------
   90|      2|                pthread_cond_wait(&wtcp->cond, &wtcp->mutex);
   91|      2|            } else {
   92|      0|                struct timespec deadline;
   93|      0|                dtime2mtimespec(wakeup_at, &deadline);
   94|      0|                int rc = pthread_cond_timedwait(&wtcp->cond, &wtcp->mutex, &deadline);
   95|      0|                if (rc == ETIMEDOUT) {
  ------------------
  |  Branch (95:21): [True: 0, False: 0]
  ------------------
   96|      0|                    requested_i_wake = wtcp->requested_i_wake;
   97|      0|                    goto deliver;
   98|      0|                }
   99|      0|            }
  100|      2|        }
  101|      2|        if (atomic_load(&wtcp->tstate) != TSTATE_RUN) {
  ------------------
  |  |   30|      2|#define TSTATE_RUN   0x0
  ------------------
  |  Branch (101:13): [True: 0, False: 2]
  ------------------
  102|      0|            pthread_mutex_unlock(&wtcp->mutex);
  103|      0|            break;
  104|      0|        }
  105|       |
  106|      2|        requested_i_wake = wtcp->requested_i_wake;
  107|      2|        if (last_wakeup > 0 && (getdtime() - last_wakeup) < wakeup_ival) {
  ------------------
  |  Branch (107:13): [True: 0, False: 2]
  |  Branch (107:32): [True: 0, False: 0]
  ------------------
  108|      0|            wakeup_at = last_wakeup + wakeup_ival;
  109|      0|            pthread_mutex_unlock(&wtcp->mutex);
  110|      0|            continue;
  111|      0|        }
  112|      2|deliver:
  113|      0|        wtcp->delivered_i_wake = requested_i_wake;
  114|      0|        pthread_mutex_unlock(&wtcp->mutex);
  115|       |
  116|      0|        ret = write(wtcp->wakefds.rtp, &requested_i_wake,
  117|      0|          sizeof(requested_i_wake));
  118|      0|        RTPP_DBG_ASSERT(ret < 0 || ret == sizeof(requested_i_wake));
  119|      0|        ret = write(wtcp->wakefds.rtcp, &requested_i_wake,
  120|      0|          sizeof(requested_i_wake));
  121|      0|        RTPP_DBG_ASSERT(ret < 0 || ret == sizeof(requested_i_wake));
  122|      0|        last_wakeup = getdtime();
  123|      0|        wakeup_at = 0;
  124|      0|    }
  125|      2|}

rtpp_queue_init:
  255|     16|{
  256|     16|    struct rtpp_queue *queue;
  257|     16|    unsigned int cb_buflen;
  258|     16|    char *name;
  259|     16|    va_list ap;
  260|     16|    int eval;
  261|     16|    pthread_condattr_t cond_attr;
  262|       |
  263|     16|    cb_buflen = cb_capacity + 1;
  264|     16|    queue = rtpp_zmalloc(sizeof(*queue) + (sizeof(queue->circb.buffer[0]) * cb_buflen));
  265|     16|    if (queue == NULL)
  ------------------
  |  Branch (265:9): [True: 0, False: 16]
  ------------------
  266|      0|        goto e0;
  267|       |
  268|       |    /* Set the clock type for the condition variable to CLOCK_MONOTONIC */
  269|     16|    if (pthread_condattr_init(&cond_attr) != 0) {
  ------------------
  |  Branch (269:9): [True: 0, False: 16]
  ------------------
  270|      0|        goto e1;
  271|      0|    }
  272|     16|    if (pthread_condattr_setclock(&cond_attr, CLOCK_MONOTONIC) != 0) {
  ------------------
  |  Branch (272:9): [True: 0, False: 16]
  ------------------
  273|      0|        goto e2;
  274|      0|    }
  275|     16|    if ((eval = pthread_cond_init(&queue->cond, &cond_attr)) != 0) {
  ------------------
  |  Branch (275:9): [True: 0, False: 16]
  ------------------
  276|      0|        goto e2;
  277|      0|    }
  278|     16|    if (pthread_mutex_init(&queue->mutex, NULL) != 0) {
  ------------------
  |  Branch (278:9): [True: 0, False: 16]
  ------------------
  279|      0|        goto e3;
  280|      0|    }
  281|     16|    va_start(ap, fmt);
  282|     16|    vasprintf(&name, fmt, ap);
  283|     16|    va_end(ap);
  284|     16|    if (name == NULL) {
  ------------------
  |  Branch (284:9): [True: 0, False: 16]
  ------------------
  285|      0|        goto e4;
  286|      0|    }
  287|     16|    queue->qlen = 1;
  288|     16|    queue->name = name;
  289|     16|    queue->circb.buflen = cb_buflen;
  290|     16|    pthread_condattr_destroy(&cond_attr);
  291|     16|    return (queue);
  292|      0|e4:
  293|      0|    pthread_mutex_destroy(&queue->mutex);
  294|      0|e3:
  295|      0|    pthread_cond_destroy(&queue->cond);
  296|      0|e2:
  297|      0|    pthread_condattr_destroy(&cond_attr);
  298|      0|e1:
  299|      0|    free(queue);
  300|      0|e0:
  301|      0|    return (NULL);
  302|      0|}
rtpp_queue_setqlen:
  335|      4|{
  336|      4|    unsigned int rval;
  337|       |
  338|      4|    pthread_mutex_lock(&queue->mutex);
  339|      4|    rval = queue->qlen;
  340|      4|    queue->qlen = qlen;
  341|      4|    pthread_mutex_unlock(&queue->mutex);
  342|      4|    return (rval);
  343|      4|}
rtpp_queue_put_item:
  347|      5|{
  348|       |
  349|      5|    pthread_mutex_lock(&queue->mutex);
  350|       |    /*
  351|       |     * If queue is not empty, push to the queue so that order of elements
  352|       |     * is preserved while pulling them out.
  353|       |     */
  354|      5|    if ((queue->length > 0) || (circ_buf_push(&queue->circb, wi) != 0)) {
  ------------------
  |  Branch (354:9): [True: 0, False: 5]
  |  Branch (354:32): [True: 0, False: 5]
  ------------------
  355|      0|        RTPPQ_APPEND(queue, wi);
  ------------------
  |  |   61|      0|#define RTPPQ_APPEND(rqp, wip) {             \
  |  |   62|      0|    (wip)->next = NULL;                      \
  |  |   63|      0|    if ((rqp)->head == NULL) {               \
  |  |  ------------------
  |  |  |  Branch (63:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   64|      0|        (rqp)->head = (wip);                 \
  |  |   65|      0|        (rqp)->tail = (wip);                 \
  |  |   66|      0|    } else {                                 \
  |  |   67|      0|        (rqp)->tail->next = (wip);           \
  |  |   68|      0|        (rqp)->tail = (wip);                 \
  |  |   69|      0|    }                                        \
  |  |   70|      0|    (rqp)->length += 1;                      \
  |  |   71|      0|}
  ------------------
  356|       |#if 0
  357|       |        if (queue->length > 99 && queue->length % 100 == 0)
  358|       |            fprintf(stderr, "queue(%s): length %d\n", queue->name, queue->length);
  359|       |#endif
  360|      0|    }
  361|       |
  362|      5|    if ((queue->qlen == 1) || (queue->qlen > 1 && rtpp_queue_getclen(queue) % queue->qlen == 0) || wi->wi_type == RTPP_WI_TYPE_SGNL) {
  ------------------
  |  Branch (362:9): [True: 0, False: 5]
  |  Branch (362:32): [True: 0, False: 5]
  |  Branch (362:51): [True: 0, False: 0]
  |  Branch (362:100): [True: 0, False: 5]
  ------------------
  363|       |        /* notify worker thread */
  364|      0|        pthread_cond_signal(&queue->cond);
  365|      0|    }
  366|       |
  367|      5|    pthread_mutex_unlock(&queue->mutex);
  368|      5|}
rtpp_queue_pump:
  372|      2|{
  373|       |
  374|      2|    pthread_mutex_lock(&queue->mutex);
  375|      2|    if (rtpp_queue_getclen(queue) > 0) {
  ------------------
  |  Branch (375:9): [True: 0, False: 2]
  ------------------
  376|       |        /* notify worker thread */
  377|      0|        pthread_cond_signal(&queue->cond);
  378|      0|    }
  379|       |
  380|      2|    pthread_mutex_unlock(&queue->mutex);
  381|      2|}
rtpp_queue_get_item:
  426|     10|{
  427|     10|    struct rtpp_wi *wi;
  428|       |
  429|     10|    pthread_mutex_lock(&queue->mutex);
  430|     20|    while (rtpp_queue_getclen(queue) == 0) {
  ------------------
  |  Branch (430:12): [True: 10, False: 10]
  ------------------
  431|     10|        pthread_cond_wait(&queue->cond, &queue->mutex);
  432|     10|        if (rtpp_queue_getclen(queue) == 0 && return_on_wake != 0) {
  ------------------
  |  Branch (432:13): [True: 0, False: 10]
  |  Branch (432:47): [True: 0, False: 0]
  ------------------
  433|      0|            pthread_mutex_unlock(&queue->mutex);
  434|      0|            return (NULL);
  435|      0|        }
  436|     10|    }
  437|       |#if RTPQ_DEBUG
  438|       |    assert(rtpp_queue_getclen(queue) > 0);
  439|       |#endif
  440|     10|    if (circ_buf_pop(&queue->circb, &wi) == 0) {
  ------------------
  |  Branch (440:9): [True: 0, False: 10]
  ------------------
  441|      0|        pthread_mutex_unlock(&queue->mutex);
  442|      0|        return (wi);
  443|      0|    }
  444|     10|    wi = queue->head;
  445|       |#if RTPQ_DEBUG
  446|       |    assert(rtpp_queue_getclen(queue) > 0);
  447|       |#endif
  448|     10|    RTPPQ_REMOVE_HEAD(queue);
  ------------------
  |  |   35|     10|#define RTPPQ_REMOVE_HEAD(rqp) {             \
  |  |   36|     10|    if ((rqp)->tail == (rqp)->head) {        \
  |  |  ------------------
  |  |  |  Branch (36:9): [True: 0, False: 10]
  |  |  ------------------
  |  |   37|      0|        (rqp)->tail = NULL;                  \
  |  |   38|      0|    }                                        \
  |  |   39|     10|    (rqp)->head = (rqp)->head->next;         \
  |  |   40|     10|    (rqp)->length -= 1;                      \
  |  |   41|     10|}
  ------------------
  449|     10|    pthread_mutex_unlock(&queue->mutex);
  450|     10|    wi->next = NULL;
  451|       |
  452|     10|    return (wi);
  453|     10|}
rtpp_queue_get_items:
  457|      2|{
  458|      2|    int i, j;
  459|       |
  460|      2|    pthread_mutex_lock(&queue->mutex);
  461|      4|    while (rtpp_queue_getclen(queue) == 0) {
  ------------------
  |  Branch (461:12): [True: 2, False: 2]
  ------------------
  462|      2|        pthread_cond_wait(&queue->cond, &queue->mutex);
  463|      2|        if (rtpp_queue_getclen(queue) == 0 && return_on_wake != 0) {
  ------------------
  |  Branch (463:13): [True: 0, False: 2]
  |  Branch (463:47): [True: 0, False: 0]
  ------------------
  464|      0|            pthread_mutex_unlock(&queue->mutex);
  465|      0|            return (0);
  466|      0|        }
  467|      2|    }
  468|       |    /* Pull out of circular buffer first */
  469|      2|    i = circ_buf_popmany(&queue->circb, items, ilen);
  470|      2|    if ((i == ilen) || (queue->length == 0))
  ------------------
  |  Branch (470:9): [True: 2, False: 0]
  |  Branch (470:24): [True: 0, False: 0]
  ------------------
  471|      0|        goto done;
  472|      2|    items += i;
  473|      2|    ilen -= i;
  474|      2|    for (j = 0; j < ilen; j++) {
  ------------------
  |  Branch (474:17): [True: 0, False: 2]
  ------------------
  475|      0|        items[j] = queue->head;
  476|      0|        queue->head = items[j]->next;
  477|      0|        if (queue->head == NULL) {
  ------------------
  |  Branch (477:13): [True: 0, False: 0]
  ------------------
  478|      0|            queue->tail = NULL;
  479|      0|            j += 1;
  480|      0|            break;
  481|      0|        }
  482|      0|    }
  483|      2|    queue->length -= j;
  484|      2|    i += j;
  485|      2|done:
  486|      0|    pthread_mutex_unlock(&queue->mutex);
  487|       |
  488|      0|    return (i);
  489|      2|}
rtpp_queue_get_length:
  493|    125|{
  494|    125|    int length;
  495|       |
  496|    125|    pthread_mutex_lock(&queue->mutex);
  497|    125|    length = rtpp_queue_getclen(queue);
  498|    125|    pthread_mutex_unlock(&queue->mutex);
  499|    125|    return (length);
  500|    125|}
rtpp_queue_get_first_matching:
  523|    126|{
  524|    126|    struct rtpp_wi *wi, *wi_prev;
  525|    126|    int i;
  526|       |
  527|    126|    pthread_mutex_lock(&queue->mutex);
  528|    374|    for (i = 0;; i++) {
  529|    374|        if (circ_buf_peek(&queue->circb, i, &wi) != 0)
  ------------------
  |  Branch (529:13): [True: 125, False: 249]
  ------------------
  530|    125|            break;
  531|    249|        if (match_fn(wi, fn_args) == 0) {
  ------------------
  |  Branch (531:13): [True: 1, False: 248]
  ------------------
  532|      1|            assert(circ_buf_remove(&queue->circb, i) == 0);
  533|      1|            pthread_mutex_unlock(&queue->mutex);
  534|      1|            return (wi);
  535|      1|        }
  536|    249|    }
  537|    125|    wi_prev = NULL;
  538|    125|    for (wi = queue->head; wi != NULL; wi_prev = wi, wi = wi->next) {
  ------------------
  |  Branch (538:28): [True: 0, False: 125]
  ------------------
  539|      0|        if (match_fn(wi, fn_args) == 0) {
  ------------------
  |  Branch (539:13): [True: 0, False: 0]
  ------------------
  540|      0|            RTPPQ_REMOVE_AFTER(queue, wi_prev);
  ------------------
  |  |   43|      0|#define RTPPQ_REMOVE_AFTER(rqp, wip) {       \
  |  |   44|      0|    struct rtpp_wi *_twip;                   \
  |  |   45|      0|    if ((wip) == NULL) {                     \
  |  |  ------------------
  |  |  |  Branch (45:9): [True: 0, False: 0]
  |  |  ------------------
  |  |   46|      0|        _twip = (rqp)->head;                 \
  |  |   47|      0|        RTPPQ_REMOVE_HEAD(rqp);              \
  |  |  ------------------
  |  |  |  |   35|      0|#define RTPPQ_REMOVE_HEAD(rqp) {             \
  |  |  |  |   36|      0|    if ((rqp)->tail == (rqp)->head) {        \
  |  |  |  |  ------------------
  |  |  |  |  |  Branch (36:9): [True: 0, False: 0]
  |  |  |  |  ------------------
  |  |  |  |   37|      0|        (rqp)->tail = NULL;                  \
  |  |  |  |   38|      0|    }                                        \
  |  |  |  |   39|      0|    (rqp)->head = (rqp)->head->next;         \
  |  |  |  |   40|      0|    (rqp)->length -= 1;                      \
  |  |  |  |   41|      0|}
  |  |  ------------------
  |  |   48|      0|    } else if ((rqp)->tail == (wip)->next) { \
  |  |  ------------------
  |  |  |  Branch (48:16): [True: 0, False: 0]
  |  |  ------------------
  |  |   49|      0|        _twip = (wip)->next;                 \
  |  |   50|      0|        (wip)->next = NULL;                  \
  |  |   51|      0|        (rqp)->tail = (wip);                 \
  |  |   52|      0|        (rqp)->length -= 1;                  \
  |  |   53|      0|    } else {                                 \
  |  |   54|      0|        _twip = (wip)->next;                 \
  |  |   55|      0|        (wip)->next = _twip->next;           \
  |  |   56|      0|        (rqp)->length -= 1;                  \
  |  |   57|      0|    }                                        \
  |  |   58|      0|    _twip->next = NULL;                      \
  |  |   59|      0|}
  ------------------
  541|      0|            pthread_mutex_unlock(&queue->mutex);
  542|      0|            return (wi);
  543|      0|        }
  544|      0|    }
  545|    125|    pthread_mutex_unlock(&queue->mutex);
  546|    125|    return (NULL);
  547|    125|}
rtpp_queue.c:circ_buf_push:
   66|      5|{
   67|      5|    unsigned int next;
   68|       |
   69|      5|    next = c->head + 1;  /* next is where head will point to after this write. */
   70|      5|    if (next == c->buflen)
  ------------------
  |  Branch (70:9): [True: 0, False: 5]
  ------------------
   71|      0|        next = 0;
   72|       |
   73|      5|    if (next == c->tail)  /* if the head + 1 == tail, circular buffer is full */
  ------------------
  |  Branch (73:9): [True: 0, False: 5]
  ------------------
   74|      0|        return(-1);
   75|       |
   76|       |#if RTPQ_DEBUG
   77|       |    assert(c->buffer[c->head] == NULL);
   78|       |#endif
   79|      5|    c->buffer[c->head] = data;  /* Load data and then move */
   80|      5|    c->head = next;             /* head to next data offset. */
   81|      5|    return(0);  /* return success to indicate successful push. */
   82|      5|}
rtpp_queue.c:rtpp_queue_getclen:
  320|    139|{
  321|    139|    int clen;
  322|       |
  323|    139|    clen = queue->length;
  324|    139|    if (queue->circb.head < queue->circb.tail) {
  ------------------
  |  Branch (324:9): [True: 0, False: 139]
  ------------------
  325|      0|       clen += (queue->circb.head + queue->circb.buflen) - queue->circb.tail;
  326|    139|    } else if (queue->circb.head > queue->circb.tail) {
  ------------------
  |  Branch (326:16): [True: 0, False: 139]
  ------------------
  327|      0|       clen += queue->circb.head - queue->circb.tail;
  328|      0|    }
  329|       |
  330|    139|    return (clen);
  331|    139|}
rtpp_queue.c:circ_buf_isempty:
   59|    375|{
   60|       |
   61|    375|    return (c->head == c->tail); /* if the head == tail, we don't have any data */
   62|    375|}
rtpp_queue.c:circ_buf_peek:
  151|    374|{
  152|    374|    unsigned int itmidx, clen;
  153|       |
  154|    374|    if (circ_buf_isempty(c))
  ------------------
  |  Branch (154:9): [True: 0, False: 374]
  ------------------
  155|      0|        return(-1);
  156|       |
  157|    374|    if (c->head < c->tail) {
  ------------------
  |  Branch (157:9): [True: 0, False: 374]
  ------------------
  158|      0|       clen = (c->head + c->buflen) - c->tail;
  159|    374|    } else {
  160|    374|       clen = c->head - c->tail;
  161|    374|    }
  162|    374|    if (offset >= clen)
  ------------------
  |  Branch (162:9): [True: 125, False: 249]
  ------------------
  163|    125|        return(-1);
  164|       |
  165|    249|    itmidx = c->tail + offset;  /* itmidx points to the item in question */
  166|    249|    if(itmidx >= c->buflen)
  ------------------
  |  Branch (166:8): [True: 0, False: 249]
  ------------------
  167|      0|        itmidx -= c->buflen;
  168|       |#if RTPQ_DEBUG
  169|       |    assert(itmidx < c->buflen);
  170|       |    assert(c->buffer[itmidx] != NULL);
  171|       |#endif
  172|       |
  173|    249|    *data = c->buffer[itmidx];  /* Read data and then move */
  174|    249|    return(0);  /* return success to indicate successful pop. */
  175|    374|}
rtpp_queue.c:circ_buf_remove:
  212|      1|{
  213|      1|    unsigned int clen;
  214|      1|    struct rtpp_wi *data;
  215|       |
  216|      1|    if (circ_buf_isempty(c))
  ------------------
  |  Branch (216:9): [True: 0, False: 1]
  ------------------
  217|      0|        return(-1);
  218|       |
  219|      1|    if (c->head < c->tail) {
  ------------------
  |  Branch (219:9): [True: 0, False: 1]
  ------------------
  220|      0|       clen = (c->head + c->buflen) - c->tail;
  221|      1|    } else {
  222|      1|       clen = c->head - c->tail;
  223|      1|    }
  224|      1|    if (offset >= clen)
  ------------------
  |  Branch (224:9): [True: 0, False: 1]
  ------------------
  225|      0|        return(-1);
  226|       |
  227|      1|    for (; offset > 0; offset--) {
  ------------------
  |  Branch (227:12): [True: 0, False: 1]
  ------------------
  228|      0|        assert(circ_buf_peek(c, offset - 1, &data) == 0);
  229|      0|        assert(circ_buf_replace(c, offset, &data) == 0);
  230|      0|    }
  231|       |#if RTPQ_DEBUG
  232|       |    assert(c->buffer[c->tail] != NULL);
  233|       |    c->buffer[c->tail] = NULL;
  234|       |#endif
  235|      1|    c->tail += 1;
  236|      1|    if (c->tail == c->buflen)
  ------------------
  |  Branch (236:9): [True: 0, False: 1]
  ------------------
  237|      0|        c->tail = 0;
  238|      1|    return(0);  /* return success to indicate successful removal. */
  239|      1|}

rtpp_refcnt_ctor_pa:
  135|     86|{
  136|     86|    struct rtpp_refcnt_priv *pvt;
  137|       |
  138|     86|    pvt = (struct rtpp_refcnt_priv *)pap;
  139|       |#if defined(RTPP_DEBUG)
  140|       |    pvt->pub.smethods = rtpp_refcnt_smethods;
  141|       |#endif
  142|     86|    atomic_init(&pvt->cnt, 1);
  143|     86|    pvt->flags |= RC_FLAG_PA;
  ------------------
  |  |   62|     86|#define RC_FLAG_PA         (1 << 0)
  ------------------
  144|     86|    return (&pvt->pub);
  145|     86|}
rtpp_refcnt.c:rtpp_refcnt_incref:
  163|     36|{
  164|     36|    struct rtpp_refcnt_priv *pvt;
  165|       |
  166|     36|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|     36|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  167|       |#if RTPP_DEBUG_refcnt
  168|       |    if (pvt->flags & RC_FLAG_TRACE) {
  169|       |        char *dbuf;
  170|       |        asprintf(&dbuf, "rtpp_refcnt(%p, %u).incref()", pub,
  171|       |          atomic_load(&pvt->cnt));
  172|       |        if (dbuf != NULL) {
  173|       |#ifdef RTPP_DEBUG
  174|       |            rtpp_stacktrace_print(dbuf);
  175|       |#else
  176|       |            fprintf(stderr, "%s\n", dbuf);
  177|       |#endif
  178|       |            free(dbuf);
  179|       |        }
  180|       |    }
  181|       |#endif
  182|     36|    RTPP_DBG_ASSERT(atomic_load(&pvt->cnt) > 0 && atomic_load(&pvt->cnt) < RC_ABS_MAX);
  183|     36|    atomic_fetch_add_explicit(&pvt->cnt, 1, memory_order_relaxed);
  184|     36|}
rtpp_refcnt.c:rtpp_refcnt_decref:
  188|      6|{
  189|      6|    struct rtpp_refcnt_priv *pvt;
  190|      6|    int oldcnt;
  191|       |
  192|      6|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|      6|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  193|      6|    oldcnt = atomic_fetch_sub_explicit(&pvt->cnt, 1, memory_order_release);
  194|       |#if RTPP_DEBUG_refcnt
  195|       |    if (pvt->flags & RC_FLAG_TRACE) {
  196|       |        char *dbuf;
  197|       |        asprintf(&dbuf, "rtpp_refcnt(%p, %u).decref()", pub, oldcnt);
  198|       |        if (dbuf != NULL) {
  199|       |#ifdef RTPP_DEBUG
  200|       |            rtpp_stacktrace_print(dbuf);
  201|       |#else
  202|       |            fprintf(stderr, "%s\n", dbuf);
  203|       |#endif
  204|       |            free(dbuf);
  205|       |        }
  206|       |    }
  207|       |#endif
  208|      6|    if (oldcnt == 1) {
  ------------------
  |  Branch (208:9): [True: 4, False: 2]
  ------------------
  209|      4|        atomic_thread_fence(memory_order_acquire);
  210|      4|        int flags = pvt->flags;
  211|      4|        if ((flags & RC_FLAG_PA) == 0) {
  ------------------
  |  |   62|      4|#define RC_FLAG_PA         (1 << 0)
  ------------------
  |  Branch (211:13): [True: 0, False: 4]
  ------------------
  212|      0|            if (flags & RC_FLAG_HASPRDTOR) {
  ------------------
  |  |   65|      0|#define RC_FLAG_HASPRDTOR  (1 << 3)
  ------------------
  |  Branch (212:17): [True: 0, False: 0]
  ------------------
  213|      0|                pvt->pre_dtor_f(pvt->pd_data);
  214|      0|            }
  215|      0|            if (flags & RC_FLAG_HASDTOR) {
  ------------------
  |  |   64|      0|#define RC_FLAG_HASDTOR    (1 << 2)
  ------------------
  |  Branch (215:17): [True: 0, False: 0]
  ------------------
  216|      0|                pvt->dtor_f(pvt->data);
  217|      0|            } else {
  218|      0|#if !defined(RTPP_CHECK_LEAKS)
  219|      0|                free(pvt->data);
  220|       |#else
  221|       |                rtpp_refcnt_free(pvt->data);
  222|       |#endif
  223|      0|            }
  224|      0|            rtpp_refcnt_fin(pub);
  225|      0|            free(pvt);
  226|      4|        } else {
  227|      4|            rtpp_refcnt_fin(pub);
  228|      4|            if (flags & RC_FLAG_HASPRDTOR) {
  ------------------
  |  |   65|      4|#define RC_FLAG_HASPRDTOR  (1 << 3)
  ------------------
  |  Branch (228:17): [True: 0, False: 4]
  ------------------
  229|      0|                pvt->pre_dtor_f(pvt->pd_data);
  230|      0|            }
  231|      4|            if (flags & RC_FLAG_HASDTOR) {
  ------------------
  |  |   64|      4|#define RC_FLAG_HASDTOR    (1 << 2)
  ------------------
  |  Branch (231:17): [True: 4, False: 0]
  ------------------
  232|      4|                pvt->dtor_f(pvt->data);
  233|      4|            }
  234|      4|            if (flags & RC_FLAG_PA_STDFREE) {
  ------------------
  |  |   66|      4|#define RC_FLAG_PA_STDFREE (1 << 4)
  ------------------
  |  Branch (234:17): [True: 0, False: 4]
  ------------------
  235|      0|#if !defined(RTPP_CHECK_LEAKS)
  236|      0|                free(pvt->data);
  237|       |#else
  238|       |                rtpp_refcnt_free(pvt->data);
  239|       |#endif
  240|      0|            }
  241|      4|        }
  242|       |
  243|      4|        return;
  244|      4|    }
  245|      6|}
rtpp_refcnt.c:rtpp_refcnt_attach:
  150|     68|{
  151|     68|    struct rtpp_refcnt_priv *pvt;
  152|       |
  153|     68|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|     68|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  154|     68|    RTPP_DBG_ASSERT(pvt->data == NULL && pvt->dtor_f == NULL &&
  155|     68|      !(pvt->flags & RC_FLAG_HASDTOR));
  156|     68|    pvt->data = data;
  157|     68|    pvt->dtor_f = dtor_f;
  158|     68|    pvt->flags |= RC_FLAG_HASDTOR;
  ------------------
  |  |   64|     68|#define RC_FLAG_HASDTOR    (1 << 2)
  ------------------
  159|     68|}
rtpp_refcnt.c:rtpp_refcnt_use_stdfree:
  285|     18|{
  286|     18|    struct rtpp_refcnt_priv *pvt;
  287|       |
  288|     18|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|     18|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  289|     18|    RTPP_DBG_ASSERT(pvt->data == NULL && (pvt->flags & RC_FLAG_PA) &&
  290|     18|      !(pvt->flags & RC_FLAG_PA_STDFREE));
  291|     18|    pvt->flags |= RC_FLAG_PA_STDFREE;
  ------------------
  |  |   66|     18|#define RC_FLAG_PA_STDFREE (1 << 4)
  ------------------
  292|     18|    pvt->data = data;
  293|     18|}

rtpp_sessinfo_ctor:
  175|      2|{
  176|      2|    struct rtpp_sessinfo *sessinfo;
  177|      2|    struct rtpp_sessinfo_priv *pvt;
  178|       |
  179|      2|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_sessinfo_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  180|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (180:9): [True: 0, False: 2]
  ------------------
  181|      0|        return (NULL);
  182|      0|    }
  183|      2|    sessinfo = &(pvt->pub);
  184|      2|    if (rtpp_polltbl_hst_alloc(&pvt->hst_rtp, 10) != 0) {
  ------------------
  |  Branch (184:9): [True: 0, False: 2]
  ------------------
  185|      0|        goto e6;
  186|      0|    }
  187|      2|    if (rtpp_polltbl_hst_alloc(&pvt->hst_rtcp, 10) != 0) {
  ------------------
  |  Branch (187:9): [True: 0, False: 2]
  ------------------
  188|      0|        goto e7;
  189|      0|    }
  190|      2|    pvt->hst_rtp.streams_wrt = cfsp->rtp_streams_wrt;
  191|      2|    pvt->hst_rtcp.streams_wrt = cfsp->rtcp_streams_wrt;
  192|       |
  193|      2|    PUBINST_FININIT(&pvt->pub, pvt, rtpp_sessinfo_dtor);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
  194|      2|    return (sessinfo);
  195|       |
  196|      0|e7:
  197|      0|    rtpp_polltbl_hst_dtor(&pvt->hst_rtp);
  198|      0|e6:
  199|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  200|      0|    free(pvt);
  201|      0|    return (NULL);
  202|      0|}
rtpp_sessinfo.c:rtpp_sinfo_sync_polltbl:
  387|      4|{
  388|      4|    struct rtpp_sessinfo_priv *pvt;
  389|      4|    struct rtpp_polltbl_mdata *mds;
  390|      4|    struct rtpp_polltbl_hst *hp;
  391|      4|    struct rtpp_polltbl_hst_ent *clog;
  392|      4|    int i, ulen;
  393|       |
  394|      4|    PUB2PVT(sessinfo, pvt);
  ------------------
  |  |  147|      4|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  395|       |
  396|      4|    hp = (pipe_type == PIPE_RTP) ? &pvt->hst_rtp : &pvt->hst_rtcp;
  ------------------
  |  |   34|      4|#define PIPE_RTP        1
  ------------------
  |  Branch (396:10): [True: 2, False: 2]
  ------------------
  397|       |
  398|      4|    pthread_mutex_lock(&hp->lock);
  399|      4|    if (hp->ulen == 0) {
  ------------------
  |  Branch (399:9): [True: 4, False: 0]
  ------------------
  400|      4|        pthread_mutex_unlock(&hp->lock);
  401|      4|        return (0);
  402|      4|    }
  403|       |
  404|      0|    if (hp->ulen > ptbl->aloclen - ptbl->curlen) {
  ------------------
  |  Branch (404:9): [True: 0, False: 0]
  ------------------
  405|      0|        int alen = hp->ulen + ptbl->curlen;
  406|       |
  407|      0|        mds = realloc(ptbl->mds, (alen * sizeof(struct rtpp_polltbl_mdata)));
  408|      0|        if (mds == NULL) {
  ------------------
  |  Branch (408:13): [True: 0, False: 0]
  ------------------
  409|      0|            goto e0;
  410|      0|        }
  411|      0|        ptbl->mds = mds;
  412|      0|        ptbl->aloclen = alen;
  413|      0|    }
  414|       |
  415|      0|    struct rtpp_polltbl_hst_part hpp = hp->main;
  416|      0|    hp->main = hp->shadow;
  417|      0|    hp->shadow = hpp;
  418|      0|    clog = hpp.clog;
  419|      0|    ulen = hp->ulen;
  420|      0|    hp->ulen = 0;
  421|      0|    ptbl->streams_wrt = hp->streams_wrt;
  422|      0|    pthread_mutex_unlock(&hp->lock);
  423|       |
  424|      0|    for (i = 0; i < ulen; i++) {
  ------------------
  |  Branch (424:17): [True: 0, False: 0]
  ------------------
  425|      0|        struct rtpp_polltbl_hst_ent *hep;
  426|      0|        int session_index, movelen;
  427|      0|        struct epoll_event event;
  428|       |
  429|      0|        hep = clog + i;
  430|      0|        switch (hep->op) {
  ------------------
  |  Branch (430:17): [True: 0, False: 0]
  ------------------
  431|      0|        case HST_ADD:
  ------------------
  |  Branch (431:9): [True: 0, False: 0]
  ------------------
  432|       |#ifdef RTPP_DEBUG
  433|       |            assert(find_polltbl_idx(ptbl, hep->stuid) < 0);
  434|       |#endif
  435|      0|            session_index = ptbl->curlen;
  436|      0|            event.events = EPOLLIN;
  437|      0|            event.data.ptr = hep->skt;
  438|      0|            rtpp_epoll_ctl(ptbl->epfd, EPOLL_CTL_ADD, CALL_METHOD(hep->skt, getfd), &event);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  439|      0|            ptbl->mds[session_index].stuid = hep->stuid;
  440|      0|            ptbl->mds[session_index].skt = hep->skt;
  441|      0|            ptbl->curlen++;
  442|      0|            break;
  443|       |
  444|      0|        case HST_DEL:
  ------------------
  |  Branch (444:9): [True: 0, False: 0]
  ------------------
  445|      0|            session_index = find_polltbl_idx(ptbl, hep->stuid);
  446|      0|            assert(session_index > -1);
  447|      0|            rtpp_epoll_ctl(ptbl->epfd, EPOLL_CTL_DEL, CALL_METHOD(ptbl->mds[session_index].skt, getfd), NULL);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  448|      0|            RTPP_OBJ_DECREF(ptbl->mds[session_index].skt);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  449|      0|            movelen = (ptbl->curlen - session_index - 1);
  450|      0|            if (movelen > 0) {
  ------------------
  |  Branch (450:17): [True: 0, False: 0]
  ------------------
  451|      0|                memmove(&ptbl->mds[session_index], &ptbl->mds[session_index + 1],
  452|      0|                  movelen * sizeof(ptbl->mds[0]));
  453|      0|            }
  454|      0|            ptbl->curlen--;
  455|      0|            break;
  456|       |
  457|      0|        case HST_UPD:
  ------------------
  |  Branch (457:9): [True: 0, False: 0]
  ------------------
  458|      0|            session_index = find_polltbl_idx(ptbl, hep->stuid);
  459|      0|            assert(session_index > -1);
  460|      0|            rtpp_epoll_ctl(ptbl->epfd, EPOLL_CTL_DEL, CALL_METHOD(ptbl->mds[session_index].skt, getfd), NULL);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  461|      0|            RTPP_OBJ_DECREF(ptbl->mds[session_index].skt);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  462|      0|            event.events = EPOLLIN;
  463|      0|            event.data.ptr = hep->skt;
  464|      0|            rtpp_epoll_ctl(ptbl->epfd, EPOLL_CTL_ADD, CALL_METHOD(hep->skt, getfd), &event);
  ------------------
  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  ------------------
  465|      0|            ptbl->mds[session_index].skt = hep->skt;
  466|      0|            break;
  467|      0|        }
  468|      0|    }
  469|      0|    ptbl->revision += ulen;
  470|       |
  471|      0|    return (1);
  472|      0|e0:
  473|      0|    for (i = 0; i < hp->ulen; i++) {
  ------------------
  |  Branch (473:17): [True: 0, False: 0]
  ------------------
  474|      0|        struct rtpp_polltbl_hst_ent *hep;
  475|       |
  476|      0|        hep = hp->main.clog + i;
  477|      0|        if (hep->skt != NULL) {
  ------------------
  |  Branch (477:13): [True: 0, False: 0]
  ------------------
  478|      0|            RTPP_OBJ_DECREF(hep->skt);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  479|      0|        }
  480|      0|    }
  481|      0|    hp->ulen = 0;
  482|      0|    pthread_mutex_unlock(&hp->lock);
  483|      0|    return (-1);
  484|      0|}
rtpp_sessinfo.c:rtpp_polltbl_hst_alloc:
  100|      4|{
  101|       |
  102|      4|    hp->main.clog = rtpp_zmalloc(sizeof(struct rtpp_polltbl_hst_ent) * alen);
  103|      4|    if (hp->main.clog == NULL) {
  ------------------
  |  Branch (103:9): [True: 0, False: 4]
  ------------------
  104|      0|        goto e0;
  105|      0|    }
  106|      4|    hp->shadow.clog = rtpp_zmalloc(sizeof(struct rtpp_polltbl_hst_ent) * alen);
  107|      4|    if (hp->shadow.clog == NULL) {
  ------------------
  |  Branch (107:9): [True: 0, False: 4]
  ------------------
  108|      0|        goto e1;
  109|      0|    }
  110|      4|    if (pthread_mutex_init(&hp->lock, NULL) != 0)
  ------------------
  |  Branch (110:9): [True: 0, False: 4]
  ------------------
  111|      0|        goto e2;
  112|      4|    hp->main.alen = hp->shadow.alen = hp->ilen = alen;
  113|      4|    return (0);
  114|      0|e2:
  115|      0|    free(hp->shadow.clog);
  116|      0|e1:
  117|      0|    free(hp->main.clog);
  118|      0|e0:
  119|      0|    return (-1);
  120|      0|}

find_stream:
  349|    649|{
  350|    649|    struct session_match_args ma;
  351|       |
  352|    649|    memset(&ma, '\0', sizeof(ma));
  353|    649|    ma.from_tag = from_tag;
  354|    649|    ma.to_tag = to_tag;
  355|    649|    ma.rval = -1;
  356|       |
  357|    649|    CALL_SMETHOD(cfsp->sessions_ht, foreach_key_str, call_id,
  ------------------
  |  |  134|    649|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|    649|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|    649|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|    649|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|    649|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|    649|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|    649|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|    649|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|    649|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|    649|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|    649|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|    649|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|    649|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|    649|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|    649|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|    649|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|    649|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|    649|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|    649|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|    649|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|    649|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|    649|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|    649|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|    649|)
  |  |  ------------------
  ------------------
  358|    649|      rtpp_session_ematch, &ma);
  359|    649|    if (ma.rval != -1) {
  ------------------
  |  Branch (359:9): [True: 0, False: 649]
  ------------------
  360|      0|        *spp = ma.sp;
  361|      0|    }
  362|    649|    return ma.rval;
  363|    649|}

rtpp_stats_ctor:
  191|      2|{
  192|      2|    struct rtpp_stats_full *fp;
  193|      2|    struct rtpp_stats *pub;
  194|      2|    struct rtpp_stats_priv *pvt;
  195|      2|    struct rtpp_stat *st;
  196|      2|    struct rtpp_stat_derived *dst;
  197|      2|    int i, idx;
  198|       |
  199|      2|    fp = rtpp_rzmalloc(sizeof(struct rtpp_stats_full), PVT_RCOFFS(fp));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  200|      2|    if (fp == NULL) {
  ------------------
  |  Branch (200:9): [True: 0, False: 2]
  ------------------
  201|      0|        goto e0;
  202|      0|    }
  203|      2|    pub = &(fp->pub);
  204|      2|    pvt = &(fp->pvt);
  205|      2|    pvt->stats = rtpp_zmalloc(sizeof(struct rtpp_stat) *
  206|      2|      count_rtpp_stats(default_stats));
  207|      2|    if (pvt->stats == NULL) {
  ------------------
  |  Branch (207:9): [True: 0, False: 2]
  ------------------
  208|      0|        goto e1;
  209|      0|    }
  210|      2|    i = count_rtpp_stats_derived(default_stats);
  211|      2|    if (i > 0) {
  ------------------
  |  Branch (211:9): [True: 2, False: 0]
  ------------------
  212|      2|        pvt->dstats = rtpp_zmalloc(sizeof(struct rtpp_stat_derived) * i);
  213|      2|        if (pvt->dstats == NULL)
  ------------------
  |  Branch (213:13): [True: 0, False: 2]
  ------------------
  214|      0|            goto e2;
  215|      2|    }
  216|     60|    for (i = 0; default_stats[i].name != NULL; i++) {
  ------------------
  |  Branch (216:17): [True: 58, False: 2]
  ------------------
  217|     58|        st = &pvt->stats[pvt->nstats];
  218|     58|        st->descr = &default_stats[i];
  219|     58|        if (pthread_mutex_init(&st->mutex, NULL) != 0) {
  ------------------
  |  Branch (219:13): [True: 0, False: 58]
  ------------------
  220|      0|            while ((pvt->nstats - 1) >= 0) {
  ------------------
  |  Branch (220:20): [True: 0, False: 0]
  ------------------
  221|      0|                st = &pvt->stats[pvt->nstats - 1];
  222|      0|                pthread_mutex_destroy(&st->mutex);
  223|      0|                pvt->nstats -= 1;
  224|      0|            }
  225|      0|            goto e2;
  226|      0|        }
  227|     58|        if (default_stats[i].type == RTPP_CNT_U64) {
  ------------------
  |  Branch (227:13): [True: 54, False: 4]
  ------------------
  228|     54|            atomic_init(&st->cnt.u64, 0);
  229|     54|        } else {
  230|      4|            st->cnt.d = 0.0;
  231|      4|        }
  232|     58|        pvt->nstats += 1;
  233|     58|    }
  234|      2|    pvt->rppp = rtpp_pearson_perfect_ctor(getdstat, pvt);
  235|      2|    if (pvt->rppp == NULL) {
  ------------------
  |  Branch (235:9): [True: 0, False: 2]
  ------------------
  236|      0|        goto e2;
  237|      0|    }
  238|      2|    pub->pvt = pvt;
  239|     60|    for (i = 0; default_stats[i].name != NULL; i++) {
  ------------------
  |  Branch (239:17): [True: 58, False: 2]
  ------------------
  240|     58|        if (default_stats[i].derive_from == NULL)
  ------------------
  |  Branch (240:13): [True: 56, False: 2]
  ------------------
  241|     56|            continue;
  242|      2|        dst = &pvt->dstats[pvt->nstats_derived];
  243|      2|        idx = rtpp_stats_getidxbyname(pub, default_stats[i].name);
  244|      2|        dst->derive_to = &pvt->stats[idx];
  245|      2|        idx = rtpp_stats_getidxbyname(pub, default_stats[i].derive_from);
  246|      2|        dst->derive_from = &pvt->stats[idx];
  247|      2|        pvt->nstats_derived += 1;
  248|      2|        dst->last_ts = getdtime();
  249|      2|    }
  250|      2|    PUBINST_FININIT(pub, fp, rtpp_stats_dtor);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
  251|      2|    return (pub);
  252|      0|e2:
  253|      0|    if (pvt->dstats != NULL)
  ------------------
  |  Branch (253:9): [True: 0, False: 0]
  ------------------
  254|      0|        free(pvt->dstats);
  255|      0|    free(pvt->stats);
  256|      0|e1:
  257|      0|    RTPP_OBJ_DECREF(pub);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  258|      0|    free(fp);
  259|      0|e0:
  260|      0|    return (NULL);
  261|      0|}
rtpp_stats.c:rtpp_stats_getlvalbyname:
  320|    190|{
  321|    190|    struct rtpp_stats_priv *pvt;
  322|    190|    struct rtpp_stat *st;
  323|    190|    uint64_t rval;
  324|    190|    int idx;
  325|       |
  326|    190|    idx = rtpp_stats_getidxbyname(self, name);
  327|    190|    if (idx < 0) {
  ------------------
  |  Branch (327:9): [True: 0, False: 190]
  ------------------
  328|      0|        return (-1);
  329|      0|    }
  330|    190|    pvt = self->pvt;
  331|    190|    st = &pvt->stats[idx];
  332|    190|    rval = atomic_load_explicit(&st->cnt.u64, memory_order_relaxed);
  333|    190|    return (rval);
  334|    190|}
rtpp_stats.c:rtpp_stats_getnstats:
  386|    148|{
  387|       |
  388|    148|    return (self->pvt->nstats);
  389|    148|}
rtpp_stats.c:rtpp_stats_nstr:
  338|    657|{
  339|    657|    struct rtpp_stats_priv *pvt;
  340|    657|    struct rtpp_stat *st;
  341|    657|    int idx, rval;
  342|    657|    uint64_t uval;
  343|    657|    double dval;
  344|       |
  345|    657|    idx = rtpp_stats_getidxbyname(self, name);
  346|    657|    if (idx < 0) {
  ------------------
  |  Branch (346:9): [True: 83, False: 574]
  ------------------
  347|     83|        return (-1);
  348|     83|    }
  349|    574|    pvt = self->pvt;
  350|    574|    st = &pvt->stats[idx];
  351|    574|    if (pvt->stats[idx].descr->type == RTPP_CNT_U64) {
  ------------------
  |  Branch (351:9): [True: 57, False: 517]
  ------------------
  352|     57|        uval = atomic_load_explicit(&st->cnt.u64, memory_order_relaxed);
  353|     57|        rval = snprintf(buf, len, "%" PRIu64, uval);
  354|    517|    } else {
  355|    517|        pthread_mutex_lock(&st->mutex);
  356|    517|        dval = st->cnt.d;
  357|    517|        pthread_mutex_unlock(&st->mutex);
  358|    517|        rval = snprintf(buf, len, "%f", dval);
  359|    517|    }
  360|    574|    return (rval);
  361|    657|}
rtpp_stats.c:rtpp_stats_update_derived:
  393|      1|{
  394|      1|    struct rtpp_stats_priv *pvt;
  395|      1|    int i;
  396|      1|    struct rtpp_stat_derived *dst;
  397|      1|    double ival, dval;
  398|      1|    union rtpp_stat_cnt last_val;
  399|       |
  400|      1|    pvt = self->pvt;
  401|      2|    for (i = 0; i < pvt->nstats_derived; i++) {
  ------------------
  |  Branch (401:17): [True: 1, False: 1]
  ------------------
  402|      1|        dst = &pvt->dstats[i];
  403|      1|        assert(dst->last_ts < dtime);
  404|      1|        ival = dtime - dst->last_ts;
  405|      1|        if (dst->derive_from->descr->type == RTPP_CNT_U64) {
  ------------------
  |  Branch (405:13): [True: 1, False: 0]
  ------------------
  406|      1|            last_val.u64 = dst->last_val.u64;
  407|      1|            dst->last_val.u64 = atomic_load_explicit(&dst->derive_from->cnt.u64, memory_order_relaxed);
  408|      1|            dval = (dst->last_val.u64 - last_val.u64) / ival;
  409|      1|        } else {
  410|      0|            last_val.d = dst->last_val.d;
  411|      0|            pthread_mutex_lock(&dst->derive_from->mutex);
  412|      0|            dst->last_val.d = dst->derive_from->cnt.d;
  413|      0|            pthread_mutex_unlock(&dst->derive_from->mutex);
  414|      0|            dval = (dst->last_val.d - last_val.d) / ival;
  415|      0|        }
  416|      1|        pthread_mutex_lock(&dst->derive_to->mutex);
  417|      1|        dst->derive_to->cnt.d = dval;
  418|      1|        pthread_mutex_unlock(&dst->derive_to->mutex);
  419|      1|        dst->last_ts = dtime;
  420|      1|    }
  421|      1|}
rtpp_stats.c:count_rtpp_stats:
  165|      2|{
  166|      2|    int nstats, i;
  167|       |
  168|      2|    nstats = 0;
  169|     60|    for (i = 0; sp[i].name != NULL; i++) {
  ------------------
  |  Branch (169:17): [True: 58, False: 2]
  ------------------
  170|     58|        nstats += 1;
  171|     58|    }
  172|      2|    return (nstats);
  173|      2|}
rtpp_stats.c:count_rtpp_stats_derived:
  177|      2|{
  178|      2|    int nstats, i;
  179|       |
  180|      2|    nstats = 0;
  181|     60|    for (i = 0; sp[i].name != NULL; i++) {
  ------------------
  |  Branch (181:17): [True: 58, False: 2]
  ------------------
  182|     58|        if (sp[i].derive_from == NULL)
  ------------------
  |  Branch (182:13): [True: 56, False: 2]
  ------------------
  183|     56|            continue;
  184|      2|        nstats += 1;
  185|      2|    }
  186|      2|    return (nstats);
  187|      2|}
rtpp_stats.c:getdstat:
  152|  1.27k|{
  153|  1.27k|    struct rtpp_stats_priv *pvt;
  154|       |
  155|  1.27k|    pvt = (struct rtpp_stats_priv *)p;
  156|  1.27k|    if (n >= pvt->nstats) {
  ------------------
  |  Branch (156:9): [True: 2, False: 1.27k]
  ------------------
  157|      2|        return (NULL);
  158|      2|    }
  159|       |
  160|  1.27k|    return (pvt->stats[n].descr->name);
  161|  1.27k|}
rtpp_stats.c:rtpp_stats_getidxbyname:
  265|    899|{
  266|    899|    struct rtpp_stats_priv *pvt;
  267|       |
  268|    899|    pvt = self->pvt;
  269|    899|    return (CALL_SMETHOD(pvt->rppp, hash, name));
  ------------------
  |  |  134|    899|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|    899|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|    899|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|    899|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|    899|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|    899|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|    899|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|    899|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|    899|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|    899|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|    899|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|    899|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|    899|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|    899|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|    899|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|    899|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|    899|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|    899|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|    899|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|    899|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|    899|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|    899|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|    899|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|    899|)
  |  |  ------------------
  ------------------
  270|    899|}

getdtime:
   48|    135|{
   49|       |
   50|    135|    return (_getdtime(RTPP_CLOCK_MONO));
  ------------------
  |  |   40|    135|#  define RTPP_CLOCK_MONO CLOCK_BOOTTIME
  ------------------
   51|    135|}
rtpp_timestamp_get:
   55|      2|{
   56|       |
   57|      2|    tp->wall = _getdtime(RTPP_CLOCK_REAL);
  ------------------
  |  |   52|      2|# define RTPP_CLOCK_REAL CLOCK_REALTIME
  ------------------
   58|      2|    tp->mono = _getdtime(RTPP_CLOCK_MONO);
  ------------------
  |  |   40|      2|#  define RTPP_CLOCK_MONO CLOCK_BOOTTIME
  ------------------
   59|      2|}
rtpp_time.c:_getdtime:
   37|    139|{
   38|    139|    struct timespec tp;
   39|       |
   40|    139|    if (clock_gettime(clock_id, &tp) == -1)
  ------------------
  |  Branch (40:9): [True: 0, False: 139]
  ------------------
   41|      0|        return (-1);
   42|       |
   43|    139|    return timespec2dtime(&tp);
  ------------------
  |  |   67|    139|#define timespec2dtime(s) ((double)SEC(s) + \
  |  |  ------------------
  |  |  |  |   56|    139|#define SEC(x)   ((x)->tv_sec)
  |  |  ------------------
  |  |   68|    139|  (double)NSEC(s) / 1000000000.0)
  |  |  ------------------
  |  |  |  |   57|    139|#define NSEC(x)  ((x)->tv_nsec)
  |  |  ------------------
  ------------------
   44|    139|}

rtpp_timed_ctor:
  145|      2|{
  146|      2|    struct rtpp_timed_cf *rtcp;
  147|       |
  148|      2|    rtcp = rtpp_rzmalloc(sizeof(struct rtpp_timed_cf), PVT_RCOFFS(rtcp));
  ------------------
  |  |  144|      2|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
  149|      2|    if (rtcp == NULL) {
  ------------------
  |  Branch (149:9): [True: 0, False: 2]
  ------------------
  150|      0|        goto e0;
  151|      0|    }
  152|      2|    rtcp->q = rtpp_queue_init(RTPQ_SMALL_CB_LEN, "rtpp_timed(requests)");
  ------------------
  |  |   74|      2|#define RTPQ_SMALL_CB_LEN 16
  ------------------
  153|      2|    if (rtcp->q == NULL) {
  ------------------
  |  Branch (153:9): [True: 0, False: 2]
  ------------------
  154|      0|        goto e1;
  155|      0|    }
  156|      2|    rtpp_queue_setqlen(rtcp->q, 0);
  157|      2|    rtcp->cmd_q = rtpp_queue_init(RTPQ_TINY_CB_LEN, "rtpp_timed(commands)");
  ------------------
  |  |   73|      2|#define RTPQ_TINY_CB_LEN  4
  ------------------
  158|      2|    if (rtcp->cmd_q == NULL) {
  ------------------
  |  Branch (158:9): [True: 0, False: 2]
  ------------------
  159|      0|        goto e2;
  160|      0|    }
  161|       |    /*
  162|       |     * Pre-allocate sigterm, so that we don't have any malloc() in
  163|       |     * the destructor.
  164|       |     */
  165|      2|    rtcp->sigterm = rtpp_wi_malloc_sgnl(SIGTERM, NULL, 0);
  166|      2|    if (rtcp->sigterm == NULL) {
  ------------------
  |  Branch (166:9): [True: 0, False: 2]
  ------------------
  167|      0|        goto e3;
  168|      0|    }
  169|      2|    rtcp->elp = prdic_init(1.0 / run_period, 0.0);
  170|      2|    if (rtcp->elp == NULL) {
  ------------------
  |  Branch (170:9): [True: 0, False: 2]
  ------------------
  171|      0|        goto e4;
  172|      0|    }
  173|      2|    if (pthread_create(&rtcp->thread_id, NULL,
  ------------------
  |  Branch (173:9): [True: 0, False: 2]
  ------------------
  174|      2|      (void *(*)(void *))&rtpp_timed_queue_run, rtcp) != 0) {
  175|      0|        goto e5;
  176|      0|    }
  177|       |#if HAVE_PTHREAD_SETNAME_NP
  178|       |    (void)pthread_setname_np(rtcp->thread_id, "rtpp_timed_queue");
  179|       |#endif
  180|      2|    rtcp->last_run = getdtime();
  181|      2|    rtcp->period = run_period;
  182|      2|    rtcp->wi_dsize = sizeof(struct rtpp_timed_wi) + rtpp_refcnt_osize;
  183|      2|    PUBINST_FININIT(&rtcp->pub, rtcp, rtpp_timed_destroy);
  ------------------
  |  |   76|      2|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|      2|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      2|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      2|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      2|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      2|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      2|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      2|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      2|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      2|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      2|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      2|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      2|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      2|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      2|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      2|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      2|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      2|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      2|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      2|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      2|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      2|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      2|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      2|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      2|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|      2|      pvt_inst);
  ------------------
  184|      2|    return (&rtcp->pub);
  185|      0|e5:
  186|      0|    prdic_free(rtcp->elp);
  187|      0|e4:
  188|      0|    RTPP_OBJ_DECREF(rtcp->sigterm);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  189|      0|e3:
  190|      0|    rtpp_queue_destroy(rtcp->cmd_q);
  191|      0|e2:
  192|      0|    rtpp_queue_destroy(rtcp->q);
  193|      0|e1:
  194|      0|    RTPP_OBJ_DECREF(&(rtcp->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  195|      0|    free(rtcp);
  196|      0|e0:
  197|      0|    return (NULL);
  198|      0|}
rtpp_timed.c:rtpp_timed_schedule_base:
  230|      4|{
  231|      4|    struct rtpp_wi *wi;
  232|      4|    struct rtpp_timed_wi *wi_data;
  233|      4|    struct rtpp_timed_cf *rtpp_timed_cf;
  234|       |
  235|      4|    rtpp_timed_cf = (struct rtpp_timed_cf *)pub;
  236|       |    
  237|      4|    wi = rtpp_wi_malloc_udata((void **)&wi_data, rtpp_timed_cf->wi_dsize);
  238|      4|    if (wi == NULL) {
  ------------------
  |  Branch (238:9): [True: 0, False: 4]
  ------------------
  239|      0|        return (NULL);
  240|      0|    }
  241|      4|    memset(wi_data, '\0', rtpp_timed_cf->wi_dsize);
  242|      4|    wi_data->wi = wi;
  243|      4|    wi_data->pub.rcnt = rtpp_refcnt_ctor_pa(&wi_data->rco[0]);
  244|      4|    if (wi_data->pub.rcnt == NULL) {
  ------------------
  |  Branch (244:9): [True: 0, False: 4]
  ------------------
  245|      0|        RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  246|      0|        return (NULL);
  247|      0|    }
  248|      4|    wi_data->cb.func = cb_func;
  249|      4|    wi_data->cb.arg = cb_func_arg;
  250|      4|    wi_data->cancel_cb.func = cancel_cb_func;
  251|      4|    wi_data->cancel_cb.arg = cb_func_arg;
  252|      4|    wi_data->when = getdtime() + offset;
  253|      4|    wi_data->offset = offset;
  254|      4|    wi_data->callback_rcnt = callback_rcnt;
  255|      4|    if (callback_rcnt != NULL) {
  ------------------
  |  Branch (255:9): [True: 4, False: 0]
  ------------------
  256|      4|        RC_INCREF(callback_rcnt);
  ------------------
  |  |   66|      4|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  ------------------
  |  |  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      4|)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  257|      4|    }
  258|      4|    if (support_cancel != 0) {
  ------------------
  |  Branch (258:9): [True: 4, False: 0]
  ------------------
  259|      4|        wi_data->pub.cancel = &rtpp_timed_cancel;
  260|      4|        wi_data->timed_cf = rtpp_timed_cf;
  261|      4|        RTPP_OBJ_INCREF(pub);
  ------------------
  |  |  151|      4|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      4|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      4|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  262|      4|    }
  263|      4|    RTPP_OBJ_INCREF(&(wi_data->pub));
  ------------------
  |  |  151|      4|#define RTPP_OBJ_INCREF(obj) RC_INCREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   66|      4|#define RC_INCREF(rp) CALL_SMETHOD(rp, incref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      4|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  264|      4|    rtpp_queue_put_item(wi, rtpp_timed_cf->q);
  265|      4|    CALL_SMETHOD(wi_data->pub.rcnt, attach, (rtpp_refcnt_dtor_t)&rtpp_timed_task_dtor,
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
  266|      4|      wi_data);
  267|      4|    return (&(wi_data->pub));
  268|      4|}
rtpp_timed.c:rtpp_timed_schedule_rc:
  274|      4|{
  275|      4|    struct rtpp_timed_task *tpub;
  276|       |
  277|      4|    tpub = rtpp_timed_schedule_base(pub, offset, callback_rcnt, cb_func,
  278|      4|      cancel_cb_func, cb_func_arg, 1);
  279|      4|    if (tpub == NULL) {
  ------------------
  |  Branch (279:9): [True: 0, False: 4]
  ------------------
  280|      0|        return (NULL);
  281|      0|    }
  282|      4|    return (tpub);
  283|      4|}
rtpp_timed.c:rtpp_timed_queue_run:
  107|      2|{
  108|      2|    struct rtpp_timed_cf *rtcp;
  109|      2|    struct rtpp_wi *wi;
  110|      2|    struct rtpp_timed_wi *wi_data;
  111|      2|    int signum;
  112|      2|    double ctime;
  113|       |
  114|      2|    rtcp = (struct rtpp_timed_cf *)argp;
  115|    125|    for (;;) {
  116|    125|        if (rtpp_queue_get_length(rtcp->cmd_q) > 0) {
  ------------------
  |  Branch (116:13): [True: 0, False: 125]
  ------------------
  117|      0|            wi = rtpp_queue_get_item(rtcp->cmd_q, 0);
  118|      0|            signum = rtpp_wi_sgnl_get_signum(wi);
  119|      0|            RTPP_OBJ_DECREF(wi);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  120|      0|            if (signum == SIGTERM) {
  ------------------
  |  Branch (120:17): [True: 0, False: 0]
  ------------------
  121|      0|                break;
  122|      0|            }
  123|      0|        }
  124|    125|        ctime = getdtime();
  125|    125|        rtpp_timed_process(rtcp, ctime);
  126|    125|        prdic_procrastinate(rtcp->elp);
  127|    125|    }
  128|       |    /* We are terminating, get rid of all requests */
  129|      2|    while (rtpp_queue_get_length(rtcp->q) > 0) {
  ------------------
  |  Branch (129:12): [True: 0, False: 2]
  ------------------
  130|      0|        wi = rtpp_queue_get_item(rtcp->q, 1);
  131|      0|        wi_data = rtpp_wi_data_get_ptr(wi, rtcp->wi_dsize, rtcp->wi_dsize);
  132|      0|        if (wi_data->cancel_cb.func != NULL) {
  ------------------
  |  Branch (132:13): [True: 0, False: 0]
  ------------------
  133|      0|            wi_data->cancel_cb.func(wi_data->cancel_cb.arg);
  134|      0|        }
  135|      0|        if (wi_data->callback_rcnt != NULL) {
  ------------------
  |  Branch (135:13): [True: 0, False: 0]
  ------------------
  136|      0|            RC_DECREF(wi_data->callback_rcnt);
  ------------------
  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  137|      0|        }
  138|      0|        RTPP_OBJ_DECREF(&(wi_data->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  139|      0|    }
  140|      2|    prdic_free(rtcp->elp);
  141|      2|}
rtpp_timed.c:rtpp_timed_process:
  322|    125|{
  323|    125|    struct rtpp_wi *wi;
  324|    125|    struct rtpp_timed_wi *wi_data;
  325|    125|    struct rtpp_timed_istime_arg istime_arg;
  326|    125|    enum rtpp_timed_cb_rvals cb_rval;
  327|       |
  328|    125|    istime_arg.ctime = ctime;
  329|    125|    istime_arg.wi_dsize = rtcp->wi_dsize;
  330|    126|    for (;;) {
  331|    126|        wi = rtpp_queue_get_first_matching(rtcp->q, rtpp_timed_istime,
  332|    126|          &istime_arg);
  333|    126|        if (wi == NULL) {
  ------------------
  |  Branch (333:13): [True: 125, False: 1]
  ------------------
  334|    125|            return;
  335|    125|        }
  336|      1|        wi_data = rtpp_wi_data_get_ptr(wi, rtcp->wi_dsize, rtcp->wi_dsize);
  337|      1|        cb_rval = wi_data->cb.func(ctime, wi_data->cb.arg);
  338|      1|        if (cb_rval == CB_MORE) {
  ------------------
  |  Branch (338:13): [True: 1, False: 0]
  ------------------
  339|      2|            while (wi_data->when <= ctime) {
  ------------------
  |  Branch (339:20): [True: 1, False: 1]
  ------------------
  340|       |                /* Make sure next run is in the future */
  341|      1|                wi_data->when += wi_data->offset;
  342|      1|            }
  343|      1|            rtpp_queue_put_item(wi, rtcp->q);
  344|      1|            continue;
  345|      1|        }
  346|      0|        if (wi_data->callback_rcnt != NULL) {
  ------------------
  |  Branch (346:13): [True: 0, False: 0]
  ------------------
  347|      0|            RC_DECREF(wi_data->callback_rcnt);
  ------------------
  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  ------------------
  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|      0|)
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  348|      0|        }
  349|      0|        RTPP_OBJ_DECREF(&(wi_data->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  350|      0|    }
  351|    125|}
rtpp_timed.c:rtpp_timed_istime:
  308|    249|{
  309|    249|    struct rtpp_timed_istime_arg *ap;
  310|    249|    struct rtpp_timed_wi *wi_data;
  311|       |
  312|    249|    ap = (struct rtpp_timed_istime_arg *)p;
  313|    249|    wi_data = rtpp_wi_data_get_ptr(wi, ap->wi_dsize, ap->wi_dsize);
  314|    249|    if (wi_data->when <= ap->ctime) {
  ------------------
  |  Branch (314:9): [True: 1, False: 248]
  ------------------
  315|      1|       return (0);
  316|      1|    }
  317|    248|    return (1);
  318|    249|}

rtpp_tnotify_set_ctor:
   89|      2|{
   90|      2|    struct rtpp_tnotify_set_priv *pvt;
   91|       |
   92|      2|    pvt = rtpp_zmalloc(sizeof(struct rtpp_tnotify_set_priv));
   93|      2|    if (pvt == NULL) {
  ------------------
  |  Branch (93:9): [True: 0, False: 2]
  ------------------
   94|      0|        return (NULL);
   95|      0|    }
   96|      2|    pvt->pub.dtor = &rtpp_tnotify_set_dtor;
   97|      2|    pvt->pub.append = &rtpp_tnotify_set_append;
   98|      2|    pvt->pub.lookup = &rtpp_tnotify_set_lookup;
   99|      2|    pvt->pub.isenabled = &rtpp_tnotify_set_isenabled;
  100|       |
  101|      2|    return (&pvt->pub);
  102|      2|}
rtpp_tnotify_set.c:rtpp_tnotify_set_append:
  234|      2|{
  235|      2|    int rval;
  236|      2|    struct rtpp_tnotify_set_priv *pvt;
  237|      2|    struct rtpp_tnotify_target *tntp;
  238|      2|    struct rtpp_tnotify_wildcard *tnwp;
  239|      2|    union rtpp_tnotify_entry rte;
  240|       |
  241|      2|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|      2|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  242|      2|    memset(&rte, '\0', sizeof(union rtpp_tnotify_entry));
  243|      2|    rval = parse_timeout_sock(socket_name, &rte, e);
  244|      2|    if (rval < 0) {
  ------------------
  |  Branch (244:9): [True: 0, False: 2]
  ------------------
  245|      0|        goto e0;
  246|      0|    }
  247|      2|    tntp = NULL;
  248|      2|    tnwp = NULL;
  249|      2|    if (rval == 0) {
  ------------------
  |  Branch (249:9): [True: 2, False: 0]
  ------------------
  250|      2|        if (pvt->tp_len == RTPP_TNOTIFY_TARGETS_MAX) {
  ------------------
  |  |   57|      2|#define RTPP_TNOTIFY_TARGETS_MAX 64
  ------------------
  |  Branch (250:13): [True: 0, False: 2]
  ------------------
  251|      0|            *e = "Number of notify targets exceeds RTPP_TNOTIFY_TARGETS_MAX";
  252|      0|            goto e0;
  253|      0|        }
  254|      2|        tntp = malloc(sizeof(struct rtpp_tnotify_target));
  255|      2|        if (tntp == NULL) {
  ------------------
  |  Branch (255:13): [True: 0, False: 2]
  ------------------
  256|      0|             *e = strerror(errno);
  257|      0|             goto e1;
  258|      0|        }
  259|      2|        memcpy(tntp, &rte.rtt, sizeof(struct rtpp_tnotify_target));
  260|      2|        tntp->connected = 0;
  261|      2|        tntp->fd = -1;
  262|      2|        pvt->tp[pvt->tp_len] = tntp;
  263|      2|        pvt->tp_len += 1;
  264|      2|    } else {
  265|      0|        if (pvt->wp_len == RTPP_TNOTIFY_WILDCARDS_MAX) {
  ------------------
  |  |   58|      0|#define RTPP_TNOTIFY_WILDCARDS_MAX 2
  ------------------
  |  Branch (265:13): [True: 0, False: 0]
  ------------------
  266|      0|            *e = "Number of notify wildcards exceeds RTPP_TNOTIFY_WILDCARDS_MAX";
  267|      0|            goto e0;
  268|      0|        }
  269|      0|        tnwp = malloc(sizeof(struct rtpp_tnotify_wildcard));
  270|      0|        if (tnwp == NULL) {
  ------------------
  |  Branch (270:13): [True: 0, False: 0]
  ------------------
  271|      0|             *e = strerror(errno);
  272|      0|             goto e1;
  273|      0|        }
  274|      0|        memcpy(tnwp, &rte.rtw, sizeof(struct rtpp_tnotify_wildcard));
  275|      0|        pvt->wp[pvt->wp_len] = tnwp;
  276|      0|        pvt->wp_len += 1;
  277|      0|    }
  278|       |
  279|      2|    return (0);
  280|       |
  281|      0|e1:
  282|      0|    if (tntp != NULL)
  ------------------
  |  Branch (282:9): [True: 0, False: 0]
  ------------------
  283|      0|        free(tntp);
  284|      0|    if (tnwp != NULL)
  ------------------
  |  Branch (284:9): [True: 0, False: 0]
  ------------------
  285|      0|        free(tnwp);
  286|      0|e0:
  287|      0|    return (-1);
  288|      0|}
rtpp_tnotify_set.c:parse_timeout_sock:
  167|      2|{
  168|      2|    char host[512], port[10];
  169|      2|    char *new_sn, **snp;
  170|      2|    int n, rval;
  171|      2|    const char *sprefix, *usock_name;
  172|      2|    struct sockaddr_un *ifsun;
  173|      2|    struct sockaddr *ifsa;
  174|       |
  175|      2|    snp = &rtep->rtt.socket_name;
  176|      2|    rval = 0;
  177|      2|    sprefix = NULL;
  178|      2|    if (strncmp("unix:", sock_name, 5) == 0) {
  ------------------
  |  Branch (178:9): [True: 0, False: 2]
  ------------------
  179|      0|        usock_name = sock_name + 5;
  180|      0|        rtep->rtt.socket_type = AF_LOCAL;
  181|      2|    } else if (strncmp("tcp:", sock_name, 4) == 0) {
  ------------------
  |  Branch (181:16): [True: 2, False: 0]
  ------------------
  182|      2|        if (parse_hostport(sock_name + 4, host, sizeof(host), port, sizeof(port), 0, e) != 0) {
  ------------------
  |  Branch (182:13): [True: 0, False: 2]
  ------------------
  183|      0|            return (-1);
  184|      0|        }
  185|      2|        rtep->rtt.socket_type = AF_INET;
  186|      2|    } else {
  187|      0|        sprefix = "unix:";
  188|      0|        usock_name = sock_name;
  189|      0|        rtep->rtt.socket_type = AF_LOCAL;
  190|      0|    }
  191|      2|    if (rtep->rtt.socket_type == AF_UNIX) {
  ------------------
  |  Branch (191:9): [True: 0, False: 2]
  ------------------
  192|      0|        if (strlen(usock_name) == 0) {
  ------------------
  |  Branch (192:13): [True: 0, False: 0]
  ------------------
  193|      0|            *e = "Timeout notification socket name too short";
  194|      0|            return (-1);
  195|      0|        }
  196|      0|        ifsun = sstosun(&rtep->rtt.remote);
  ------------------
  |  |   85|      0|#define sstosun(ss)      ((struct sockaddr_un *)(ss))
  ------------------
  197|      0|        ifsun->sun_family = AF_LOCAL;
  198|      0|        strncpy(ifsun->sun_path, usock_name, sizeof(ifsun->sun_path) - 1);
  199|       |#if defined(HAVE_SOCKADDR_SUN_LEN)
  200|       |        ifsun->sun_len = strlen(ifsun->sun_path);
  201|       |#endif
  202|      0|        rtep->rtt.remote_len = sizeof(struct sockaddr_un);
  203|      2|    } else if (rtep->rtt.socket_type == AF_INET && strcmp(host, CC_SELF_STR) == 0) {
  ------------------
  |  |   60|      2|#define CC_SELF_STR	"%%CC_SELF%%"
  ------------------
  |  Branch (203:16): [True: 2, False: 0]
  |  Branch (203:52): [True: 0, False: 2]
  ------------------
  204|      0|        rtep->rtw.socket_type = AF_INET;
  205|      0|        rtep->rtw.port = atoi(port);
  206|      0|        snp = &rtep->rtt.socket_name;
  207|      0|        rval = 1;
  208|      2|    } else {
  209|      2|        ifsa = sstosa(&rtep->rtt.remote);
  ------------------
  |  |   82|      2|#define	sstosa(ss)	((struct sockaddr *)(ss))
  ------------------
  210|      2|        n = resolve(ifsa, AF_INET, host, port, AI_PASSIVE);
  211|      2|        if (n != 0) {
  ------------------
  |  Branch (211:13): [True: 0, False: 2]
  ------------------
  212|      0|            *e = gai_strerror(n);
  213|      0|            return (-1);
  214|      0|        }
  215|      2|        rtep->rtt.remote_len = SA_LEN(ifsa);
  ------------------
  |  |   62|      2|   (((sa)->sa_family == AF_INET) ? \
  |  |  ------------------
  |  |  |  Branch (62:5): [True: 2, False: 0]
  |  |  ------------------
  |  |   63|      2|   sizeof(struct sockaddr_in) : sizeof(struct sockaddr_in6))
  ------------------
  216|      2|    }
  217|      2|    if (sprefix == NULL) {
  ------------------
  |  Branch (217:9): [True: 2, False: 0]
  ------------------
  218|      2|        new_sn = strdup(sock_name);
  219|      2|    } else {
  220|      0|        asprintf(&new_sn, "%s%s", sprefix, usock_name);
  221|      0|    }
  222|      2|    if (new_sn == NULL) {
  ------------------
  |  Branch (222:9): [True: 0, False: 2]
  ------------------
  223|      0|        *e = strerror(errno);
  224|      0|        return (-1);
  225|      0|    }
  226|      2|    *snp = new_sn;
  227|       |
  228|      2|    return (rval);
  229|      2|}
rtpp_tnotify_set.c:parse_hostport:
  134|      2|{
  135|      2|    const char *cp;
  136|      2|    int myport;
  137|       |
  138|      2|    cp = strrchr(hostport, ':');
  139|      2|    if (cp == NULL || cp[1] == '\0' || cp == hostport) {
  ------------------
  |  Branch (139:9): [True: 0, False: 2]
  |  Branch (139:23): [True: 0, False: 2]
  |  Branch (139:40): [True: 0, False: 2]
  ------------------
  140|      0|        *e = "Can't parse host:port: invalid address";
  141|      0|        return (-1);
  142|      0|    }
  143|      2|    myport = atoi(cp + 1);
  144|      2|    if (myport <= 0 || myport > 65535) {
  ------------------
  |  Branch (144:9): [True: 0, False: 2]
  |  Branch (144:24): [True: 0, False: 2]
  ------------------
  145|      0|        *e = "Can't parse host:port: invalid port";
  146|      0|        return (-1);
  147|      0|    }
  148|       |
  149|      2|    if (testonly != 0)
  ------------------
  |  Branch (149:9): [True: 0, False: 2]
  ------------------
  150|      0|        return (0);
  151|       |
  152|      2|    if (cp - hostport + 1 > hsize || psize < 6) {
  ------------------
  |  Branch (152:9): [True: 0, False: 2]
  |  Branch (152:38): [True: 0, False: 2]
  ------------------
  153|      0|        *e = "Can't parse host:port: supplied buffers are too small";
  154|      0|        return (-1);
  155|      0|    }
  156|       |
  157|      2|    memcpy(host, hostport, cp - hostport);
  158|      2|    host[cp - hostport] = '\0';
  159|      2|    snprintf(port, psize, "%d", myport);
  160|      2|    return (0);
  161|      2|}
rtpp_tnotify_set.c:rtpp_tnotify_set_isenabled:
  401|    544|{
  402|    544|    struct rtpp_tnotify_set_priv *pvt;
  403|       |
  404|    544|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|    544|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  405|    544|    return (pvt->wp_len > 0 || pvt->tp_len > 0);
  ------------------
  |  Branch (405:13): [True: 0, False: 544]
  |  Branch (405:32): [True: 544, False: 0]
  ------------------
  406|    544|}

seedrandom:
   60|      2|{
   61|      2|    int fd;
   62|      2|    unsigned long junk;
   63|      2|    struct timeval tv;
   64|       |
   65|      2|    fd = open("/dev/urandom", O_RDONLY, 0);
   66|      2|    if (fd >= 0) {
  ------------------
  |  Branch (66:9): [True: 2, False: 0]
  ------------------
   67|      2|	read(fd, &junk, sizeof(junk));
   68|      2|	close(fd);
   69|      2|    } else {
   70|      0|        junk = 0;
   71|      0|    }
   72|       |
   73|      2|    gettimeofday(&tv, NULL);
   74|      2|    srandom((unsigned int)(getpid() << 14) ^ tv.tv_sec ^ tv.tv_usec ^ junk);
   75|      2|}
set_rlimits:
   79|      2|{
   80|      2|    struct rlimit rlp;
   81|       |
   82|      2|    if (getrlimit(RLIMIT_CORE, &rlp) < 0) {
  ------------------
  |  Branch (82:9): [True: 0, False: 2]
  ------------------
   83|      0|        RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "getrlimit(RLIMIT_CORE)");
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   83|      0|        RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "getrlimit(RLIMIT_CORE)");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
   84|      0|        return (-1);
   85|      0|    }
   86|      2|    rlp.rlim_cur = RLIM_INFINITY;
   87|      2|    rlp.rlim_max = RLIM_INFINITY;
   88|      2|    if (setrlimit(RLIMIT_CORE, &rlp) < 0) {
  ------------------
  |  Branch (88:9): [True: 0, False: 2]
  ------------------
   89|      0|        RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "setrlimit(RLIMIT_CORE)");
  ------------------
  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  ------------------
  |  |  |  |   83|      0|#define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   59|      0|#define RTPP_ELOG(log, args...) CALL_METHOD((log), errwrite, __FUNCTION__, \
  |  |  |  |  |  |   60|      0|  __LINE__, ## args)
  |  |  |  |  ------------------
  |  |  |  |               #define CALL_METHOD(obj, method, args...) (obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |   89|      0|        RTPP_ELOG(cfsp->glog, RTPP_LOG_ERR, "setrlimit(RLIMIT_CORE)");
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |   47|      0|#define	RTPP_LOG_ERR	LOG_ERR
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   60|      0|  __LINE__, ## args)
  ------------------
   90|      0|        return (-1);
   91|      0|    }
   92|      2|    return (0);
   93|      2|}
url_unquote2:
  290|     71|{
  291|     71|    int outlen;
  292|     71|    uint8_t *ocp = (uint8_t *)obuf;
  293|     71|    const unsigned char *cp, *endp;
  294|       |
  295|     71|    outlen = len;
  296|     71|    endp = (const unsigned char *)ibuf + len;
  297|  9.23k|    for (cp = (const unsigned char *)ibuf; cp < endp; cp++, ocp++) {
  ------------------
  |  Branch (297:44): [True: 9.17k, False: 54]
  ------------------
  298|  9.17k|        switch (cp[0]) {
  299|    223|        case '%':
  ------------------
  |  Branch (299:9): [True: 223, False: 8.95k]
  ------------------
  300|    223|            if (cp + 2 > endp)
  ------------------
  |  Branch (300:17): [True: 3, False: 220]
  ------------------
  301|      3|                return (-1);
  302|    220|            if (cp[1] > 127 || cp[2] > 127 ||
  ------------------
  |  Branch (302:17): [True: 2, False: 218]
  |  Branch (302:32): [True: 4, False: 214]
  ------------------
  303|    220|              hex2char[cp[1]] == -1 || hex2char[cp[2]] == -1)
  ------------------
  |  Branch (303:15): [True: 3, False: 211]
  |  Branch (303:40): [True: 5, False: 206]
  ------------------
  304|     14|                return (-1);
  305|    206|            ocp[0] = (hex2char[cp[1]] << 4) | hex2char[cp[2]];
  306|    206|            cp += 2;
  307|    206|            outlen -= 2;
  308|    206|            break;
  309|       |
  310|    493|        case '+':
  ------------------
  |  Branch (310:9): [True: 493, False: 8.68k]
  ------------------
  311|    493|            ocp[0] = ' ';
  312|    493|            break;
  313|       |
  314|  8.46k|        default:
  ------------------
  |  Branch (314:9): [True: 8.46k, False: 716]
  ------------------
  315|  8.46k|            if (ocp != cp)
  ------------------
  |  Branch (315:17): [True: 194, False: 8.26k]
  ------------------
  316|    194|                ocp[0] = cp[0];
  317|  8.46k|            break;
  318|  9.17k|        }
  319|  9.17k|    }
  320|     54|    return (outlen);
  321|     71|}
url_unquote:
  325|     71|{
  326|       |
  327|     71|    return (url_unquote2((char *)buf, (char *)buf, len));
  328|     71|}
atoi_safe_sep:
  359|    444|{
  360|    444|    int rval;
  361|    444|    char *cp;
  362|       |
  363|    444|    rval = strtol(s, &cp, 10);
  364|    444|    if (cp == s || *cp != sep) {
  ------------------
  |  Branch (364:9): [True: 15, False: 429]
  |  Branch (364:20): [True: 20, False: 409]
  ------------------
  365|     35|        return (ATOI_NOTINT);
  366|     35|    }
  367|    409|    *res = rval;
  368|    409|    if (next != NULL) {
  ------------------
  |  Branch (368:9): [True: 209, False: 200]
  ------------------
  369|    209|        *next = cp + 1;
  370|    209|    }
  371|    409|    return (ATOI_OK);
  372|    444|}
atoi_safe:
  376|    213|{
  377|       |
  378|    213|    return (atoi_safe_sep(s, res, '\0', NULL));
  379|    213|}
atoi_saferange:
  383|      4|{
  384|      4|    int rval;
  385|       |
  386|      4|    if (atoi_safe(s, &rval)) {
  ------------------
  |  Branch (386:9): [True: 0, False: 4]
  ------------------
  387|      0|        return (ATOI_NOTINT);
  388|      0|    }
  389|      4|    if (rval < min || (max >= min && rval > max)) {
  ------------------
  |  Branch (389:9): [True: 0, False: 4]
  |  Branch (389:24): [True: 0, False: 4]
  |  Branch (389:38): [True: 0, False: 0]
  ------------------
  390|      0|        return (ATOI_OUTRANGE);
  391|      0|    }
  392|      4|    *res = rval;
  393|      4|    return (ATOI_OK);
  394|      4|}
rtpp_get_sched_hz:
  428|      2|{
  429|      2|    int sched_hz;
  430|       |
  431|      2|#if defined (LINUX_XXX)
  432|      2|    sched_hz = rtpp_get_sched_hz_linux();
  433|      2|    if (sched_hz > 0) {
  ------------------
  |  Branch (433:9): [True: 2, False: 0]
  ------------------
  434|      2|        return (sched_hz);
  435|      2|    }
  436|      0|#endif
  437|      0|    sched_hz = sysconf(_SC_CLK_TCK);
  438|      0|    return (sched_hz > 0 ? sched_hz : 100);
  ------------------
  |  Branch (438:13): [True: 0, False: 0]
  ------------------
  439|      2|}
rtpp_strsplit:
  523|  1.97k|{
  524|  1.97k|        const uint64_t sep_masks[4] = {
  525|  1.97k|                populate('\t', uint64_t),
  ------------------
  |  |  517|  1.97k|#define populate(n, t) (~((t)0) / 255 * (n))
  ------------------
  526|  1.97k|                populate('\n', uint64_t),
  ------------------
  |  |  517|  1.97k|#define populate(n, t) (~((t)0) / 255 * (n))
  ------------------
  527|  1.97k|                populate('\r', uint64_t),
  ------------------
  |  |  517|  1.97k|#define populate(n, t) (~((t)0) / 255 * (n))
  ------------------
  528|  1.97k|                populate(' ', uint64_t)
  ------------------
  |  |  517|  1.97k|#define populate(n, t) (~((t)0) / 255 * (n))
  ------------------
  529|  1.97k|        };
  530|       |
  531|  1.97k|        RTPP_DBG_ASSERT(blen >= dlen && (blen % sizeof(uint64_t)) == 0);
  532|       |
  533|  1.97k|        uint64_t *cp = (uint64_t *)ibuf;
  534|  1.97k|        uint64_t *obp = (uint64_t *)mbuf;
  535|       |
  536|  98.6k|        for (int i = 0; i < dlen; i += sizeof(uint64_t)) {
  ------------------
  |  Branch (536:25): [True: 96.7k, False: 1.97k]
  ------------------
  537|  96.7k|                uint64_t ww;
  538|  96.7k|                uint64_t ow = populate(0xff, uint64_t);
  ------------------
  |  |  517|  96.7k|#define populate(n, t) (~((t)0) / 255 * (n))
  ------------------
  539|  96.7k|                ww = *cp;
  540|   483k|                for (int j = 0; j < 4; j++) {
  ------------------
  |  Branch (540:33): [True: 386k, False: 96.7k]
  ------------------
  541|   386k|                        ow &= ~(haszero(ww ^ sep_masks[j]) / 0x80 * 0xff);
  ------------------
  |  |  518|   386k|#define haszero(v) ~(((((v) & populate(0x7f, typeof(v))) + populate(0x7f, typeof(v))) | \
  |  |  ------------------
  |  |  |  |  517|   386k|#define populate(n, t) (~((t)0) / 255 * (n))
  |  |  ------------------
  |  |               #define haszero(v) ~(((((v) & populate(0x7f, typeof(v))) + populate(0x7f, typeof(v))) | \
  |  |  ------------------
  |  |  |  |  517|   386k|#define populate(n, t) (~((t)0) / 255 * (n))
  |  |  ------------------
  |  |  519|   386k|  (v)) | populate(0x7f, typeof(v)))
  |  |  ------------------
  |  |  |  |  517|   386k|#define populate(n, t) (~((t)0) / 255 * (n))
  |  |  ------------------
  ------------------
  542|   386k|                }
  543|  96.7k|                *obp = ow;
  544|  96.7k|                ww &= ow;
  545|  96.7k|                *cp = ww;
  546|  96.7k|                obp += 1;
  547|  96.7k|                cp += 1;
  548|  96.7k|        }
  549|  1.97k|}
rtpp_util.c:rtpp_get_sched_hz_linux:
  400|      2|{
  401|      2|    int fd, rlen;
  402|      2|    char buf[16], *cp;
  403|      2|    int64_t n;
  404|       |
  405|      2|    fd = open("/proc/sys/kernel/sched_min_granularity_ns", O_RDONLY, 0);
  406|      2|    if (fd == -1) {
  ------------------
  |  Branch (406:9): [True: 0, False: 2]
  ------------------
  407|      0|        return (-1);
  408|      0|    }
  409|      2|    rlen = read(fd, buf, sizeof(buf) - 1);
  410|      2|    close(fd);
  411|      2|    if (rlen <= 0) {
  ------------------
  |  Branch (411:9): [True: 0, False: 2]
  ------------------
  412|      0|        return (-1);
  413|      0|    }
  414|      2|    buf[rlen] = '\0'; 
  415|      2|    n = strtol(buf, &cp, 10);
  416|      2|    if (cp == buf) {
  ------------------
  |  Branch (416:9): [True: 0, False: 2]
  ------------------
  417|      0|        return (-1);
  418|      0|    }
  419|      2|    if (n <= 0) {
  ------------------
  |  Branch (419:9): [True: 0, False: 2]
  ------------------
  420|      0|        return (-1);
  421|      0|    }
  422|      2|    return ((int64_t)1000000000 / n);
  423|      2|}

rtpp_weakref_ctor:
   79|     10|{
   80|     10|    struct rtpp_weakref_priv *pvt;
   81|       |
   82|     10|    pvt = rtpp_rzmalloc(sizeof(struct rtpp_weakref_priv), PVT_RCOFFS(pvt));
  ------------------
  |  |  144|     10|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   83|     10|    if (pvt == NULL) {
  ------------------
  |  Branch (83:9): [True: 0, False: 10]
  ------------------
   84|      0|        return (NULL);
   85|      0|    }
   86|     10|    pvt->pub.ht = rtpp_hash_table_ctor(rtpp_ht_key_u64_t, RTPP_HT_NODUPS |
  ------------------
  |  |   70|     10|#define RTPP_HT_NODUPS    0x1
  ------------------
   87|     10|      RTPP_HT_DUP_ABRT);
  ------------------
  |  |   71|     10|#define RTPP_HT_DUP_ABRT  0x2
  ------------------
   88|     10|    if (pvt->pub.ht == NULL) {
  ------------------
  |  Branch (88:9): [True: 0, False: 10]
  ------------------
   89|      0|        goto e0;
   90|      0|    }
   91|     10|    if (pthread_mutex_init(&pvt->on_lock, NULL) != 0) {
  ------------------
  |  Branch (91:9): [True: 0, False: 10]
  ------------------
   92|      0|        goto e1;
   93|      0|    }
   94|     10|    PUBINST_FININIT(&pvt->pub, pvt, rtpp_weakref_dtor);
  ------------------
  |  |   76|     10|    CALL_SMETHOD((pub_inst)->rcnt, attach, (rtpp_refcnt_dtor_t)(dtor), \
  |  |  ------------------
  |  |  |  |  134|     10|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  ------------------
  |  |  |  |  |  |  107|     10|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  108|     10|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  109|     10|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  110|     10|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  111|     10|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  112|     10|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  113|     10|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  114|     10|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  115|     10|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  116|     10|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  117|     10|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  118|     10|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  119|     10|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  120|     10|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  121|     10|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  122|     10|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  123|     10|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  124|     10|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  125|     10|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  126|     10|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  127|     10|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  128|     10|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  129|     10|)
  |  |  |  |  ------------------
  |  |  ------------------
  |  |   77|     10|      pvt_inst);
  ------------------
   95|     10|    return (&pvt->pub);
   96|      0|e1:
   97|      0|    RTPP_OBJ_DECREF(pvt->pub.ht);
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
   98|      0|e0:
   99|      0|    RTPP_OBJ_DECREF(&(pvt->pub));
  ------------------
  |  |  152|      0|#define RTPP_OBJ_DECREF(obj) RC_DECREF((obj)->rcnt)
  |  |  ------------------
  |  |  |  |   67|      0|#define RC_DECREF(rp) CALL_SMETHOD(rp, decref);
  |  |  |  |  ------------------
  |  |  |  |  |  |  134|      0|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  |  |  |  |  ------------------
  |  |  |  |  |  |  |  |  107|      0|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  |  |  |  |  108|      0|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  |  |  |  |  109|      0|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  |  |  |  |  110|      0|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  |  |  |  |  111|      0|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  |  |  |  |  112|      0|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  |  |  |  |  113|      0|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  |  |  |  |  114|      0|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  |  |  |  |  115|      0|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  |  |  |  |  116|      0|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  |  |  |  |  117|      0|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  |  |  |  |  118|      0|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  |  |  |  |  119|      0|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  |  |  |  |  120|      0|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  |  |  |  |  121|      0|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  |  |  |  |  122|      0|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  |  |  |  |  123|      0|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  |  |  |  |  124|      0|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  |  |  |  |  125|      0|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  |  |  |  |  126|      0|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  |  |  |  |  127|      0|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  |  |  |  |  128|      0|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  |  |  |  |  129|      0|)
  |  |  |  |  |  |  ------------------
  |  |  |  |  ------------------
  |  |  ------------------
  ------------------
  100|      0|    free(pvt);
  101|      0|    return (NULL);
  102|      0|}
rtpp_weakref.c:rtpp_wref_get_length:
  252|     40|{
  253|     40|    struct rtpp_weakref_priv *pvt;
  254|       |
  255|     40|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|     40|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  256|     40|    return (CALL_SMETHOD(pvt->pub.ht, get_length));
  ------------------
  |  |  134|     40|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     40|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     40|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     40|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     40|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     40|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     40|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     40|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     40|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     40|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     40|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     40|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     40|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     40|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     40|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     40|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     40|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     40|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     40|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     40|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     40|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     40|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     40|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     40|)
  |  |  ------------------
  ------------------
  257|     40|}
rtpp_weakref.c:rtpp_wref_purge:
  261|      3|{
  262|      3|    struct rtpp_weakref_priv *pvt;
  263|      3|    int npurged;
  264|       |
  265|      3|    PUB2PVT(pub, pvt);
  ------------------
  |  |  147|      3|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
  266|       |
  267|      3|    if (pvt->on_last.func != NULL) {
  ------------------
  |  Branch (267:9): [True: 0, False: 3]
  ------------------
  268|      0|        pthread_mutex_lock(&pvt->on_lock);
  269|      0|    }
  270|       |
  271|      3|    npurged = CALL_SMETHOD(pvt->pub.ht, purge);
  ------------------
  |  |  134|      3|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      3|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      3|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      3|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      3|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      3|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      3|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      3|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      3|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      3|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      3|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      3|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      3|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      3|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      3|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      3|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      3|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      3|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      3|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      3|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      3|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      3|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      3|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      3|)
  |  |  ------------------
  ------------------
  272|       |
  273|      3|    if (pvt->on_last.func != NULL) {
  ------------------
  |  Branch (273:9): [True: 0, False: 3]
  ------------------
  274|      0|        if (npurged > 0)
  ------------------
  |  Branch (274:13): [True: 0, False: 0]
  ------------------
  275|      0|            pvt->on_last.func(pvt->on_last.arg);
  276|      0|        pthread_mutex_unlock(&pvt->on_lock);
  277|      0|    }
  278|      3|    return (npurged);
  279|      3|}

rtpp_wi_malloc_udata:
   69|      4|{
   70|      4|    struct rtpp_wi_data *wipp;
   71|       |
   72|      4|    wipp = rtpp_rmalloc(sizeof(struct rtpp_wi_data) + datalen, PVT_RCOFFS(wipp));
  ------------------
  |  |  144|      4|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   73|      4|    if (wipp == NULL) {
  ------------------
  |  Branch (73:9): [True: 0, False: 4]
  ------------------
   74|      0|        return (NULL);
   75|      0|    }
   76|      4|    CALL_SMETHOD(wipp->pub.rcnt, use_stdfree, wipp);
  ------------------
  |  |  134|      4|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|      4|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|      4|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|      4|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|      4|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|      4|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|      4|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|      4|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|      4|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|      4|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|      4|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|      4|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|      4|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|      4|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|      4|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|      4|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|      4|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|      4|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|      4|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|      4|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|      4|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|      4|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|      4|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|      4|)
  |  |  ------------------
  ------------------
   77|      4|    *wipp = (const struct rtpp_wi_data) {
   78|      4|        .pub.wi_type = RTPP_WI_TYPE_DATA,
   79|      4|        .pub.rcnt = wipp->pub.rcnt
   80|      4|    };
   81|      4|    if (datalen > 0) {
  ------------------
  |  Branch (81:9): [True: 4, False: 0]
  ------------------
   82|      4|        wipp->data_len = datalen;
   83|      4|        *dataptr = wipp->data;
   84|      4|    }
   85|      4|    return (&(wipp->pub));
   86|      4|}
rtpp_wi_data_get_ptr:
   90|    250|{
   91|    250|    struct rtpp_wi_data *wipp;
   92|       |
   93|    250|    RTPP_DBG_ASSERT(wi->wi_type == RTPP_WI_TYPE_DATA);
   94|    250|    PUB2PVT(wi, wipp);
  ------------------
  |  |  147|    250|  (pvtp) = (typeof(pvtp))((char *)(pubp) - offsetof(typeof(*(pvtp)), pub))
  ------------------
   95|    250|    RTPP_DBG_ASSERT(wipp->data_len >= min_len);
   96|    250|    RTPP_DBG_ASSERT(max_len == 0 || wipp->data_len <= max_len);
   97|       |
   98|    250|    return(wipp->data);
   99|    250|}

rtpp_wi_malloc_sgnl:
   53|     14|{
   54|     14|    struct rtpp_wi_sgnl *wipp;
   55|     14|#if !defined(RTPP_CHECK_LEAKS)
   56|     14|    wipp = rtpp_rmalloc(sizeof(struct rtpp_wi_sgnl) + datalen, PVT_RCOFFS(wipp));
  ------------------
  |  |  144|     14|#define PVT_RCOFFS(pvtp) (offsetof(typeof(*(pvtp)), pub) + offsetof(typeof((pvtp)->pub), rcnt))
  ------------------
   57|       |#else
   58|       |    wipp = rtpp_rmalloc_memdeb(sizeof(struct rtpp_wi_sgnl) + datalen,
   59|       |      PVT_RCOFFS(wipp), MEMDEB_SYM, mlp);
   60|       |#endif
   61|     14|    if (wipp == NULL) {
  ------------------
  |  Branch (61:9): [True: 0, False: 14]
  ------------------
   62|      0|        return (NULL);
   63|      0|    }
   64|     14|    CALL_SMETHOD(wipp->pub.rcnt, use_stdfree, wipp);
  ------------------
  |  |  134|     14|#define CALL_SMETHOD(obj, method, args...) GET_SMETHODS(obj)->method(obj, ## args)
  |  |  ------------------
  |  |  |  |  107|     14|#define GET_SMETHODS(obj) _Generic((obj), \
  |  |  |  |  108|     14|    struct rtpp_refcnt *: rtpp_refcnt_smethods, \
  |  |  |  |  109|     14|    struct rtpp_pearson_perfect *: rtpp_pearson_perfect_smethods, \
  |  |  |  |  110|     14|    struct rtpp_netaddr *: rtpp_netaddr_smethods, \
  |  |  |  |  111|     14|    struct rtpp_server *: rtpp_server_smethods, \
  |  |  |  |  112|     14|    struct rtpp_stats *: rtpp_stats_smethods, \
  |  |  |  |  113|     14|    struct rtpp_timed *: rtpp_timed_smethods, \
  |  |  |  |  114|     14|    struct rtpp_stream *: rtpp_stream_smethods, \
  |  |  |  |  115|     14|    struct rtpp_pcount *: rtpp_pcount_smethods, \
  |  |  |  |  116|     14|    struct rtpp_record *: rtpp_record_smethods, \
  |  |  |  |  117|     14|    struct rtpp_hash_table *: rtpp_hash_table_smethods, \
  |  |  |  |  118|     14|    struct rtpp_weakref *: rtpp_weakref_smethods, \
  |  |  |  |  119|     14|    struct rtpp_analyzer *: rtpp_analyzer_smethods, \
  |  |  |  |  120|     14|    struct rtpp_pcnt_strm *: rtpp_pcnt_strm_smethods, \
  |  |  |  |  121|     14|    struct rtpp_ttl *: rtpp_ttl_smethods, \
  |  |  |  |  122|     14|    struct rtpp_pipe *: rtpp_pipe_smethods, \
  |  |  |  |  123|     14|    struct rtpp_ringbuf *: rtpp_ringbuf_smethods, \
  |  |  |  |  124|     14|    struct rtpp_sessinfo *: rtpp_sessinfo_smethods, \
  |  |  |  |  125|     14|    struct rtpp_rw_lock *: rtpp_rw_lock_smethods, \
  |  |  |  |  126|     14|    struct rtpp_proc_servers *: rtpp_proc_servers_smethods, \
  |  |  |  |  127|     14|    struct rtpp_proc_wakeup *: rtpp_proc_wakeup_smethods, \
  |  |  |  |  128|     14|    struct pproc_manager *: pproc_manager_smethods \
  |  |  |  |  129|     14|)
  |  |  ------------------
  ------------------
   65|     14|    *wipp = (const struct rtpp_wi_sgnl) {
   66|     14|        .pub.wi_type = RTPP_WI_TYPE_SGNL,
   67|     14|        .pub.rcnt = wipp->pub.rcnt,
   68|     14|        .signum = signum
   69|     14|    };
   70|     14|    if (datalen > 0) {
  ------------------
  |  Branch (70:9): [True: 0, False: 14]
  ------------------
   71|      0|        wipp->data_len = datalen;
   72|      0|        memcpy(wipp->data, data, datalen);
   73|      0|    }
   74|     14|    return (&(wipp->pub));
   75|     14|}

