Changeset 92e717c in mainline


Ignore:
Timestamp:
2011-11-30T20:23:09Z (12 years ago)
Author:
Jiri Svoboda <jiri@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
23fe06c
Parents:
8fcf74f
Message:

Add nettest3 for more trivial testing. Netecho should use send() for stream sockets.

Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • boot/Makefile.common

    r8fcf74f r92e717c  
    175175        $(USPACE_PATH)/app/nettest1/nettest1 \
    176176        $(USPACE_PATH)/app/nettest2/nettest2 \
     177        $(USPACE_PATH)/app/nettest3/nettest3 \
    177178        $(USPACE_PATH)/app/netecho/netecho \
    178179        $(USPACE_PATH)/app/ping/ping \
  • uspace/Makefile

    r8fcf74f r92e717c  
    6464        app/nettest1 \
    6565        app/nettest2 \
     66        app/nettest3 \
    6667        app/ping \
    6768        app/websrv \
  • uspace/app/netecho/netecho.c

    r8fcf74f r92e717c  
    297297
    298298                        /* Answer the request either with the static reply or the original data */
    299                         rc = sendto(socket_id, reply ? reply : data, reply ? reply_length : length, 0, address, addrlen);
    300                         if (rc != EOK)
    301                                 socket_print_error(stderr, rc, "Socket send: ", "\n");
     299                        if (type == SOCK_STREAM) {
     300                                rc = send(socket_id, reply ? reply : data, reply ? reply_length : length, 0);
     301                                if (rc != EOK)
     302                                        socket_print_error(stderr, rc, "Socket send: ", "\n");
     303                        } else {
     304                                rc = sendto(socket_id, reply ? reply : data, reply ? reply_length : length, 0, address, addrlen);
     305                                if (rc != EOK)
     306                                        socket_print_error(stderr, rc, "Socket send: ", "\n");
     307                        }
    302308                }
    303309
Note: See TracChangeset for help on using the changeset viewer.