X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Flpp%2Flpp_net.c;h=6af2636595e035057b727e90253e4ad7be3a3e98;hb=2cfb4be35e6255d7cd59824e9b7a5eea39705227;hp=c8799a60da5c19592d090c19d55a431f9bba6e1a;hpb=31d36dd3e8a2b7b513958f005cc555e01b9c3d5b;p=libfirm diff --git a/ir/lpp/lpp_net.c b/ir/lpp/lpp_net.c index c8799a60d..6af263659 100644 --- a/ir/lpp/lpp_net.c +++ b/ir/lpp/lpp_net.c @@ -110,7 +110,7 @@ static int connect_tcp(const char *host, uint16_t port) sin.sin_port = htons(port); if ((phe = gethostbyname(host))) - memcpy(&sin.sin_addr, phe->h_addr, phe->h_length); + memcpy(&sin.sin_addr, phe->h_addr_list[0], phe->h_length); else if((sin.sin_addr.s_addr = inet_addr(host)) == INADDR_NONE) { lpp_print_err("cannot get host entry for %s", host); return -1; @@ -196,12 +196,12 @@ void lpp_solve_net(lpp_t *lpp, const char *host, const char *solver) t_send = ir_timer_new(); t_recv = ir_timer_new(); - ir_timer_push(t_send); + ir_timer_start(t_send); lpp_writel(comm, LPP_CMD_PROBLEM); lpp_serialize(comm, lpp, 1); lpp_serialize_values(comm, lpp, lpp_value_start); lpp_flush(comm); - ir_timer_pop(); + ir_timer_stop(t_send); lpp->send_time = ir_timer_elapsed_usec(t_send); ready = 0; @@ -212,7 +212,7 @@ void lpp_solve_net(lpp_t *lpp, const char *host, const char *solver) ir_timer_push(t_recv); lpp_deserialize_stats(comm, lpp); lpp_deserialize_values(comm, lpp, lpp_value_solution); - ir_timer_pop(); + ir_timer_stop(t_recv); lpp->recv_time = ir_timer_elapsed_usec(t_recv); ready = 1; break;