Changeset 6a44ee4 in mainline for uspace/app/ping/ping.c


Ignore:
Timestamp:
2011-07-20T15:26:21Z (13 years ago)
Author:
Jakub Jermar <jakub@…>
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.
Message:

Merge mainline changes.

File:
1 edited

Legend:

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

    r25bef0ff r6a44ee4  
    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.