Changeset 665
- Timestamp:
- 03/12/07 23:55:48 (2 years ago)
- Files:
-
- cherokee/trunk/ChangeLog (modified) (1 diff)
- cherokee/trunk/Makefile.am (modified) (1 diff)
- cherokee/trunk/cherokee/common-internal.h (modified) (1 diff)
- cherokee/trunk/cherokee/handler_admin.c (modified) (1 diff)
- cherokee/trunk/cherokee/socket.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cherokee/trunk/ChangeLog
r664 r665 1 2007-03-12 Alvaro Lopez Ortega <alvaro@alobbs.com> 2 3 * cherokee/socket.c (cherokee_socket_writev): Fixed. It wasn't 4 compiling. 5 6 * cherokee/socket.c (cherokee_socket_read): removed the 7 GNUTLS_E_INTERRUPTED case. It seems to have the same value than 8 GNUTLS_E_AGAIN. 9 10 * cherokee/common-internal.h: Added a macro to define INT_MAX if 11 necessary. 12 13 * Makefile.am (SUBDIRS): Moved doc to the last place, in order to 14 ensure that if something happens processing that directory, all 15 the rest of the directories were already processed. 16 1 17 2007-03-10 A.D.F <adefacc@tin.it> 2 18 cherokee/trunk/Makefile.am
r544 r665 1 1 ## Cherokee: Makefile.am -*- makefile -*- 2 2 3 SUBDIRS = m4 contrib www doc icons themes qa cherokee cget windows3 SUBDIRS = m4 contrib www icons themes qa cherokee cget windows doc 4 4 bin_SCRIPTS = cherokee-config 5 5 SUFFIXES = .sample.pre .sample cherokee/trunk/cherokee/common-internal.h
r656 r665 168 168 #endif 169 169 170 /* Int limit 171 */ 172 #ifndef INT_MAX 173 # if (SIZEOF_INT == 4) 174 # define INT_MAX 0x7fffffffL /* 2^32 - 1 */ 175 # elif (SIZEOF_INT == 8) 176 # define INT_MAX 0x7fffffffffffffffL /* 2^64 - 1 */ 177 # else 178 # error "Can't define INT_MAX" 179 # endif 180 #endif 181 170 182 #endif /* CHEROKEE_COMMON_INTERNAL_H */ cherokee/trunk/cherokee/handler_admin.c
r646 r665 57 57 cherokee_handler_init_base (HANDLER(n), cnt, HANDLER_PROPS(props), PLUGIN_INFO_HANDLER_PTR(admin)); 58 58 59 MODULE(n)->init = ( handler_func_init_t) cherokee_handler_admin_init;59 MODULE(n)->init = (module_func_init_t) cherokee_handler_admin_init; 60 60 MODULE(n)->free = (module_func_free_t) cherokee_handler_admin_free; 61 61 HANDLER(n)->step = (handler_func_step_t) cherokee_handler_admin_step; cherokee/trunk/cherokee/socket.c
r664 r665 1072 1072 socket->status = socket_closed; 1073 1073 return ret_eof; 1074 case GNUTLS_E_INTERRUPTED:1075 1074 case GNUTLS_E_AGAIN: 1076 1075 return ret_eagain; … … 1222 1221 1223 1222 #ifdef HAVE_TLS 1224 /* TLS connection. 1225 */ 1226 #if defined (HAVE_GNUTLS) || defined (HAVE_OPENSSL) 1227 /* Here we don't worry about sparing a few CPU cycles, 1228 * so we reuse the single send case for TLS. 1223 #if defined (HAVE_GNUTLS) || defined (HAVE_OPENSSL) 1224 1225 /* TLS connection: Here we don't worry about sparing a few CPU 1226 * cycles, so we reuse the single send case for TLS. 1229 1227 */ 1230 1228 { 1231 int i = 0; 1232 ret_t ret = ret_ok; 1233 size_t cnt = 0; 1234 1235 for (i = 0, re = 0, total = 0; i < vector_len; i++, vector++) { 1236 1237 if (vector[i].iov_base == NULL || vector[i].iov_len == 0) 1238 continue; 1239 1240 cnt = 0; 1241 ret = cherokee_socket_write (socket, vector[i].iov_base, vector[i].iov_len, &cnt); 1242 *pcnt_written += cnt; 1243 1244 if (ret == ret_ok) 1245 continue; 1246 1247 /* else != ret_ok 1248 */ 1249 if (*pcnt_written != 0) 1250 return ret_ok; 1251 /* Nothing has been written, return error code. 1252 */ 1253 return ret; 1254 } 1255 return ret_ok; 1229 int i; 1230 ret_t ret; 1231 size_t cnt; 1232 1233 for (i = 0; i < vector_len; i++, vector++) { 1234 1235 if (vector[i].iov_base == NULL || vector[i].iov_len == 0) 1236 continue; 1237 1238 cnt = 0; 1239 ret = cherokee_socket_write (socket, vector[i].iov_base, vector[i].iov_len, &cnt); 1240 *pcnt_written += cnt; 1241 1242 if (ret == ret_ok) 1243 continue; 1244 1245 /* else != ret_ok 1246 */ 1247 if (*pcnt_written != 0) 1248 return ret_ok; 1249 /* Nothing has been written, return error code. 1250 */ 1251 return ret; 1252 } 1253 1254 return ret_ok; 1255 } 1256 1256 #else 1257 1257 return ret_error; 1258 1258 #endif 1259 1260 1259 #endif /* HAVE_TLS */ 1261 1262 1260 } 1263 1261