summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Willmann <daniel@totalueberwachung.de>2009-12-27 18:28:37 +0100
committerDaniel Willmann <daniel@totalueberwachung.de>2009-12-27 18:32:40 +0100
commit121809406a9a231121ca35f1e9b99f78f5a83bfe (patch)
tree07a962c2c9f4a3009d33a27dca07ef1d3875fa8e
parentf7a2ddb8024660d4b87156a7a5903f1401eed298 (diff)
Avoid problems with duplicate extensions
-rwxr-xr-xopenbsc/tools/26c3-guru-import.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/openbsc/tools/26c3-guru-import.py b/openbsc/tools/26c3-guru-import.py
index b61a1f714..a1564d5d2 100755
--- a/openbsc/tools/26c3-guru-import.py
+++ b/openbsc/tools/26c3-guru-import.py
@@ -85,6 +85,9 @@ for x in web_tuple:
print exten, imxi
print subscr
+ hlr.execute("""UPDATE Subscriber SET authorized = 0, extension=NULL \
+ WHERE extension = "%s"
+ """ % (str(exten)));
hlr.execute("""UPDATE Subscriber SET authorized = 1,extension="%s" \
WHERE id = %u
""" % (str(exten), subscr['id']) );