Lines Matching refs:pss
30 struct pss { struct
53 struct pss *pss = (struct pss *)data; in file_upload_cb() argument
58 lws_strncpy(pss->filename, filename, sizeof(pss->filename) - 1); in file_upload_cb()
60 lws_filename_purify_inplace(pss->filename); in file_upload_cb()
62 pss->fd = lws_open(pss->filename, O_CREAT | O_TRUNC | O_RDWR, 0600); in file_upload_cb()
63 if (pss->fd == -1) { in file_upload_cb()
65 pss->filename); in file_upload_cb()
74 pss->file_length += (unsigned int)len; in file_upload_cb()
76 n = (int)write(pss->fd, buf, (unsigned int)len); in file_upload_cb()
88 pss->file_length, pss->filename); in file_upload_cb()
90 close(pss->fd); in file_upload_cb()
91 pss->fd = -1; in file_upload_cb()
106 struct pss *pss = (struct pss *)user; in callback_http() local
131 if (!pss->spa) { in callback_http()
132 pss->spa = lws_spa_create(wsi, param_names, in callback_http()
134 file_upload_cb, pss); in callback_http()
135 if (!pss->spa) in callback_http()
141 if (lws_spa_process(pss->spa, in, (int)len)) in callback_http()
149 lws_spa_finalize(pss->spa); in callback_http()
154 if (!lws_spa_get_string(pss->spa, n)) in callback_http()
159 lws_spa_get_length(pss->spa, n), in callback_http()
160 lws_spa_get_string(pss->spa, n)); in callback_http()
177 if (pss->spa) { in callback_http()
178 lws_spa_destroy(pss->spa); in callback_http()
179 pss->spa = NULL; in callback_http()
191 { "http", callback_http, sizeof(struct pss), 0, 0, NULL, 0 },