Vincent CHAVANIS írta:
> -> please kill extralines
OK, soon.
> -> tmpstr is already defined.
> -> NACK/ACK is processed the same way,
> which shoud'nt from the 4.6 specs.
Sorry, I'll read this specs and rewrite the code.

> 
> BTW, i'm not in favor of filling extras informations
> that will not be used by the operator.
> This is bandwith and process wasting.
> Do they really requires this ?
Yes, they require. Otherwise we should'nt  write this (rather dirty)
patch. (But - my opinion - far better if users can specify much more UCP
fields via kannel.conf)

> What happens if you do not fill this ?
They will say, "your UCP application doesn't meet our specifications,
use/write another UPC application". :-(

This patch affects only some users, I don't know if it's worth applying
system-wide.

Ferenc
> 
> regards
> 
> Vincent.
> 
> Ősz Ferenc a écrit :
>> Hi,
>>
>> A simple patch for gw/smsc/smsc_emi.c creates a system message field for
>> UCP52 ack message.
>> (The system message field has the recipient's address + a timestamp.)
>> Eg. T-Mobile in Hungary requires this for SMSC connections..
>>
>> ----------------------------------------------------------------------------
>>
>>
>> --- smsc_emi.c  2009-01-12 17:46:50.000000000 +0100
>> +++ smsc_emi_modified.c 2009-04-15 14:41:03.000000000 +0200
>> @@ -585,7 +585,8 @@
>>      struct universaltime unitime;
>>      int st_code;
>>      PrivData *privdata = conn->data;
>> -
>> +    struct tm tm;
>> +    char p[20];
>>
>>      switch(emimsg->ot) {
>>
>> @@ -832,7 +833,31 @@
>>
>>         msg->sms.smsc_id = octstr_duplicate(conn->id);
>>         bb_smscconn_receive(conn, msg);
>> +
>> +
>>         reply = emimsg_create_reply(52, emimsg->trn, 1, privdata->name);
>> +
>> +    /*
>> +     * Create a system message field for UCP52 ack message.
>> +     * The system message has the recipient's address + a timestamp.
>> +     * Some SMSC (eg. T-Mobile) requires it.
>> +     */
>> +       Octstr *tmpstr;
>> +        tmpstr = octstr_create("");
>> +
>> +        /* Get the recipient's address. */
>> +        octstr_append(tmpstr, emimsg->fields[E50_ADC]);
>> +        octstr_append_char(tmpstr, ':');
>> +
>> +       /* Create a timestamp. */
>> +       tm = gw_localtime(time(NULL) + msg->sms.deferred * 60);
>> +       sprintf(p, "%02d%02d%02d%02d%02d%02d", tm.tm_mday, tm.tm_mon +
>> 1, tm.tm_year % 100, tm.tm_hour, tm.tm_min, tm.tm_sec);
>> +        octstr_append(tmpstr, octstr_create(p));
>> +
>> +       /* Concatenate and insert the fields (number + timestamp)
>> above. */
>> +       reply->fields[2] = tmpstr;
>> +
>> +
>>         if (emi2_emimsg_send(conn, server, reply) < 0) {
>>             emimsg_destroy(reply);
>>             return -1;
>> --------------------------------------------------------------------------------
>>
>>

Reply via email to