cpdb-libs 2.0b7 #81
tillkamppeter
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the seventh beta release for cpdb-libs 2.0.0 the development was mostly led by Biswadeep Purkayastha, GSoC contributor on CPDB support for LibreOffice and his mentor Michael Weghorn, LibreOffice developer. Many bugs, especially memory leaks, got fixed and the API got improved, following actual needs.
This allows third-party applications to easily manage different CPDB releases. This is especially important when shipping pre-built binaries of such applications implementing CPDB, as the end users may be running outdated and potentially vulnerable versions of CPDB (Pull request Add capability to check CPDB version at runtime #49).
(Pull request Allow to extract translations from table #58)
cpdb-text-frontend
: Get locale via GLibInstead of only supporting the LANGUAGE environment variable that's not necessarily set, use GLib's
g_get_language_names
to detect the locale to use in the text frontend which takes other environment variables into account as well (Pull request text-frontend: Get locale via GLib #51).cpdb-text-frontend
: Quit on EOF (Ctrl + D)Quit the text frontend when scanf returns EOF, which e.g. happens when the user presses Ctrl + D. Previously, pressing Ctrl + D would result in the loop running indefinitely, printing ">" without end (Pull request text-frontend: Quit on EOF #38).
cpdbRefreshPrinterList()
to refresh the printer list(Pull request Function to refresh printer list #35)
cpdbPrinterCallback()
printer_callback()
incpdb-text-frontend
(Pull request Make functions non static to be usable by frontend api #36)
(Pull request Make cpdbFillBasicOptions non-static #37)
on_printer_added()
->cpdbOnPrinterAdded()
on_printer_removed()
->cpdbOnPrinterRemoved()
on_printer_state_changed()
->cpdbOnPrinterStateChanged()
(Pull request Make functions non static to be usable by frontend api #36)
get_dbus_connection()
into API functioncpdbGetDbusConnection()
(Pull request Function to refresh printer list #35)
instance_name
from API functionscpdbGetNewFrontendObj()
andcpdbStartListingPrinters()
(Pull request Removed unused parameter instanceName #41)
cpdb-text-frontend
: Add null check for get-default-printerInstead of crashing, asking for the default printer for a non-existing backend now prints a decent error message (Pull request text-frontend: Add null check for get-default-printer #50).
cpdbConcatPath()
: Actually checkXDG_CONFIG_DIRS
Instead of using
CPDB_SYSCONFDIR
again as it was already done earlier, and doing so in a loop, use the actual path extracted from theXDG_CONFIG_DIRS
environment variable (Pull request cpdbConcatPath: Actually check XDG_CONFIG_DIRS #48).Try to open the file to be printed at the given file path before creating a print job using
cpdbPrintFD()
, to avoid creation of a "dead" job which needs to get manually canceled (Pull request frontend: Check file before creating print job #78).(Pull request Correct DBus calls to add, delete and state change of printers #44)
cpdbRefreshPrinterList()
asconst char*
Use
const char*
instead ofchar*
for thebackend
param ofcpdbRefreshPrinterList()
.const char*
is the usual way to pass C strings. That also simplifies using the function (Pull request Pass backend name to cpdbRefreshPrinterList as const char* #40).cpdb-text-frontend
: Don't crash when printer doesn't existInstead of crashing due to a NULL dereference, print a message and skip further processing of the current command when
cpdbFindPrinterObj
returns NULL, e.g. because the user has entered the name of a nonexisting printer or backend (Pull request text-frontend: Don't crash when printer doesn't exist #39).cpdbGetStringCopy()
withg_strdup()
GLib's
g_strdup()
already provides the same functionality ascpdbGetStringCopy()
, so there's no need to have a custom implementation and even make that part of the public API (Pull request Replace cpdbGetStringCopy with g_strdup #42).cpdbConcat()
withg_strconcat()
GLib's
g_strconcat
already provides the functionality to concatenate strings, so there's no need to havecpdbConcat
as a custom implementation and even make that part of the public API (Pull request Replace cpdbConcat with g_strconcat #55).(Pull requests text-frontend: Drop unused local vars #52, text-frontend: Drop unused variable "job_id" #64, Drop misc unused variables #68)
cpdb_job_t
andcpdbUnpackJobArray()
Got unused since we stream the print data through a Unix domain socket (Pull request Added functionality for socket streaming of file content #30). Removed with pull request Drop unused cpdb_job_t and cpdbUnpackJobArray #73.
cpdbExtractFileName()
(Pull request Drop unused cpdbExtractFileName #56)
own_id
member of frontend data structure(Pull request frontend: Drop unused 'own_id' member #46)
cpdbGetSysConfDir()
(Pull request Fix a memory leak in cpdbGetSysConfDir #47)cpdbUnpackOptions()
(Pull request Fix memory leaks in cpdbUnpackOptions #53)cpdb-text-frontend
: Fix memory leak inadd-setting()
(Pull request text-frontend: Fix memory leak in "add-setting" #54)cpdbGetDefaultPrinterForBackend()
(Pull request Fix memory leak in cpdbGetDefaultPrinterForBackend #57)cpdbCreateBackend()
(Pull request Fix memory leak in cpdbCreateBackend #59)cpdbRefreshPrinterList()
(Pull request Fix memory leak in cpdbRefreshPrinterList #60)f->printer
hasg table (Pull request Fixing a memory leak #61)cpdbPrintFileWithJobTitle()
(Pull request Fix memory leak in cpdbPrintFileWithJobTitle #62)cpdb-text-frontend
: Fix memory leak inprint-file()
(Pull request text-frontend: Fix memory leak in "print-file" #63)GVariantBuilder
to fix memory leak (Pull request Unref GVariantBuilder to fix memory leak #65)cpdbActivateBackends()
(Pull request Fix memory leak in cpdbActivateBackends #66)doListing
(Pull request Log and free GError in call to "doListing" #67)cpdbDeletePrinterObj()
(Pull request Free printer object string members in cpdbDeletePrinterObj #72)cpdbDeleteOption()
(Pull request Free option values in cpdbDeleteOption #74)cpdb-text-frontend
(Pull requests Fix memory leak in getAllPrintersLookup #75, text-frontend: Fix memleaks in "get-option-translation" etc. #76)cpdbGet...Translation()
(Pull request Fix memory leaks in cpdbGetOptionTranslation etc. #77)cpdbResurrectPrinterFromFile()
(Pull request Fix potential double-free in cpdbResurrectPrinterFromFile #69)
Added header comments for auto-generating developer documentation (Pull request Documentation for newly added API functions #43).
This discussion was created from the release cpdb-libs 2.0b7.
Beta Was this translation helpful? Give feedback.
All reactions