src/server/webdav/webdav.c

branch
webdav
changeset 230
ca50e1ebdc4d
parent 227
3c23855f7b46
child 233
c5985d2fc19a
equal deleted inserted replaced
229:73cb1c98ef7d 230:ca50e1ebdc4d
556 *i->list = cur->next; 556 *i->list = cur->next;
557 if(cur->next) { 557 if(cur->next) {
558 cur->next->prev = NULL; 558 cur->next->prev = NULL;
559 } 559 }
560 } 560 }
561 }
562
563 int webdav_nslist_add(
564 pool_handle_t *pool,
565 WebdavNSList **begin,
566 WebdavNSList **end,
567 WSNamespace *ns)
568 {
569 // same as webdav_plist_add but with different type
570 WebdavNSList *elm = pool_malloc(pool, sizeof(WebdavNSList));
571 if(!elm) {
572 return 1;
573 }
574 elm->prev = *end;
575 elm->next = NULL;
576 elm->namespace = ns;
577
578 if(!*begin) {
579 *begin = elm;
580 *end = elm;
581 return 0;
582 }
583
584 (*end)->next = elm;
585 *end = elm;
586
587 return 0;
561 } 588 }
562 589
563 590
564 WSNamespace* webdav_dav_namespace(void) { 591 WSNamespace* webdav_dav_namespace(void) {
565 return &dav_namespace; 592 return &dav_namespace;

mercurial