comparison packages/net/athttpd/current/src/cgi.c @ 2265:b5670f3c40f2

* cdl/httpd.cdl: * doc/athttpd.sgml: Corrected some typos and rectified some omissions. * include/jim.h: Added an inline to Jim_InitExtension() * src/cgi.c: used malloc() instead of cyg_ldr_malloc(); * src/forms.c: Added a #define to be able tio use the TCL scripting without OBJLOADER * src/http.c: * src/socket.c: Lots of typos stamped out, and some better comments too.
author jlarmour
date Thu, 10 Aug 2006 17:37:48 +0000
parents 0830ae6acddc
children bd648d8929f6
comparison
equal deleted inserted replaced
2264:af00278f385c 2265:b5670f3c40f2
41 * ####ECOSGPLCOPYRIGHTEND#### 41 * ####ECOSGPLCOPYRIGHTEND####
42 * ================================================================= 42 * =================================================================
43 * #####DESCRIPTIONBEGIN#### 43 * #####DESCRIPTIONBEGIN####
44 * 44 *
45 * Author(s): Anthony Tonizzo (atonizzo@gmail.com) 45 * Author(s): Anthony Tonizzo (atonizzo@gmail.com)
46 * Contributors: 46 * Contributors: Sergei Gavrikov (w3sg@SoftHome.net)
47 * Date: 2006-06-12 47 * Date: 2006-06-12
48 * Purpose: 48 * Purpose:
49 * Description: 49 * Description:
50 * 50 *
51 * ####DESCRIPTIONEND#### 51 * ####DESCRIPTIONEND####
177 { 177 {
178 cyg_httpd_send_error(CYG_HTTPD_STATUS_SYSTEM_ERROR); 178 cyg_httpd_send_error(CYG_HTTPD_STATUS_SYSTEM_ERROR);
179 return 0; 179 return 0;
180 } 180 }
181 181
182 char* tcl_buffer = (char*)cyg_ldr_malloc(sp.st_size); 182 char* tcl_buffer = (char*)malloc(sp.st_size);
183 CYG_ASSERT(tcl_buffer != NULL, "Cannot malloc() for tcl CGI"); 183 CYG_ASSERT(tcl_buffer != NULL, "Cannot malloc() for tcl CGI");
184 if (tcl_buffer == NULL) 184 if (tcl_buffer == NULL)
185 { 185 {
186 cyg_httpd_send_error(CYG_HTTPD_STATUS_SYSTEM_ERROR); 186 cyg_httpd_send_error(CYG_HTTPD_STATUS_SYSTEM_ERROR);
187 return 0; 187 return 0;
302 } 302 }
303 #endif 303 #endif
304 #ifdef CYGOPT_NET_ATHTTPD_USE_CGIBIN_TCL 304 #ifdef CYGOPT_NET_ATHTTPD_USE_CGIBIN_TCL
305 if ( strcmp(extension, CYG_HTTPD_DEFAULT_CGIBIN_TCL_EXTENSION) == 0) 305 if ( strcmp(extension, CYG_HTTPD_DEFAULT_CGIBIN_TCL_EXTENSION) == 0)
306 { 306 {
307 // Load a cgibin via OBJLOADER. 307 // Load a cgibin via the TCL interpreter.
308 cyg_int32 rc = cyg_httpd_exec_cgi_tcl(file_name); 308 cyg_int32 rc = cyg_httpd_exec_cgi_tcl(file_name);
309 return rc; 309 return rc;
310 } 310 }
311 #endif 311 #endif
312 cyg_httpd_send_error(CYG_HTTPD_STATUS_SYSTEM_ERROR); 312 cyg_httpd_send_error(CYG_HTTPD_STATUS_SYSTEM_ERROR);