Changeset e4f8c77 in mainline for uspace/app/ping/ping.c
- Timestamp:
- 2011-07-13T22:39:18Z (13 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- e6910c8
- Parents:
- 5974661 (diff), 8ecef91 (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
r5974661 re4f8c77 36 36 37 37 #include <async.h> 38 #include <async_obsolete.h>39 38 #include <stdio.h> 40 39 #include <str.h> … … 341 340 config.dest_str, config.size, config.size); 342 341 343 int icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT);344 if ( icmp_phone < 0) {342 async_sess_t *sess = icmp_connect_module(); 343 if (!sess) { 345 344 fprintf(stderr, "%s: Unable to connect to ICMP service (%s)\n", NAME, 346 str_error( icmp_phone));347 return icmp_phone;345 str_error(errno)); 346 return errno; 348 347 } 349 348 … … 356 355 str_error(ret)); 357 356 358 async_ obsolete_hangup(icmp_phone);357 async_hangup(sess); 359 358 return ret; 360 359 } 361 360 362 361 /* Ping! */ 363 int result = icmp_echo_msg( icmp_phone, config.size, config.timeout,362 int result = icmp_echo_msg(sess, config.size, config.timeout, 364 363 config.ttl, config.tos, !config.fragments, config.dest_raw, 365 364 config.dest_len); … … 371 370 str_error(ret)); 372 371 373 async_ obsolete_hangup(icmp_phone);372 async_hangup(sess); 374 373 return ret; 375 374 } … … 391 390 } 392 391 393 async_ obsolete_hangup(icmp_phone);392 async_hangup(sess); 394 393 395 394 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.