caps: Real fix for [3295] -- changing separator from ' ' to '\0'.

This commit is contained in:
Tomasz Melcer 2007-07-13 14:44:01 +00:00
parent 3875388496
commit 4ce9d89077
4 changed files with 25 additions and 4 deletions

View File

@ -1,5 +1,5 @@
AC_INIT([Gajim - A Jabber Instant Messager],
[0.11.1.4],[http://trac.gajim.org/],[gajim])
[0.11.1.5],[http://trac.gajim.org/],[gajim])
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.8])
AC_CONFIG_HEADER(config.h)

View File

@ -2,7 +2,7 @@ docdir = '../'
datadir = '../'
version = '0.11.1.4'
version = '0.11.1.5'
import sys, os.path
for base in ('.', 'common'):

View File

@ -664,7 +664,7 @@ class Logger:
# (format: (category, type, name, category, type, name, ...
# ..., 'FEAT', feature1, feature2, ...).join(' '))
# NOTE: if there's a need to do more gzip, put that to a function
data=GzipFile(fileobj=StringIO(str(data))).read().split(' ') # (2) -- note above
data=GzipFile(fileobj=StringIO(str(data))).read().split('\0') # (2) -- note above
i=0
identities=set()
features=set()
@ -694,7 +694,7 @@ class Logger:
data.extend(identity)
data.append('FEAT')
data.extend(features)
data = ' '.join(data)
data = '\0'.join(data)
string = StringIO() # if there's a need to do more gzip, put that to a function
gzip=GzipFile(fileobj=string, mode='w')
gzip.write(data)

View File

@ -161,6 +161,8 @@ class OptionsParser:
self.update_config_to_01113()
if old < [0, 11, 1, 4] and new >= [0, 11, 1, 4]:
self.update_config_to_01114()
if old < [0, 11, 1, 5] and new >= [0, 11, 1, 5]:
self.update_config_to_01115()
gajim.logger.init_vars()
gajim.config.set('version', new_version)
@ -455,3 +457,22 @@ class OptionsParser:
for o in d:
gajim.config.set_per('themes', theme_name, o, theme[d.index(o)])
gajim.config.set('version', '0.11.1.4')
def update_config_to_01115(self):
# copy&pasted from update_config_to_01013, possibly 'FIXME see #2812' applies too
back = os.getcwd()
os.chdir(logger.LOG_DB_FOLDER)
con = sqlite.connect(logger.LOG_DB_FILE)
os.chdir(back)
cur = con.cursor()
try:
cur.executescript(
'''
DELETE FROM caps_cache;
'''
)
con.commit()
except sqlite.OperationalError, e:
pass
con.close()
gajim.config.set('version', '0.11.1.5')