}
/* }}} */
-static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
+static int unlink_filename(char **filename TSRMLS_DC) /* {{{ */
{
VCWD_UNLINK(*filename);
return 0;
/*
* Fill up the buffer with client data.
- * returns number of bytes added to buffer.
+ * Returns number of bytes added to buffer.
*/
static int fill_buffer(multipart_buffer *self TSRMLS_DC)
{
return line;
}
-/* returns the next CRLF terminated line from the client */
+/* Returns the next CRLF terminated line from the client */
static char *get_line(multipart_buffer *self TSRMLS_DC)
{
char* ptr = next_line(self);
* Search for a string in a fixed-length byte string.
* If partial is true, partial matches are allowed at the end of the buffer.
* Returns NULL if not found, or a pointer to the start of the first match.
-*/
+ */
static void *php_ap_memstr(char *haystack, int haystacklen, char *needle, int needlen, int partial)
{
int len = haystacklen;
total_bytes += read_bytes;
}
- if (out) out[total_bytes] = '\0';
+ if (out) {
+ out[total_bytes] = '\0';
+ }
*len = total_bytes;
return out;
}
-/* }}} */
+/* }}} */
/*
* The combined READER/HANDLER
#endif
multipart_buffer *mbuff;
zval *array_ptr = (zval *) arg;
- int fd=-1;
+ int fd = -1;
zend_llist header;
void *event_extra_data = NULL;
int llen = 0;
while (!multipart_buffer_eof(mbuff TSRMLS_CC))
{
char buff[FILLUNIT];
- char *cd = NULL,*param = NULL, *filename = NULL, *tmp = NULL;
+ char *cd = NULL, *param = NULL, *filename = NULL, *tmp = NULL;
size_t blen = 0, wlen = 0;
off_t offset;
#endif
cancel_upload = UPLOAD_ERROR_B;
} else if (blen > 0) {
-
wlen = write(fd, buff, blen);
if (wlen == -1) {
cancel_upload = 5;
}
#endif
-
if (php_rfc1867_callback != NULL) {
multipart_event_file_end event_file_end;
if (array_index) {
efree(array_index);
}
- array_index = estrndup(start_arr+1, array_len-2);
+ array_index = estrndup(start_arr + 1, array_len - 2);
}
/* Add $foo_name */
efree(param);
}
}
+
fileupload_done:
if (php_rfc1867_callback != NULL) {
multipart_event_end event_end;
SAFE_RETURN;
}
+/* }}} */
/*
* Local variables: