[sr-dev] [kamailio/kamailio] [kamailio 5.4.3] xavp_rm_by_index removes (N+1) first indexes instead of index N (#2604)

Nicolas C notifications at github.com
Thu Jan 21 19:05:16 CET 2021


As previously discussed on the mailing list, this is a bug.
I have a fix that works, so I'll provide a pull request.


### Description

I’m trying to use function xavp_rm_by_index to remove a specific index from a given xavp.
I’m observing an unexpected behaviour, I think it might be a bug.
Instead of just removing the index, the function removes the index and all others before it.

E.g : if called with « idx = 1 », it removes indexes 0 and 1.


Reading the code of xavp_rm_internal (which is called by xavp_rm_by_index), I don’t think it behaves at it should :

```
/* Remove xavps
* idx: <0 remove all xavps with the same name
*      >=0 remove only the specified index xavp
* Returns number of xavps that were deleted
*/
```

For example when I do this :

```
LM_ERR("COUNT BEFORE: %d\n", xavp_count(rname, NULL));
int rm_count = xavp_rm_by_index(rname, 1, NULL); // TEST
LM_ERR("REMOVED: %d\n", rm_count);
LM_ERR("COUNT AFTER: %d\n", xavp_count(rname, NULL));
```

« rm_count » returned is 1 (which is expected). However, « count after » is decremented by 2.
And when I look at the contents of my xavp, I notice that the first two elements have been removed.

Likewise if xavp_rm_by_index is invoked with idx = 2 => the first 3 elements are removed.


### Troubleshooting

#### Reproduction

Here is some code that shows the issue :


1) a test cmd_function in a module defined as follows :

```
static int was_test(struct sip_msg *msg, char *param1, char *param2);

static cmd_export_t cmds[] = {
       {"was_test", (cmd_function)was_test, 2, 0, 0, ANY_ROUTE},
       {0, 0, 0, 0, 0, 0}
};

/**
* For testing purposes.
*/
static int was_test(struct sip_msg *msg, char *param1, char *param2)
{
       LM_WARN("Called with param1: [%s], param2: [%s]\n", param1, param2);

       str my_str;
       my_str.s = param1;
       my_str.len = strlen(param1);

       int idx = atoi(param2);
       str *rname = &my_str;

       LM_ERR("COUNT BEFORE: %d\n", xavp_count(rname, NULL));

       int rm_count = xavp_rm_by_index(rname, idx, NULL);

       LM_ERR("REMOVED: %d\n", rm_count);
       LM_ERR("COUNT AFTER: %d\n", xavp_count(rname, NULL));

       return 1;
}
```


2) Kamailio script :

```
request_route {

       # push 4 rows to xavp "test":
       $xavp(test=>a) = "3.a";
       $xavp(test[0]=>b) = "3.b";

       $xavp(test=>a) = "2.a";
       $xavp(test[0]=>b) = "2.b";

       $xavp(test=>a) = "1.a";
       $xavp(test[0]=>b) = "1.b";

       $xavp(test=>a) = "0.a";
       $xavp(test[0]=>b) = "0.b";

       # then try to call xavp_rm_by_index with a non-zero idx
       xlog("L_INFO", "BEFORE\n");
       xlog("L_INFO", "test[*]: [$(was_xavp_serialize(test)[*])]\n");
       pv_xavp_print();

       was_test("test", "1"); // expecting only row 1 to be removed (1.a / 1.b)

       xlog("L_INFO", "AFTER\n");
       xlog("L_INFO", "test[*]: [$(was_xavp_serialize(test)[*])]\n");
       pv_xavp_print();

}
```


#### Log Messages


```
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <script>: BEFORE
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <script>: test[*]: [(0):b=0.b;a=0.a, (1):b=1.b;a=1.a, (2):b=2.b;a=2.a, (3):b=3.b;a=3.a]
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff798 ((nil)) (level=0)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff798) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff840>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff840 (0x7f7193dff7b8) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff840) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 0.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff840) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff6f0) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 0.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff6f0) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff840 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff798) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff5a0) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff648>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff648 (0x7f7193dff5c0) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff648) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 1.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff648) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff4f8) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 1.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff4f8) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff648 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff5a0) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff3a8) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff450>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff450 (0x7f7193dff3c8) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff450) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 2.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff450) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff300) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 2.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff300) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff450 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff3a8) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff1b0) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff258>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff258 (0x7f7193dff1d0) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff258) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 3.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff258) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff108) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 3.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff108) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff258 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff1b0) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff798 (level=0)
2(16546) WARNING: {1 INVITE 1-22211 at 10.31.22.1} was_utils [was_utils.c:169]: was_test(): Called with param1: [test], param2: [1]
2(16546) ERROR: {1 INVITE 1-22211 at 10.31.22.1} was_utils [was_utils.c:178]: was_test(): COUNT BEFORE: 4
2(16546) ERROR: {1 INVITE 1-22211 at 10.31.22.1} was_utils [was_utils.c:180]: was_test(): REMOVED: 1
2(16546) ERROR: {1 INVITE 1-22211 at 10.31.22.1} was_utils [was_utils.c:181]: was_test(): COUNT AFTER: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <script>: AFTER
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <script>: test[*]: [(0):b=2.b;a=2.a, (1):b=3.b;a=3.a]
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff3a8 ((nil)) (level=0)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff3a8) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff450>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff450 (0x7f7193dff3c8) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff450) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 2.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff450) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff300) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 2.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff300) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff450 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff3a8) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff1b0) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff258>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff258 (0x7f7193dff1d0) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff258) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 3.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff258) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff108) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 3.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff108) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff258 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff1b0) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff3a8 (level=0)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff3a8 ((nil)) (level=0)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff3a8) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff450>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff450 (0x7f7193dff3c8) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff450) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 2.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff450) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff300) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 2.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff300) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff450 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff3a8) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff1b0) XAVP name: test
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 2063405720
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 6
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:629]: xavx_print_list_content():      XAVP value: <xavp:0x7f7193dff258>
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:601]: xavx_print_list_content(): +++++ start XAVP list: 0x7f7193dff258 (0x7f7193dff1d0) (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff258) XAVP name: b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 110
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 3.b
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff258) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:605]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff108) XAVP name: a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:606]: xavx_print_list_content():      XAVP id: 109
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:607]: xavx_print_list_content():      XAVP value type: 2
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:616]: xavx_print_list_content():      XAVP value (str): 3.a
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:1 - 0x7f7193dff108) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff258 (level=1)
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:642]: xavx_print_list_content():      *** (l:0 - 0x7f7193dff1b0) end
2(16546) INFO: {1 INVITE 1-22211 at 10.31.22.1} <core> [core/xavp.c:645]: xavx_print_list_content(): ----- end XAVP list: 0x7f7193dff3a8 (level=0)

```


### Possible Solutions

Will provide a pull request.



-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/kamailio/kamailio/issues/2604
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20210121/4e2977ef/attachment-0001.htm>


More information about the sr-dev mailing list