Changeset f51f193 in mainline for uspace/app/ping/ping.c


Ignore:
Timestamp:
2011-07-12T03:00:14Z (13 years ago)
Author:
Petr Koupy <petr.koupy@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
6817eba
Parents:
eca52a8 (diff), 026793d (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

    reca52a8 rf51f193  
    3636
    3737#include <async.h>
    38 #include <async_obsolete.h>
    3938#include <stdio.h>
    4039#include <str.h>
     
    341340            config.dest_str, config.size, config.size);
    342341       
    343         int icmp_phone = icmp_connect_module();
    344         if (icmp_phone < 0) {
     342        async_sess_t *sess = icmp_connect_module();
     343        if (!sess) {
    345344                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;
    348347        }
    349348       
     
    356355                            str_error(ret));
    357356                       
    358                         async_obsolete_hangup(icmp_phone);
     357                        async_hangup(sess);
    359358                        return ret;
    360359                }
    361360               
    362361                /* Ping! */
    363                 int result = icmp_echo_msg(icmp_phone, config.size, config.timeout,
     362                int result = icmp_echo_msg(sess, config.size, config.timeout,
    364363                    config.ttl, config.tos, !config.fragments, config.dest_raw,
    365364                    config.dest_len);
     
    371370                            str_error(ret));
    372371                       
    373                         async_obsolete_hangup(icmp_phone);
     372                        async_hangup(sess);
    374373                        return ret;
    375374                }
     
    391390        }
    392391       
    393         async_obsolete_hangup(icmp_phone);
     392        async_hangup(sess);
    394393       
    395394        return 0;
Note: See TracChangeset for help on using the changeset viewer.