resmgr pulses handling

I would like my resmgr to handle all the pulses it may receive by the same function. How do I do it, apart from pulse_attaching() every possible pulse code?

There is a flag to pass to message_attach() so you can get any pulse that isn’t registered already.

sorry cdm, I don’t get it…
Can you be more specific?

In the message_attr_t that you pass to message_attach(), you want to set the flag to MSG_FLAG_DEFAULT_FUNC.

message_attr_t attr;

message_attach(…, &attr, …);

OK. Here are my results:
When using message_attach() and specifying the MSG_FLAG_DEFAULT_FUNC flag, the handler func gets called but nothing seems to be passed to it, not even the pulse code. (Normal?) So it’s hard to get work done!
Using message_attach() with _PULSE_CODE_MINAVAIL and _PULSE_CODE_MAXAVAIL for low and high params works good for what I need.

The pulse code is not provided to the handler func in the code parameter, but it can be found in ctp->msg->pulse.code.