Changes in uspace/srv/net/udp/service.c [58e8646:1d03e86] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/udp/service.c
r58e8646 r1d03e86 270 270 } 271 271 272 /** Set association sending messages with no local address.273 *274 * Handle client request to set nolocal flag (with parameters unmarshalled).275 *276 * @param client UDP client277 * @param assoc_id Association ID278 * @return EOK on success, ENOENT if no such association is found279 */280 static int udp_assoc_set_nolocal_impl(udp_client_t *client, sysarg_t assoc_id)281 {282 udp_cassoc_t *cassoc;283 int rc;284 285 rc = udp_cassoc_get(client, assoc_id, &cassoc);286 if (rc != EOK) {287 assert(rc == ENOENT);288 return ENOENT;289 }290 291 log_msg(LOG_DEFAULT, LVL_NOTE, "Setting nolocal to true");292 cassoc->assoc->nolocal = true;293 return EOK;294 }295 296 272 /** Send message via association. 297 273 * … … 415 391 assoc_id = IPC_GET_ARG1(*icall); 416 392 rc = udp_assoc_destroy_impl(client, assoc_id); 417 async_answer_0(iid, rc);418 }419 420 /** Set association with no local address.421 *422 * Handle client request to set no local address flag.423 *424 * @param client UDP client425 * @param iid Async request ID426 * @param icall Async request data427 */428 static void udp_assoc_set_nolocal_srv(udp_client_t *client, ipc_callid_t iid,429 ipc_call_t *icall)430 {431 sysarg_t assoc_id;432 int rc;433 434 log_msg(LOG_DEFAULT, LVL_NOTE, "udp_assoc_set_nolocal_srv()");435 436 assoc_id = IPC_GET_ARG1(*icall);437 rc = udp_assoc_set_nolocal_impl(client, assoc_id);438 393 async_answer_0(iid, rc); 439 394 } … … 707 662 udp_assoc_destroy_srv(&client, callid, &call); 708 663 break; 709 case UDP_ASSOC_SET_NOLOCAL:710 udp_assoc_set_nolocal_srv(&client, callid, &call);711 break;712 664 case UDP_ASSOC_SEND_MSG: 713 665 udp_assoc_send_msg_srv(&client, callid, &call);
Note:
See TracChangeset
for help on using the changeset viewer.