Changeset 99ea91b2 in mainline for uspace/srv/net/udp/pdu.c


Ignore:
Timestamp:
2015-04-20T21:11:29Z (10 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
779541b
Parents:
fab2746
Message:

UDP data notification needs to be asynchronous.

File:
1 edited

Legend:

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

    rfab2746 r99ea91b2  
    196196                return ENOMEM;
    197197
    198         nmsg->data = text;
    199198        nmsg->data_size = length - sizeof(udp_header_t);
     199        nmsg->data = malloc(nmsg->data_size);
     200        if (nmsg->data == NULL)
     201                return ENOMEM;
     202
     203        memcpy(nmsg->data, text, nmsg->data_size);
    200204
    201205        *msg = nmsg;
Note: See TracChangeset for help on using the changeset viewer.