Hi
everyone.
I have
applied the patch and tested some of it's functionality (global/default sender
and applied defaults) and I found that it does what its advertised to do (or at
least, it doesn't break anything important ;-). I liked the way default-sender
overrides global-sender, but I didn't like the way I still have to set
global-sender anyway - but I guess that cannot be helped.
along
the way I had to put down a small fix for this patch to fix a tiny memory leak,
and here it is attached (it should patch against the CVS too, but that probably
wouldn't work well)
Anyway
- this one is green on my side.
Have
fun
Oded
Arbel
m-Wise Inc.
[EMAIL PROTECTED]
m-Wise Inc.
[EMAIL PROTECTED]
--
Odette : "I thought you hated boys ?"
Verena : "Well, I figured , they're like stray dogs - you have to take
them in, otherwise they run wild and are a danger to society."
-- from "The Strike"
Odette : "I thought you hated boys ?"
Verena : "Well, I figured , they're like stray dogs - you have to take
them in, otherwise they run wild and are a danger to society."
-- from "The Strike"
-----Original Message-----
From: Angel Fradejas [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 19, 2002 6:58 PM
To: Kannel Developers
Subject: [PATCH] smsc default-sender & forced-senderHi list,Find attached my patch (version 2) to add support for default-sender and forced-sender smsc config directives. I will explain some points:1) smsbox: precedence of faked_sender, global_sender, from
------------------------------------------------------------
I have normalized the way these directives are applied. As I posted previously [ with very little feedback I have to say :-( ], MT-replies, and MT's were treated in different ways.I dapply 1) faked_sender then 2) global then 3) fromobey_request_thread, smsbox_req_handle, smsbox_req_sendota were the functions responsible for this. I changed smsbox_req_handle, smsbox_req_sendota to work the same as obey_request_thread.2) struct Msg* : applied_defaults
------------------------------------------------------------
Now smsbox and bearerbox records in the Msg* structure the defaults it applies. This is coded in applied_defaults member. Each default is represented by one bit, and are available for the rest of modules to check with dlf_xxxx constants. For example, you could check inside a smsc driver if global-sender was applied with something like thisif (msg->sms.applied_defaults & dfl_global_sender) { /* global-sender was applied */.... }
3) config directives default-sender and forced-sender
------------------------------------------------------------
This directives can be established for each smsc. Both are optional.default-sender : it overrides faked-sender and global-sender, but NOT &from=
forced-sender : as it name implies, it overrides anything. Every message routed to this smsc will have this sender.
I'd greatly appreciate your feedback, bug reporting, flames, anything.Any chance for commiting to cvs?Have fun.Angel Fradejas.
smscconn.patch
Description: smscconn.patch