Changes in uspace/app/netecho/netecho.c [9164c0c:92b42442] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/netecho/netecho.c
r9164c0c r92b42442 243 243 if (verbose) 244 244 printf("accept()\n"); 245 245 socket_id = accept(listening_id, (void *) address_buf, &addrlen); 246 246 if (socket_id <= 0) { 247 247 socket_print_error(stderr, socket_id, "Socket accept: ", "\n"); … … 312 312 rc = sendto(socket_id, reply ? reply : data, reply ? reply_length : length, 0, address, addrlen); 313 313 if (rc != EOK) 314 socket_print_error(stderr, rc, "Socket send to: ", "\n");314 socket_print_error(stderr, rc, "Socket send: ", "\n"); 315 315 } 316 316 } … … 394 394 return listening_id; 395 395 } 396 397 /* Bind the listening socket */ 398 rc = bind(listening_id, address, addrlen); 399 if (rc != EOK) { 400 socket_print_error(stderr, rc, "Socket bind: ", "\n"); 401 return rc; 402 } 403 396 404 397 /* if the stream socket is used */ 405 398 if (type == SOCK_STREAM) { … … 409 402 backlog = 3; 410 403 } 411 404 412 405 /* Set the backlog */ 413 406 rc = listen(listening_id, backlog); … … 416 409 return rc; 417 410 } 411 } 412 413 /* Bind the listening socket */ 414 rc = bind(listening_id, address, addrlen); 415 if (rc != EOK) { 416 socket_print_error(stderr, rc, "Socket bind: ", "\n"); 417 return rc; 418 418 } 419 419
Note:
See TracChangeset
for help on using the changeset viewer.