• Home
  • Raw
  • Download

Lines Matching refs:vhd

104 	struct per_vhost_data__raw_test *vhd =  in callback_raw_test()  local
114 vhd = lws_protocol_vh_priv_zalloc(lws_get_vhost(wsi), in callback_raw_test()
117 if (!vhd) in callback_raw_test()
119 vhd->context = lws_get_context(wsi); in callback_raw_test()
120 vhd->protocol = lws_get_protocol(wsi); in callback_raw_test()
121 vhd->vhost = lws_get_vhost(wsi); in callback_raw_test()
127 lws_strncpy(vhd->fifo_path, pvo->value, in callback_raw_test()
128 sizeof(vhd->fifo_path)); in callback_raw_test()
131 if (vhd->fifo_path[0] == '\0') { in callback_raw_test()
138 unlink(vhd->fifo_path); in callback_raw_test()
139 if (mkfifo(vhd->fifo_path, 0666)) { in callback_raw_test()
143 vhd->fifo = lws_open(vhd->fifo_path, O_NONBLOCK | O_RDONLY); in callback_raw_test()
144 if (vhd->fifo == -1) { in callback_raw_test()
146 unlink(vhd->fifo_path); in callback_raw_test()
149 lwsl_notice("FIFO %s created\n", vhd->fifo_path); in callback_raw_test()
150 u.filefd = vhd->fifo; in callback_raw_test()
151 if (!lws_adopt_descriptor_vhost(vhd->vhost, in callback_raw_test()
156 close(vhd->fifo); in callback_raw_test()
157 unlink(vhd->fifo_path); in callback_raw_test()
163 if (!vhd) in callback_raw_test()
165 if (vhd->fifo >= 0) { in callback_raw_test()
166 close(vhd->fifo); in callback_raw_test()
167 unlink(vhd->fifo_path); in callback_raw_test()
187 n = (int)read(vhd->fifo, buf, sizeof(buf) - 1); in callback_raw_test()
205 vhd->zero_length_read = 1; in callback_raw_test()
216 if (vhd->zero_length_read) { in callback_raw_test()
217 vhd->zero_length_read = 0; in callback_raw_test()
218 close(vhd->fifo); in callback_raw_test()
222 vhd->fifo = lws_open(vhd->fifo_path, in callback_raw_test()
224 if (vhd->fifo == -1) { in callback_raw_test()
228 lwsl_notice("FIFO %s reopened\n", vhd->fifo_path); in callback_raw_test()
229 u.filefd = vhd->fifo; in callback_raw_test()
230 if (!lws_adopt_descriptor_vhost(vhd->vhost, 0, u, in callback_raw_test()
233 close(vhd->fifo); in callback_raw_test()