RE: [reSIProcate] how to generate HeaderHash.cxx on Win32
There are some modifications you need to make to the gpref output. The
easiest way to do this on windows is to use gpref to create a
HeaderHash2.cxx and use WinDiff to merge relevant portions into
HeaderHash.cxx. Check out the Makefile and look at the sed lines to see
what needs to be changed. The changes have to do with case sensitivity
in the hash lookups. You could probably also get a copy of sed for
windows and just run these commands.
Also make sure you add your header to all the correct source files:
http://wiki.resiprocate.org/wiki/index.php?title=Adding_a_new_header
Scott
> -----Original Message-----
> From: resiprocate-devel-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:resiprocate-
> devel-bounces@xxxxxxxxxxxxxxxxxxx] On Behalf Of liu noiile
> Sent: Monday, December 19, 2005 8:53 AM
> To: resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> Subject: [reSIProcate] how to generate HeaderHash.cxx on Win32
>
> I Want to add a new Header, but I don't know how to used gperf
generate
> HeaderHash.cxx on Win32.
>
> I type "gperf -D --enum -E -L C++ -t -k '*' --compare-strncmp -Z
> HeaderHash
> --output-file HeaderHash.cxx HeaderHash.gperf" in cmd. and build my
test
> program, but the result is not correct.
>
> This is my test program, Kao is new header, and it is single header:
> Data txt("INVITE sip:192.168.2.92:5100;q=1 SIP/2.0\r\n"
> "To: <sip:yiwen@xxxxxxxxxxxxxxxxx>\r\n"
> "From: Jason
> Fischl<sip:jason@xxxxxxxxxxxxxxxxx>;tag=ba1aee2d\r\n"
> "Kao: hello\r\n"
> "\r\n");
>
> auto_ptr<SipMessage> msg(SipMessage::make(txt));
>
> cout << *msg << endl << endl;
> Data myStr("what");
> msg->header(h_Kao).value() = myStr;
> cout << *msg;
>
> The output is:
>
> INVITE sip:192.168.2.92:5100;q=1 SIP/2.0
> Content-Length: 0
> To: <sip:yiwen@xxxxxxxxxxxxxxxxx>
> From: Jason Fischl<sip:jason@xxxxxxxxxxxxxxxxx>;tag=ba1aee2d
> Kao: hello
>
>
>
> INVITE sip:192.168.2.92:5100;q=1 SIP/2.0
> Kao: what
> Content-Length: 0
> To: <sip:yiwen@xxxxxxxxxxxxxxxxx>
> From: Jason Fischl<sip:jason@xxxxxxxxxxxxxxxxx>;tag=ba1aee2d
> Kao: hello
>
>
> _______________________________________________
> resiprocate-devel mailing list
> resiprocate-devel@xxxxxxxxxxxxxxxxxxx
> https://list.sipfoundry.org/mailman/listinfo/resiprocate-devel