Changes in uspace/app/ping/ping.c [6b82009:79ae36dd] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/ping/ping.c
r6b82009 r79ae36dd 36 36 37 37 #include <async.h> 38 #include <async_obsolete.h> 38 39 #include <stdio.h> 39 40 #include <str.h> … … 340 341 config.dest_str, config.size, config.size); 341 342 342 async_sess_t *sess = icmp_connect_module();343 if ( !sess) {343 int icmp_phone = icmp_connect_module(ICMP_CONNECT_TIMEOUT); 344 if (icmp_phone < 0) { 344 345 fprintf(stderr, "%s: Unable to connect to ICMP service (%s)\n", NAME, 345 str_error( errno));346 return errno;346 str_error(icmp_phone)); 347 return icmp_phone; 347 348 } 348 349 … … 355 356 str_error(ret)); 356 357 357 async_ hangup(sess);358 async_obsolete_hangup(icmp_phone); 358 359 return ret; 359 360 } 360 361 361 362 /* Ping! */ 362 int result = icmp_echo_msg( sess, config.size, config.timeout,363 int result = icmp_echo_msg(icmp_phone, config.size, config.timeout, 363 364 config.ttl, config.tos, !config.fragments, config.dest_raw, 364 365 config.dest_len); … … 370 371 str_error(ret)); 371 372 372 async_ hangup(sess);373 async_obsolete_hangup(icmp_phone); 373 374 return ret; 374 375 } … … 390 391 } 391 392 392 async_ hangup(sess);393 async_obsolete_hangup(icmp_phone); 393 394 394 395 return 0;
Note:
See TracChangeset
for help on using the changeset viewer.