Changes in uspace/app/ping/ping.c [bf172825:6b82009] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/ping/ping.c
rbf172825 r6b82009 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();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.