Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/app/ping/ping.c

    rffa2c8ef r6b82009  
    340340            config.dest_str, config.size, config.size);
    341341       
    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) {
    344344                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;
    347347        }
    348348       
     
    355355                            str_error(ret));
    356356                       
    357                         async_hangup(icmp_phone);
     357                        async_hangup(sess);
    358358                        return ret;
    359359                }
    360360               
    361361                /* Ping! */
    362                 int result = icmp_echo_msg(icmp_phone, config.size, config.timeout,
     362                int result = icmp_echo_msg(sess, config.size, config.timeout,
    363363                    config.ttl, config.tos, !config.fragments, config.dest_raw,
    364364                    config.dest_len);
     
    370370                            str_error(ret));
    371371                       
    372                         async_hangup(icmp_phone);
     372                        async_hangup(sess);
    373373                        return ret;
    374374                }
     
    390390        }
    391391       
    392         async_hangup(icmp_phone);
     392        async_hangup(sess);
    393393       
    394394        return 0;
Note: See TracChangeset for help on using the changeset viewer.