Changeset 6a44ee4 in mainline for uspace/app/ping/ping.c
- Timestamp:
- 2011-07-20T15:26:21Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- efcebe1
- Parents:
- 25bef0ff (diff), a701812 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/ping/ping.c
r25bef0ff r6a44ee4 340 340 config.dest_str, config.size, config.size); 341 341 342 int icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT);343 if ( icmp_phone < 0) {342 async_sess_t *sess = icmp_connect_module(); 343 if (!sess) { 344 344 fprintf(stderr, "%s: Unable to connect to ICMP service (%s)\n", NAME, 345 str_error( icmp_phone));346 return icmp_phone;345 str_error(errno)); 346 return errno; 347 347 } 348 348 … … 355 355 str_error(ret)); 356 356 357 async_hangup( icmp_phone);357 async_hangup(sess); 358 358 return ret; 359 359 } 360 360 361 361 /* Ping! */ 362 int result = icmp_echo_msg( icmp_phone, config.size, config.timeout,362 int result = icmp_echo_msg(sess, config.size, config.timeout, 363 363 config.ttl, config.tos, !config.fragments, config.dest_raw, 364 364 config.dest_len); … … 370 370 str_error(ret)); 371 371 372 async_hangup( icmp_phone);372 async_hangup(sess); 373 373 return ret; 374 374 } … … 390 390 } 391 391 392 async_hangup( icmp_phone);392 async_hangup(sess); 393 393 394 394 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.