Changeset 16b0ac3 in mainline


Ignore:
Timestamp:
2019-10-12T00:22:17Z (5 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
25525133
Parents:
a163d10
Message:

Start adding unit tests for UDP associations

Location:
uspace/srv/net/udp
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/udp/assoc.c

    ra163d10 r16b0ac3  
    7272}
    7373
     74/** Finalize associations. */
     75void udp_assocs_fini(void)
     76{
     77        assert(list_empty(&assoc_list));
     78
     79        amap_destroy(amap);
     80        amap = NULL;
     81}
     82
    7483/** Create new association structure.
    7584 *
     
    174183
    175184        assert(assoc->deleted == false);
     185        assoc->deleted = true;
    176186        udp_assoc_delref(assoc);
    177         assoc->deleted = true;
    178187}
    179188
  • uspace/srv/net/udp/assoc.h

    ra163d10 r16b0ac3  
    4141
    4242extern errno_t udp_assocs_init(void);
     43extern void udp_assocs_fini(void);
    4344extern udp_assoc_t *udp_assoc_new(inet_ep2_t *, udp_assoc_cb_t *, void *);
    4445extern void udp_assoc_delete(udp_assoc_t *);
  • uspace/srv/net/udp/meson.build

    ra163d10 r16b0ac3  
    2828
    2929deps = [ 'nettl' ]
    30 src = files(
     30
     31_common_src = files(
    3132        'assoc.c',
    3233        'msg.c',
     34)
     35
     36src = files(
    3337        'pdu.c',
    3438        'service.c',
     
    3640        'udp_inet.c',
    3741)
     42
     43test_src = files(
     44        'test/assoc.c',
     45        'test/main.c',
     46)
     47
     48src = [ _common_src, src ]
     49test_src = [ _common_src, test_src ]
Note: See TracChangeset for help on using the changeset viewer.