libidav/davqlexec.c

changeset 49
2f71f4ee247a
parent 1
b5bb7b3cd597
equal deleted inserted replaced
48:ae61523bce20 49:2f71f4ee247a
462 462
463 /* 463 /*
464 * execute a davql select statement 464 * execute a davql select statement
465 */ 465 */
466 DavResult dav_exec_select(DavSession *sn, DavQLStatement *st, va_list ap) { 466 DavResult dav_exec_select(DavSession *sn, DavQLStatement *st, va_list ap) {
467 CxMempool *mp = cxMempoolCreate(128, NULL); 467 CxMempool *mp = cxBasicMempoolCreate(128);
468 DavResult result; 468 DavResult result;
469 result.result = NULL; 469 result.result = NULL;
470 result.status = 1; 470 result.status = 1;
471 471
472 DavQLArgList *args = dav_ql_get_args(st, ap); 472 DavQLArgList *args = dav_ql_get_args(st, ap);
619 619
620 result.result = selroot; 620 result.result = selroot;
621 result.status = 0; 621 result.status = 0;
622 622
623 // do a propfind request for each resource on the stack 623 // do a propfind request for each resource on the stack
624 while(stack->size > 0) { 624 while(cxListSize(stack) > 0) {
625 DavQLRes *sr_ptr = cxListAt(stack, 0); // get first element from the stack 625 DavQLRes *sr_ptr = cxListAt(stack, 0); // get first element from the stack
626 DavResource *root = sr_ptr->resource; 626 DavResource *root = sr_ptr->resource;
627 int res_depth = sr_ptr->depth; 627 int res_depth = sr_ptr->depth;
628 cxListRemove(stack, 0); // remove first element 628 cxListRemove(stack, 0); // remove first element
629 629

mercurial