Changeset 3abf0760 in mainline
- Timestamp:
- 2013-05-16T12:25:06Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 89ac5513
- Parents:
- 4510e06
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/srv/net/slip/slip.c
r4510e06 r3abf0760 275 275 service_id_t linksid; 276 276 category_id_t iplinkcid; 277 async_sess_t *sess = NULL; 277 async_sess_t *sess_in = NULL; 278 async_sess_t *sess_out = NULL; 278 279 fid_t fid; 279 280 int rc; … … 307 308 308 309 /* 309 * Create a parallel session because we will need to be able to both310 * read and write from the char_dev.310 * Create two sessions to allow to both read and write from the 311 * char_dev at the same time. 311 312 */ 312 sess = loc_service_connect(EXCHANGE_PARALLEL, svcid, 0);313 if (!sess ) {313 sess_out = loc_service_connect(EXCHANGE_SERIALIZE, svcid, 0); 314 if (!sess_out) { 314 315 log_msg(LOG_DEFAULT, LVL_ERROR, 315 316 "Failed to connect to service %s (ID=%d)", … … 317 318 return rc; 318 319 } 319 slip_iplink.arg = sess; 320 slip_iplink.arg = sess_out; 321 322 sess_in = loc_service_connect(EXCHANGE_SERIALIZE, svcid, 0); 323 if (!sess_in) { 324 log_msg(LOG_DEFAULT, LVL_ERROR, 325 "Failed to connect to service %s (ID=%d)", 326 svcstr, (int) svcid); 327 goto fail; 328 } 320 329 321 330 rc = loc_service_register(linkstr, &linksid); … … 335 344 } 336 345 337 fid = fibril_create(slip_recv_fibril, sess );346 fid = fibril_create(slip_recv_fibril, sess_in); 338 347 if (!fid) { 339 348 log_msg(LOG_DEFAULT, LVL_ERROR, … … 346 355 347 356 fail: 348 if (sess) 349 async_hangup(sess); 357 if (sess_out) 358 async_hangup(sess_out); 359 if (sess_in) 360 async_hangup(sess_in); 350 361 351 362 /*
Note:
See TracChangeset
for help on using the changeset viewer.