]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
settings: fix the ugly bug (low limit of htsmsg_binary_serialize)
authorJaroslav Kysela <perex@perex.cz>
Mon, 22 Feb 2016 19:55:30 +0000 (20:55 +0100)
committerJaroslav Kysela <perex@perex.cz>
Mon, 22 Feb 2016 19:55:30 +0000 (20:55 +0100)
src/settings.c

index cb97814d3da6d3ce50bc0cdb6f1fb1d08121834b..7ec1cfb5964091c2462340c001bc9c1f1f96d319 100644 (file)
@@ -183,11 +183,13 @@ hts_settings_save(htsmsg_t *record, const char *pathfmt, ...)
   } else {
 #if ENABLE_ZLIB
     msgdata = NULL;
-    r = htsmsg_binary_serialize(record, &msgdata, &msglen, 0x10000);
+    r = htsmsg_binary_serialize(record, &msgdata, &msglen, 2*1024*1024);
     if (!r && msglen >= 4) {
       r = tvh_gzip_deflate_fd_header(fd, msgdata + 4, msglen - 4, 3);
       if (r)
         ok = 0;
+    } else {
+      tvhlog(LOG_ALERT, "settings", "Unable to pack the configuration data \"%s\"", path);
     }
     free(msgdata);
 #endif