Changeset 4597
- Timestamp:
- 01/25/11 02:11:46 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/oscam-http.c
r4593 r4597 3308 3308 process_request((FILE *)ssl, remote.sin_addr); 3309 3309 else { 3310 cfg.http_use_ssl=0;3311 3310 FILE *f; 3312 3311 f = fdopen(s, "r+"); 3313 send_error(f, 200, "Bad Request", NULL, "This web server is running in SSL mode."); 3314 fclose(f); 3315 cfg.http_use_ssl=1; 3312 if(f != NULL) { 3313 // Note: This is quite dirty and only works because webif is not multithreaded! 3314 cfg.http_use_ssl=0; 3315 send_error(f, 200, "Bad Request", NULL, "This web server is running in SSL mode."); 3316 cfg.http_use_ssl=1; 3317 fflush(f); 3318 fclose(f); 3319 } else cs_log("WebIf: Error opening file descriptor using fdopen() (errno=%d)", errno); 3316 3320 } 3317 3321 SSL_shutdown(ssl); … … 3323 3327 FILE *f; 3324 3328 f = fdopen(s, "r+"); 3325 process_request(f, remote.sin_addr); 3326 fflush(f); 3327 fclose(f); 3329 if(f != NULL) { 3330 process_request(f, remote.sin_addr); 3331 fflush(f); 3332 fclose(f); 3333 } else cs_log("WebIf: Error opening file descriptor using fdopen() (errno=%d)", errno); 3328 3334 shutdown(s, SHUT_WR); 3329 3335 close(s);
Note:
See TracChangeset
for help on using the changeset viewer.