Changes in uspace/app/ping/ping.c [d5c1051:b7fd2a0] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/ping/ping.c
rd5c1051 rb7fd2a0 71 71 static FIBRIL_MUTEX_INITIALIZE(quit_lock); 72 72 73 static int ping_ev_recv(inetping_sdu_t *);73 static errno_t ping_ev_recv(inetping_sdu_t *); 74 74 75 75 static inetping_ev_ops_t ev_ops = { … … 109 109 } 110 110 111 static int ping_ev_recv(inetping_sdu_t *sdu)111 static errno_t ping_ev_recv(inetping_sdu_t *sdu) 112 112 { 113 113 char *asrc; 114 int rc = inet_addr_format(&src_addr, &asrc);114 errno_t rc = inet_addr_format(&src_addr, &asrc); 115 115 if (rc != EOK) 116 116 return ENOMEM; … … 133 133 } 134 134 135 static int ping_send(uint16_t seq_no)135 static errno_t ping_send(uint16_t seq_no) 136 136 { 137 137 inetping_sdu_t sdu; … … 143 143 sdu.size = 3; 144 144 145 int rc = inetping_send(&sdu);145 errno_t rc = inetping_send(&sdu); 146 146 if (rc != EOK) 147 147 printf("Failed sending echo request: %s: %s.\n", … … 151 151 } 152 152 153 static int transmit_fibril(void *arg)153 static errno_t transmit_fibril(void *arg) 154 154 { 155 155 uint16_t seq_no = 0; … … 163 163 164 164 fibril_mutex_lock(&received_lock); 165 int rc = fibril_condvar_wait_timeout(&received_cv, &received_lock,165 errno_t rc = fibril_condvar_wait_timeout(&received_cv, &received_lock, 166 166 PING_TIMEOUT); 167 167 received_t recv = received; … … 190 190 } 191 191 192 static int input_fibril(void *arg)192 static errno_t input_fibril(void *arg) 193 193 { 194 194 console_ctrl_t *con = console_init(stdin, stdout); … … 222 222 ip_ver_t ip_ver = ip_any; 223 223 224 int rc = inetping_init(&ev_ops);224 errno_t rc = inetping_init(&ev_ops); 225 225 if (rc != EOK) { 226 226 printf("Failed connecting to internet ping service: "
Note:
See TracChangeset
for help on using the changeset viewer.