On Fri, Apr 01, 2016 at 08:33:34PM +0200, Holger Freyther wrote:
> From: Holger Hans Peter Freyther <[email protected]>
> 
> The issue of db_create_subscriber updating an already existing subcr

s/subcr/subscr
;)

> is that the same subscriber will then have two entries in the active
> subscribers list. In general this will break assumptions that a subscr
> can be compared by comparing the pointer.
> 
> In the case of the VTY this was not an issue as the created subscr
> was immediately destroyed again but it is better to avoid this problem.
> 
> Change the VTY command to find the subscriber and then call sync to
> have the updated time set. The side-effect is we will now have two
> queries for the subscriber. Once through subscr_get_by_imsi and once
> through db_create_subscriber.
> 
> Change the db_create_subscriber to fail if a subscriber already exists,

  and do not update the 'updated' timestamp of an already existing
  subscriber.

  Add a testcase for this behavior.

~Neels

Attachment: signature.asc
Description: Digital signature

Reply via email to