Re: [PATCH] Fix for gw/smsc/smsc_smpp.c - bogus coding and no udh on deliver_sm

2003-02-18 Thread Bruno Rodrigues
Citando Dave White [EMAIL PROTECTED]:

 This patch fixes the following issues:
 
 *) Kannel coding param is overwritten with wrong values by pdu_to_msg 
 (e.g. a Nokia business card, which is 8-bit data encoded as iso-8859-1, 
 is processed by Kannel as 7-bit text, and will be forwarded as coding 1.)

I see your point now. Setting msg-sms.coding by hand is broken. If you can
gather a dcs field from smsc pdu, you should call:

if (! dcs_to_fields(msg, dcs)) {
error(0, EMI2[%s]: invalid dcs received,
 octstr_get_cstr(privdata-name));
/* XXX Should we discard message ? */
dcs_to_fields(msg, 0);
}

which will fill sms.coding, sms.compress, sms.mclass and sms.mwi correctly.

I'm now commiting a quick patch to set alt-dcs too on MO messages.

Similary, you should get msg and passing it to fields_to_dcs(msg), you'll get
the right dcs based on coding, compress, mclass, mwi and alt-dcs




 *) UDH is ignored in SMS-MO

If SMPP developers agree with this code, I vote +1 for it and give a thank you
very much for your help


-- 
Davi / Bruno.RodriguesatLitux.Org
Litux.org: 12:59:19 up 87 days, 14:14,  4 users,  load average: 0.37, 0.17, 0.08
'Linux is obsolete
(Andrew Tanenbaum)'




Re: [PATCH] Fix for gw/smsc/smsc_smpp.c - bogus coding and no udh on deliver_sm

2003-02-18 Thread Bruno Rodrigues
Citando Dave White [EMAIL PROTECTED]:

 This patch fixes the following issues:
 
 *) Kannel coding param is overwritten with wrong values by pdu_to_msg 
 (e.g. a Nokia business card, which is 8-bit data encoded as iso-8859-1, 
 is processed by Kannel as 7-bit text, and will be forwarded as coding 1.)

I see your point now. Setting msg-sms.coding by hand is broken. If you can
gather a dcs field from smsc pdu, you should call:

if (! dcs_to_fields(msg, dcs)) {
error(0, EMI2[%s]: invalid dcs received,
 octstr_get_cstr(privdata-name));
/* XXX Should we discard message ? */
dcs_to_fields(msg, 0);
}

which will fill sms.coding, sms.compress, sms.mclass and sms.mwi correctly.

I'm now commiting a quick patch to set alt-dcs too on MO messages.

Similary, you should get msg and passing it to fields_to_dcs(msg), you'll get
the right dcs based on coding, compress, mclass, mwi and alt-dcs




 *) UDH is ignored in SMS-MO

If SMPP developers agree with this code, I vote +1 for it and give a thank you
very much for your help


-- 
Davi / Bruno.RodriguesatLitux.Org
Litux.org: 12:59:19 up 87 days, 14:14,  4 users,  load average: 0.37, 0.17, 0.08
'Linux is obsolete
(Andrew Tanenbaum)'