| 1338 | } |
| 1339 | |
| 1340 | static int process_hello_msg(struct event_info *e) |
| 1341 | { |
| 1342 | if (e->state == 0) { |
| 1343 | ++e->state; |
| 1344 | hello_hdr_common(e); |
| 1345 | return 0; |
| 1346 | } |
| 1347 | clear_distress(e); |
| 1348 | int send_reply = 0; |
| 1349 | if (!e->got_hello) { |
| 1350 | send_reply = 1; |
| 1351 | hputs("GOT HELLO\n"); |
| 1352 | } |
| 1353 | if (hello_msg_common(e) != 0) { |
| 1354 | return -1; |
| 1355 | } |
| 1356 | if (send_reply) { |
| 1357 | hputs("WRITE HELLO REPLY\n"); |
| 1358 | write_hello_reply(e->net_info->netinfo_ptr, e->host_node_ptr); |
| 1359 | } |
| 1360 | message_done(e); |
| 1361 | return 0; |
| 1362 | } |
| 1363 | |
| 1364 | static int process_hello_reply(struct event_info *e) |
| 1365 | { |
no test coverage detected