Revision 1.7 |
Revision 1.10 |
Line 10 |
Line 10 |
#include "schedule.h" #include "config.h"  
|
#include "schedule.h" #include "config.h"  
|
void *depot(void *_arg)
|
void *depot(void *_arg) {
|
{
|
|
int max = (int)_arg; int top = 0; pth_msgport_t mp;
|
int max = (int)_arg; int top = 0; pth_msgport_t mp;
|
Line 37 |
Line 36 |
} msg = (pmsg *) pth_msgport_get(mp); if (NULL == msg) {
|
} msg = (pmsg *) pth_msgport_get(mp); if (NULL == msg) {
|
perror("pth_msgport_get (47)");
raise(SIGSEGV);
|
perror("pth_msgport_get");
exit(-1);
|
} Stack[top++] = msg; }
|
} Stack[top++] = msg; }
|
Line 84 |
Line 83 |
* a request and wants to return to the pool)? */ if (PUSH == msg->act) {
|
* a request and wants to return to the pool)? */ if (PUSH == msg->act) {
|
cow_cur_conn--;
|
|
assert(top < max); Stack[top++] = msg; #ifdef SUSP
|
assert(top < max); Stack[top++] = msg; #ifdef SUSP
|
Line 118 |
Line 116 |
reqnode* rn = (reqnode*)msg; /* Send back 'unavailable' message and close connection */
|
reqnode* rn = (reqnode*)msg; /* Send back 'unavailable' message and close connection */
|
response_503(msg->fd);
COW_CLOSE(msg->fd);
|
#ifdef USE_TCPCORK
STATIC_RESPONSE(msg->fd, 503);
|
|
cow_close_socket(msg->fd);
#else
STATIC_RESPONSE(msg->buf, 503);
cow_close_socket(msg->buf);
#endif
--cow_cur_conn;
|
/* Return the message structure to the pmsg pool */ rn->next = pmsgpool_first;
|
/* Return the message structure to the pmsg pool */ rn->next = pmsgpool_first;
|
Line 171 |
Line 175 |
return (void *)NULL; }
|
return (void *)NULL; }
|