@@ -246,7 +246,9 @@ uint64_t tox_netprof_get_packet_id_count(const Tox *tox, Tox_Netprof_Packet_Type
246
246
247
247
switch (type ) {
248
248
case TOX_NETPROF_PACKET_TYPE_TCP_CLIENT : {
249
- count = netprof_get_packet_count_id (tcp_c_profile , id , dir );
249
+ const uint64_t tcp_c_count = netprof_get_packet_count_id (tcp_c_profile , id , dir );
250
+ const uint64_t tcp_group_count = gc_tcp_connections_get_packet_id_count (tox -> m -> group_handler , id , dir );
251
+ count = tcp_c_count + tcp_group_count ;
250
252
break ;
251
253
}
252
254
@@ -258,7 +260,8 @@ uint64_t tox_netprof_get_packet_id_count(const Tox *tox, Tox_Netprof_Packet_Type
258
260
case TOX_NETPROF_PACKET_TYPE_TCP : {
259
261
const uint64_t tcp_c_count = netprof_get_packet_count_id (tcp_c_profile , id , dir );
260
262
const uint64_t tcp_s_count = netprof_get_packet_count_id (tcp_s_profile , id , dir );
261
- count = tcp_c_count + tcp_s_count ;
263
+ const uint64_t tcp_group_count = gc_tcp_connections_get_packet_id_count (tox -> m -> group_handler , id , dir );
264
+ count = tcp_c_count + tcp_s_count + tcp_group_count ;
262
265
break ;
263
266
}
264
267
@@ -295,7 +298,9 @@ uint64_t tox_netprof_get_packet_total_count(const Tox *tox, Tox_Netprof_Packet_T
295
298
296
299
switch (type ) {
297
300
case TOX_NETPROF_PACKET_TYPE_TCP_CLIENT : {
298
- count = netprof_get_packet_count_total (tcp_c_profile , dir );
301
+ const uint64_t tcp_c_count = netprof_get_packet_count_total (tcp_c_profile , dir );
302
+ const uint64_t tcp_group_count = gc_tcp_connections_get_packet_total_count (tox -> m -> group_handler , dir );
303
+ count = tcp_c_count + tcp_group_count ;
299
304
break ;
300
305
}
301
306
@@ -307,7 +312,8 @@ uint64_t tox_netprof_get_packet_total_count(const Tox *tox, Tox_Netprof_Packet_T
307
312
case TOX_NETPROF_PACKET_TYPE_TCP : {
308
313
const uint64_t tcp_c_count = netprof_get_packet_count_total (tcp_c_profile , dir );
309
314
const uint64_t tcp_s_count = netprof_get_packet_count_total (tcp_s_profile , dir );
310
- count = tcp_c_count + tcp_s_count ;
315
+ const uint64_t tcp_group_count = gc_tcp_connections_get_packet_total_count (tox -> m -> group_handler , dir );
316
+ count = tcp_c_count + tcp_s_count + tcp_group_count ;
311
317
break ;
312
318
}
313
319
@@ -344,7 +350,9 @@ uint64_t tox_netprof_get_packet_id_bytes(const Tox *tox, Tox_Netprof_Packet_Type
344
350
345
351
switch (type ) {
346
352
case TOX_NETPROF_PACKET_TYPE_TCP_CLIENT : {
347
- bytes = netprof_get_bytes_id (tcp_c_profile , id , dir );
353
+ const uint64_t tcp_c_bytes = netprof_get_bytes_id (tcp_c_profile , id , dir );
354
+ const uint64_t tcp_group_bytes = gc_tcp_connections_get_packet_id_bytes (tox -> m -> group_handler , id , dir );
355
+ bytes = tcp_c_bytes + tcp_group_bytes ;
348
356
break ;
349
357
}
350
358
@@ -356,7 +364,8 @@ uint64_t tox_netprof_get_packet_id_bytes(const Tox *tox, Tox_Netprof_Packet_Type
356
364
case TOX_NETPROF_PACKET_TYPE_TCP : {
357
365
const uint64_t tcp_c_bytes = netprof_get_bytes_id (tcp_c_profile , id , dir );
358
366
const uint64_t tcp_s_bytes = netprof_get_bytes_id (tcp_s_profile , id , dir );
359
- bytes = tcp_c_bytes + tcp_s_bytes ;
367
+ const uint64_t tcp_group_bytes = gc_tcp_connections_get_packet_id_bytes (tox -> m -> group_handler , id , dir );
368
+ bytes = tcp_c_bytes + tcp_s_bytes + tcp_group_bytes ;
360
369
break ;
361
370
}
362
371
@@ -393,7 +402,9 @@ uint64_t tox_netprof_get_packet_total_bytes(const Tox *tox, Tox_Netprof_Packet_T
393
402
394
403
switch (type ) {
395
404
case TOX_NETPROF_PACKET_TYPE_TCP_CLIENT : {
396
- bytes = netprof_get_bytes_total (tcp_c_profile , dir );
405
+ const uint64_t tcp_c_bytes = netprof_get_bytes_total (tcp_c_profile , dir );
406
+ const uint64_t tcp_group_bytes = gc_tcp_connections_get_packet_total_bytes (tox -> m -> group_handler , dir );
407
+ bytes = tcp_c_bytes + tcp_group_bytes ;
397
408
break ;
398
409
}
399
410
@@ -405,7 +416,8 @@ uint64_t tox_netprof_get_packet_total_bytes(const Tox *tox, Tox_Netprof_Packet_T
405
416
case TOX_NETPROF_PACKET_TYPE_TCP : {
406
417
const uint64_t tcp_c_bytes = netprof_get_bytes_total (tcp_c_profile , dir );
407
418
const uint64_t tcp_s_bytes = netprof_get_bytes_total (tcp_s_profile , dir );
408
- bytes = tcp_c_bytes + tcp_s_bytes ;
419
+ const uint64_t tcp_group_bytes = gc_tcp_connections_get_packet_total_bytes (tox -> m -> group_handler , dir );
420
+ bytes = tcp_c_bytes + tcp_s_bytes + tcp_group_bytes ;
409
421
break ;
410
422
}
411
423
0 commit comments