Namespace of properties

Æde van der Weij vdweij at hotmail.com
Fri Aug 29 02:09:16 EDT 2008


Henrik,

Thank you very much for the patch... guess I have to brush up my C a bit first :) It probably beats my workaround right now, which is capture the tcp traffic of the propget command with whireshark...

I would be great if this patch would be in a next release of Cadaver.




> Date: Thu, 28 Aug 2008 16:31:06 +0200
> From: henrik at witsbits.com
> To: cadaver at lists.manyfish.co.uk
> Subject: Re: Namespace of properties
> 
> >Hi,
> >
> >I've been searching the Cadaver manual and the internet on
> >how to retrieve the namespace of a property. Is this possible at all?
> >If not is there a way to request this feauture?
> >
> >Regards,
> >Aede
> 
> I have attached a patch for cadaver 0.23.2 that adds namespace to the
> "propget" when performing allprop requests. I have included the patch
> as a file also since my mail program makes very strange things with
> inline patches...
> 
> 
> --- ../../cadaver-0.23.2-orgi/src/commands.c    2008-08-28
> 16:06:33.644441766 +0200
> +++ commands.c  2008-08-28 16:14:54.917115338 +0200
> @@ -550,14 +550,16 @@
> static int all_iterator(void *userdata, const ne_propname *pname,
>                        const char *value, const ne_status *status)
> {
> +    char *dnspace = utf8_decode(pname->nspace);
>    char *dname = utf8_decode(pname->name);
>    if (value != NULL) {
>       char *dval = utf8_decode(value);
> -       printf("%s = %s\n", dname, dval);
> +       printf("%s %s = %s\n", dnspace, dname, dval);
>       free(dval);
>    } else if (status != NULL) {
> -       printf(_("%s failed: %s\n"), dname, status->reason_phrase);
> +       printf(_("%s %s failed: %s\n"), dnspace, dname, status->reason_phrase);
>    }
> +    free(dnspace);
>    free(dname);
>    return 0;
> }
> 
> 
> /Henrik Holst
> Witsbits AB

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.manyfish.co.uk/pipermail/cadaver/attachments/20080829/0107fd8b/attachment.html 


More information about the cadaver mailing list