[Devel] [ openser-Bugs-1372451 ] avpops: avp_db_delete deletes too much

SourceForge.net noreply at sourceforge.net
Sat Dec 3 20:26:12 CET 2005


Bugs item #1372451, was opened at 2005-12-03 19:26
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1372451&group_id=139143

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: modules
Group: ver devel
Status: Open
Resolution: None
Priority: 5
Submitted By: Norman Brandinger (goestelecom)
Assigned to: Nobody/Anonymous (nobody)
Summary: avpops: avp_db_delete deletes too much

Initial Comment:
1) The use_domain parameter is turned off, for example
in the statement below:

modparam("avpops","use_domain", 0)

2) A call to avp_db_delete is made, for example:

avp_db_delete("$from/username","s:fwd_blind");

3) ALL AVP's for the specified username with an
attribute of "fwd_blind" are deleted.

If there are multiple entries for the username (some
with different domains), they are ALL unexpectedly deleted.

A fix would be to change the SQL delete from:

DELETE from usr_preferences where username = 'username'
and attribute = 'fwd_blind'

To:

DELETE from usr_preferences where username = 'username'
and attribute = 'fwd_blind' and domain = ''


I spent a little time looking at way the SQL query is
dynamically created and realized that this fix would be
able to be done faster ( and with less side effects) by
the developer.

Regards,
Norm


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=1372451&group_id=139143



More information about the Devel mailing list