Changeset 1642:80d2b92a82f6
- Timestamp:
- 06/03/08 13:32:32 (3 months ago)
- Author:
- klai@…
- Branch:
- default
- Message:
-
Restrict the amount of data that can be registered with the SLS
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r1638
|
r1642
|
|
| 118 | 118 | self.__l.setLevel(logging.INFO) |
| 119 | 119 | self.__done = False |
| | 120 | self.__max_data_len = 40000 |
| 120 | 121 | |
| 121 | 122 | # setup database |
| … |
… |
|
| 485 | 486 | """ |
| 486 | 487 | service_token = self.__service_profiler.start("register_service") |
| 487 | | values = xmlrpclib.loads(zlib.decompress(v.data))[0][0] |
| | 488 | xml_str = zlib.decompress(v.data) |
| | 489 | # Restrict the amount of data that can be stored in the SLS |
| | 490 | if len(xml_str) > self.__max_data_len: |
| | 491 | return TyException( |
| | 492 | "Data size exceeds maximum", |
| | 493 | (len(xml_str), self.__max_data_len)) |
| | 494 | values = xmlrpclib.loads(xml_str)[0][0] |
| 488 | 495 | self.__cur.execute( |
| 489 | 496 | "select * from services where service_name='%s'" % (service_name,)) |