Open Source Telephony
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ofono@ofono.org
Subject: Re: status-report expiration
Date: Tue, 07 Sep 2010 09:19:17 -0500	[thread overview]
Message-ID: <4C8649E5.4040505@gmail.com> (raw)
In-Reply-To: <201009061910.18720.petteri.tikander@ixonos.com>

[-- Attachment #1: Type: text/plain, Size: 2493 bytes --]

Hi Petteri,

On 09/06/2010 11:10 AM, Petteri Tikander wrote:
> Hi Denis,
> 
> I'm implementing expiration-logic for status report and have couple of 
> questions. 
> 
> My expiration function under development goes through every 
> addresses and corresponding messages (nodes) from hash-tables, and checks 
> the expiration time. But when finding expired message, it cannot remove 
> corresponding backup-files, because in this moment backup-file contains the 
> whole sms-addressing information (address+numbering plan+number type), but key 
> of the hash-table (sms-address) doesn't. So, first I thought simply to add also 
> numbering plan+number type in the hash-key. So what do you think, could it be 
> a good idea (to include the complete address, but to waste more memory)? OK, I 
> can also change the function to find backup-file by not taking into account 
> numbering plan+number type at all. For example, I can go through backup-files, 
> capture just the sms-address (and message-id), and then search the correct 
> node from the hash-table (not necessarily nice solution).

oFono supports sending SMS messages only to international (prefixed by
+) or 'unknown' (not prefixed by +) numbers.  So you can actually easily
figure out the ton/npi and number based on the address string.  This is
in effect what sms_address_to_hex_string does...

> 
> The another question is: is it enough in this moment just to implement 
> expiration function (and some unit-tests), as in existing sms-assembly 
> solution, when waiting for incoming sms-delivery messages? Seems that in the 
> case of sms-assembly, expiration-status for all messages is polled in some 
> interval. So, possibly you have already earlier discussed about this issue, 
> but how expiration-checking is signaled to sms-util? Will oFono-api take care 
> internally of triggering the expiration-status some how? Or, will oFono-api 
> receive expiration-checking calls outside oFono via D-bus.
> 

For now it is enough just to implement the expiration function and a
unit test.  We still need to hook this up into the core somewhere.  Most
likely it will be a 24 hour timer and we'll also run expiration at
startup if more than 24 hours have elapsed since the last check.

e.g. something like:
LastExpiration = settings.LastExpiration
if (LastExpiration - now > 24 hours)
	run expiration
	LastExpiration = now

set timer until LastExpiration + 24 hours.

Regards,
-Denis

      reply	other threads:[~2010-09-07 14:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-06 16:10 status-report expiration Petteri Tikander
2010-09-07 14:19 ` Denis Kenzior [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C8649E5.4040505@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ofono@ofono.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox