On 03/04/06 01:31, Daniel Hsueh wrote:
Instead of fighting with the struct lump mechanism, is it simply easier to find the "append_hf" function and call it directly?

you should take care of parameter format, since append_hf() uses a fixup for its parameters.

I tried calling append_hf in the following fashion:

  append_hf( p->req, (char*)elem, 0 );

where p is a tm module TMCB_REQUEST_IN callback, and elem is either
  - char*
  - str*
  - xl_elem_t* generated via
    xl_parse_format( "Header: value", &elem, XL_DISABLE_COLORS );
    (patterned after textops.c:it_list_fixup)

and I get SEGVs in all cases.

Can anyone suggest where I'm going wrong?

(And due to the problems with str*, I believe the code in modules/osp/sipheader.c:addOspHeader to be incorrect; comments?)
indeed, the code was incorrect. I replaced the append_hf() with a small internal function in the module. You can take a look at append_header_str(). Could someone confirm that the osp module is full functional right now?

Cheers,
Daniel




_______________________________________________
Devel mailing list
Devel@openser.org
http://openser.org/cgi-bin/mailman/listinfo/devel

Reply via email to