break;
}
- if (pfd[TO_CGI].revents) {
+ if (pfd[TO_CGI].revents & POLLOUT) {
/* hdr_cnt > 0 here due to the way pfd[TO_CGI].events set */
/* Have data from peer and can write to CGI */
count = safe_write(toCgi_wr, hdr_ptr, hdr_cnt);
}
}
- if (pfd[0].revents) {
+ if (pfd[0].revents & POLLIN) {
/* post_len > 0 && hdr_cnt == 0 here */
/* We expect data, prev data portion is eaten by CGI
* and there *is* data to read from the peer
}
}
- if (pfd[FROM_CGI].revents) {
+ if (pfd[FROM_CGI].revents & POLLIN) {
/* There is something to read from CGI */
char *rbuf = iobuf;
#endif
#if ENABLE_FEATURE_HTTPD_AUTH_MD5
if (opt & OPT_MD5) {
- puts(pw_encrypt(pass, "$1$", 1));
+ char salt[sizeof("$1$XXXXXXXX")];
+ salt[0] = '$';
+ salt[1] = '1';
+ salt[2] = '$';
+ crypt_make_salt(salt + 3, 4, 0);
+ puts(pw_encrypt(pass, salt, 1));
return 0;
}
#endif