search for: net_rec

Displaying 4 results from an estimated 4 matches for "net_rec".

Did you mean: ret_rec
2016 Jul 31
1
Some question about code of xenapi
...ays fails at network creating, and the code in libvirt-1.3.5\src\xenapi\xenapi_utils.c, line 437 is following: xen_vif_create(session, &vif, vif_record); if (!vif) { xen_vif_free(vif); xen_vif_record_free(vif_record); xen_network_record_free(net_rec); xen_network_set_free(net_set); return 0; } xen_vif_record_free(vif_record); xen_network_record_free(net_rec); ... ... return -1; should this if be if (vif) {...}, if the vif is null, why need to free it?
2017 Sep 08
5
EOF from net_disconnect(fd)
...n the Go daemon code. I?m no pro with C but I tried. The snippet from the plugin follows: alarm(1);?????????????? ??? { if (net_transmit(fd, str_data(req), str_len(req)) < 0) { ? i_error("write(%s) failed: %m", socket_path); ? ret = -1; } else { ? char res[1024]; ? ret = net_receive(fd, res, sizeof(res)-1); ? if (ret < 0) { ??????????????? i_error("read(%s) failed: %m", socket_path); ? } else { ??????????????? res[ret] = '\0'; ??????????????? if (strncmp(res, "OK ", 3) == 0) { ??????????????? ? ret = 0; ??????????????? } ? } } } al...
2017 Sep 08
1
EOF from net_disconnect(fd)
...>> >> { >> >> if (net_transmit(fd, str_data(req), str_len(req)) < 0) { >> >> i_error("write(%s) failed: %m", socket_path); >> >> ret = -1; >> >> } else { >> >> char res[1024]; >> >> ret = net_receive(fd, res, sizeof(res)-1); >> >> if (ret < 0) { >> >> i_error("read(%s) failed: %m", socket_path); >> >> } else { >> >> res[ret] = '\0'; >> >> if (strncmp(res, &quo...
2017 Sep 08
0
EOF from net_disconnect(fd)
...gin follows: > > > > alarm(1); > > { > > if (net_transmit(fd, str_data(req), str_len(req)) < 0) { > > i_error("write(%s) failed: %m", socket_path); > > ret = -1; > > } else { > > char res[1024]; > > ret = net_receive(fd, res, sizeof(res)-1); > > if (ret < 0) { > > i_error("read(%s) failed: %m", socket_path); > > } else { > > res[ret] = '\0'; > > if (strncmp(res, "OK ", 3) == 0) { > >...