751 threadpool_t *threadpool; |
751 threadpool_t *threadpool; |
752 }; |
752 }; |
753 |
753 |
754 int nsapi_exec(directive *d, NSAPISession *sn, NSAPIRequest *rq) { |
754 int nsapi_exec(directive *d, NSAPISession *sn, NSAPIRequest *rq) { |
755 // TODO: condition |
755 // TODO: condition |
|
756 if(d->cond) { |
|
757 if(!condition_evaluate(d->cond, (Session*)sn, (Request*)rq)) { |
|
758 return REQ_NOACTION; |
|
759 } |
|
760 } |
756 |
761 |
757 char *poolname = pblock_findkeyval(pb_key_pool, d->param); |
762 char *poolname = pblock_findkeyval(pb_key_pool, d->param); |
758 if(poolname) { |
763 if(poolname) { |
759 threadpool_t *pool = get_threadpool(sstr(poolname)); |
764 threadpool_t *pool = get_threadpool(sstr(poolname)); |
760 if(pool && pool != sn->currentpool) { |
765 if(pool && pool != sn->currentpool) { |