Changeset e1b4ae0 in mainline for uspace/lib/nettl/src/portrng.c


Ignore:
Timestamp:
2017-09-11T07:05:21Z (7 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9713b0b
Parents:
975d528
Message:

Start adding tests for TCP conn module. Make sure all connections have been freed at the end of a test.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/nettl/src/portrng.c

    r975d528 re1b4ae0  
    180180 * @param pnum Port number
    181181 */
     182#include <stdio.h>
    182183void portrng_free_port(portrng_t *pr, uint16_t pnum)
    183184{
     185        log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port(%u)", pnum);
    184186        log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port() - begin");
    185187        list_foreach(pr->used, lprng, portrng_port_t, port) {
     188                log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port - check port %u", port->pn);
    186189                if (port->pn == pnum) {
     190                        log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port - OK");
    187191                        list_remove(&port->lprng);
    188192                        free(port);
     193                        log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port() - end");
    189194                        return;
    190195                }
    191196        }
    192197
     198        log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port - FAIL");
    193199        assert(false);
    194         log_msg(LOG_DEFAULT, LVL_DEBUG2, "portrng_free_port() - end");
    195200}
    196201
Note: See TracChangeset for help on using the changeset viewer.