Changeset b9be9b0 in mainline for uspace/srv/net/udp/test/assoc.c


Ignore:
Timestamp:
2022-03-04T09:11:58Z (3 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
master, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
af259da
Parents:
917324b
git-author:
Jiri Svoboda <jiri@…> (2022-03-03 18:11:14)
git-committer:
Jiri Svoboda <jiri@…> (2022-03-04 09:11:58)
Message:

Fix handling of UDP default destination in udp_assoc_send_msg()

Fixes netecho failing to send any message.

File:
1 edited

Legend:

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

    r917324b rb9be9b0  
    250250}
    251251
    252 /** Sending message with destination set in association and NULL destination
    253  * argument
     252/** Sending message with destination set in association and inet_addr_any /
     253 * inet_port_any destination argument
    254254 */
    255 PCUT_TEST(send_assoc_null_dest)
    256 {
    257         udp_assoc_t *assoc;
    258         inet_ep2_t epp;
     255PCUT_TEST(send_assoc_any_dest)
     256{
     257        udp_assoc_t *assoc;
     258        inet_ep2_t epp;
     259        inet_ep_t ep;
    259260        errno_t rc;
    260261        udp_msg_t *msg;
     
    272273        epp.local.port = 1;
    273274
     275        inet_ep_init(&ep);
     276
    274277        assoc = udp_assoc_new(&epp, &test_assoc_cb, NULL);
    275278        PCUT_ASSERT_NOT_NULL(assoc);
     
    281284        sent_msg = NULL;
    282285
    283         rc = udp_assoc_send(assoc, NULL, msg);
     286        rc = udp_assoc_send(assoc, &ep, msg);
    284287        PCUT_ASSERT_ERRNO_VAL(EOK, rc);
    285288        PCUT_ASSERT_EQUALS(msg, sent_msg);
     
    311314
    312315        inet_ep2_init(&epp);
    313         inet_addr(&epp.remote.addr, 127, 0, 0, 1);
    314         epp.remote.port = 42;
    315316        inet_addr(&epp.local.addr, 127, 0, 0, 1);
    316317        epp.local.port = 1;
Note: See TracChangeset for help on using the changeset viewer.