{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":105579261,"defaultBranch":"master","name":"cpdb-libs","ownerLogin":"OpenPrinting","currentUserCanPush":false,"isFork":true,"isEmpty":false,"createdAt":"2017-10-02T20:04:05.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/20563597?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1718747857.0","currentOid":""},"activityList":{"items":[{"before":"6e459dd6bada14faa78d397caf9d14b1796d69bd","after":"88932c79d9218cc8eb7d1daf517c438bde517336","ref":"refs/heads/master","pushedAt":"2024-09-12T20:28:24.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Allow to extract translations from table (#58)","shortMessageHtmlLink":"Allow to extract translations from table (#58)"}},{"before":"9908d5854374d7309f77645b77222fa7d0a99128","after":"6e459dd6bada14faa78d397caf9d14b1796d69bd","ref":"refs/heads/master","pushedAt":"2024-09-05T16:10:10.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Fix memory leak in cpdbGetDefaultPrinterForBackend (#57)\n\nAs described in [1], `g_variant_get` in\r\n`print_backend_call_get_default_printer_sync` does the\r\nfollowing:\r\n\r\n> Upon encountering s, o or g, g_variant_get() takes a pointer to a (gchar*)\r\n> (ie: (gchar **)) and sets it to a newly-allocated copy of the\r\n> string. It is appropriate to free this copy using g_free().\r\n\r\nTherefore, free the string copy using `g_free` in\r\n`cpdbGetDefaultPrinterForBackend`.\r\n\r\nThis fixes this memroy leak reported by valgrind:\r\n\r\n ==58581== 4 bytes in 1 blocks are definitely lost in loss record 7 of 1,365\r\n ==58581== at 0x4843808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n ==58581== by 0x4915B81: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x49324E2: g_strdup (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x495AE61: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x495AAEF: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x495BC7D: g_variant_get_va (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x495BEF2: g_variant_get (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x486FCD3: print_backend_call_get_default_printer_sync (backend-interface.c:3117)\r\n ==58581== by 0x485B5BB: cpdbGetDefaultPrinterForBackend (cpdb-frontend.c:711)\r\n ==58581== by 0x10B638: control_thread (cpdb-text-frontend.c:367)\r\n ==58581== by 0x493F160: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8200.0)\r\n ==58581== by 0x4A8E731: start_thread (pthread_create.c:447)\r\n\r\n[1] https://docs.gtk.org/glib/gvariant-format-strings.html#strings","shortMessageHtmlLink":"Fix memory leak in cpdbGetDefaultPrinterForBackend (#57)"}},{"before":"6c95351a1afc37490f9973f44fb67a93e61565e1","after":"9908d5854374d7309f77645b77222fa7d0a99128","ref":"refs/heads/master","pushedAt":"2024-09-05T16:08:50.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Drop unused cpdbExtractFileName (#56)\n\nThe way that `cpdbExtractFileName` casts a `const char*`\r\nto a `char*` and returns a `char*` looks suspicious, as the\r\nsignature seems to suggest that it would be the caller's\r\nresponsibility to free the returned string, but it is\r\nnot actually the owner, as no new string was allocated.\r\n\r\nIn any case, `cpdbExtractFileName`, or more precisely\r\nits predecessor `extract_file_name` is unused\r\nsince\r\n\r\n commit cde7d1dcf6fded0ec1147d87eaee5114e78b3c23\r\n Date: Thu Aug 24 20:57:57 2017 +0530\r\n\r\n Remove the backend specific parts from original code\r\n\r\nand the then already unused function was later renamed to\r\n`cpdbExtractFileName` in\r\n\r\n commit b394eaa2369fe105bb4e28222456c0239110070f\r\n Date: Sun Aug 14 09:41:25 2022 +0200\r\n\r\n Renamed all API functions, data types and constants\r\n\r\nSince the function is neither used here in cpdb-libs nor in\r\ncpdb-backend-cups, just drop it altogether.","shortMessageHtmlLink":"Drop unused cpdbExtractFileName (#56)"}},{"before":"32892b655010422e4e4f61fee5b248627b07e17b","after":"6c95351a1afc37490f9973f44fb67a93e61565e1","ref":"refs/heads/master","pushedAt":"2024-09-05T16:01:24.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Replace cpdbConcat with g_strconcat (#55)\n\nGLib's `g_strconcat` [1] already provides the functionality\r\nto concatenate strings, so there's no need to have\r\n`cpdbConcat` as a custom implementation\r\nand even make that part of the public API.\r\n\r\nTherefore, replace the 2 uses of `cpdbConcat` with\r\n`g_strconcat` and drop `cpdbConcat`.\r\n\r\n[1] https://docs.gtk.org/glib/func.strconcat.html","shortMessageHtmlLink":"Replace cpdbConcat with g_strconcat (#55)"}},{"before":"d12d374b96f2edfe7877b2ca06fcd7fad6557bb2","after":"32892b655010422e4e4f61fee5b248627b07e17b","ref":"refs/heads/master","pushedAt":"2024-08-26T19:16:14.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"text-frontend: Fix memory leak in \"add-setting\" (#54)\n\nThe 2 strings allocated with `g_strdup` were never freed.\r\nThere's no need to duplicate the strings in the first place,\r\nso just pass `option_name` and `option_val` as is.","shortMessageHtmlLink":"text-frontend: Fix memory leak in \"add-setting\" (#54)"}},{"before":"a559bedf1c4e7ede6f736cfe86617ea078c920d8","after":"d12d374b96f2edfe7877b2ca06fcd7fad6557bb2","ref":"refs/heads/master","pushedAt":"2024-08-15T18:41:40.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Fix memory leaks in cpdbUnpackOptions (#53)\n\nMake sure that the memory allocated while\r\nunpacking the variant is freed again, as\r\ndescribed in more detail in the `g_variant_get` [1]\r\nand in the GVariant Format Strings doc [2].\r\n\r\nFor arrays, the iterator needs to be freed\r\nusing `g_variant_iter_free` as described at [3].\r\n\r\nIn general, let `g_variant_iter_loop` take care\r\nof freeing the memory as described in [4].\r\nHowever, add an additional check to detect\r\nthe case where a backend might be sending\r\ninvalid data and sends an array that contains\r\nmore elements than the reported amount. Free\r\nmemory manually in this case.\r\n(No mismatch was observed with printers\r\nreported by cpdb-backend-cups in my local tests with\r\nadditional asserts that the array element\r\ncount matches the reported amount of elements.)\r\n\r\nThis addresses memory leaks like the following reported by\r\nvalgrind, seen e.g. when running `cpdb-text-frontend` and running\r\nthe command `get-all-options PDF CUPS` to print the options of the\r\nCUPS-PDF printer, then quitting:\r\n\r\n ==2670840== 50,392 (80 direct, 50,312 indirect) bytes in 1 blocks are definitely lost in loss record 1,411 of 1,412\r\n ==2670840== at 0x4842808: malloc (in /usr/libexec/valgrind/vgpreload_memcheck-amd64-linux.so)\r\n ==2670840== by 0x4913B41: g_malloc (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8101.0)\r\n ==2670840== by 0x4955DA6: g_variant_iter_new (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8101.0)\r\n ==2670840== by 0x4957F32: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8101.0)\r\n ==2670840== by 0x4958CFD: g_variant_get_va (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8101.0)\r\n ==2670840== by 0x4958F72: g_variant_get (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8101.0)\r\n ==2670840== by 0x485DFC5: cpdbUnpackOptions (cpdb-frontend.c:2124)\r\n ==2670840== by 0x485B399: cpdbGetAllOptions (cpdb-frontend.c:1062)\r\n ==2670840== by 0x10ACEE: control_thread (cpdb-text-frontend.c:197)\r\n ==2670840== by 0x493C2E0: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.8101.0)\r\n ==2670840== by 0x4A8D6C1: start_thread (pthread_create.c:447)\r\n ==2670840== by 0x4B07F6F: clone (clone.S:100)\r\n\r\n(Valgrind still reports memory leaks elsewhere, but they're\r\nunrelated to this change.)\r\n\r\nWhile at it, also indent the involved code consistently\r\nwith spaces instead of a mixture of spaces and tabs.\r\n\r\n[1] https://docs.gtk.org/glib/method.Variant.get.html\r\n[2] https://docs.gtk.org/glib/gvariant-format-strings.html\r\n[3] https://docs.gtk.org/glib/gvariant-format-strings.html#arrays\r\n[4] https://docs.gtk.org/glib/method.VariantIter.loop.html","shortMessageHtmlLink":"Fix memory leaks in cpdbUnpackOptions (#53)"}},{"before":"fbc9164bf2544896ffecf6aa59bf66b12fc85f87","after":"a559bedf1c4e7ede6f736cfe86617ea078c920d8","ref":"refs/heads/master","pushedAt":"2024-08-05T17:07:57.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"text-frontend: Drop unused local vars (#52)\n\n`dialog_bus_name` is unused since\r\n\r\n commit c990f2ddbd000636e57cf4a8e976e1b2b04648bf\r\n Date: Mon Jul 10 14:21:22 2017 +0530\r\n\r\n shift dbus code to FrontendObj\r\n\r\nand `pid` is unused since\r\n\r\n commit fb2686ba8f2fc60dc95ae0e2421e386922bf232e\r\n Date: Mon Jul 8 21:21:01 2024 +0530\r\n\r\n Removed unused parameter instance_name (#41)\r\n\r\n, so drop them, along with the then also unused `pid_temp`.","shortMessageHtmlLink":"text-frontend: Drop unused local vars (#52)"}},{"before":"cc51ac3c48c9e5cede90aaedb13dc1333bde3b60","after":"fbc9164bf2544896ffecf6aa59bf66b12fc85f87","ref":"refs/heads/master","pushedAt":"2024-08-05T15:20:27.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"text-frontend: Get locale via GLib (#51)\n\nInstead of only supporting the LANGUAGE environment variable\r\nthat's not necessarily set, use GLib's `g_get_language_names` to\r\ndetect the locale to use in the text frontend which takes\r\nother environment variables into account as well [1]:\r\n\r\n> The returned list is sorted from most desirable to\r\n> least desirable and always contains the default locale “C”.\r\n\r\nAlso, make `locale` a local variable in the control thread\r\nthat's the only user instead of using a static variable.\r\n\r\nThis e.g. makes\r\n\r\n > get-all-translations PDF CUPS\r\n\r\nprint the translations for the current language in a fresh\r\nUbuntu 23.10 installation where the `LANGUAGE` environment\r\nvariable is not set, and the result without this commit\r\nin place was therefore just\r\n\r\n > get-all-translations PDF CUPS\r\n No translations found\r\n\r\n[1] https://docs.gtk.org/glib/func.get_language_names.html","shortMessageHtmlLink":"text-frontend: Get locale via GLib (#51)"}},{"before":"17bd66dc30cddb7b52e40518456d0ecf806188f2","after":"cc51ac3c48c9e5cede90aaedb13dc1333bde3b60","ref":"refs/heads/master","pushedAt":"2024-07-29T20:12:24.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"text-frontend: Add null check for get-default-printer (#50)\n\nAdd a null check in handling of the \"get-default-printer\"\r\ncommand.\r\n\r\nInstead of crashing, asking for the default printer for\r\na non-existing backend now prints a message:\r\n\r\n > get-default-printer-for-backend invalid\r\n [Error] [Frontend] Error getting default printer for backend : GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.openprinting.Backend.invalid was not provided by any .service files\r\n No default printer for backend found","shortMessageHtmlLink":"text-frontend: Add null check for get-default-printer (#50)"}},{"before":"92538e483789a9e2fccd142d00006bc42e6714af","after":"17bd66dc30cddb7b52e40518456d0ecf806188f2","ref":"refs/heads/master","pushedAt":"2024-07-26T22:28:59.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Add capability to check CPDB version at runtime (#49)\n\nThis allows third-party applications to easily manage different\r\nCPDB releases.\r\n\r\nThis is especially important when shipping pre-built binaries of such\r\napplications implementing CPDB, as the end users may be running outdated\r\nand potentially vulnerable versions of CPDB.","shortMessageHtmlLink":"Add capability to check CPDB version at runtime (#49)"}},{"before":"464208cd9aebcde819c165508d85430c5a433124","after":"92538e483789a9e2fccd142d00006bc42e6714af","ref":"refs/heads/master","pushedAt":"2024-07-21T06:55:51.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"cpdbConcatPath: Actually check XDG_CONFIG_DIRS (#48)\n\nInstead of using `CPDB_SYSCONFDIR` again as was\r\nalready done above, and doing so in a loop,\r\nuse the actual path extracted from the\r\n`XDG_CONFIG_DIRS` environment variable.\r\n\r\nThat had already been the case earlier, before\r\nit was changed to use `CPDB_SYSCONFDIR`\r\n\r\n commit 20d62e35a1028800fc3b9926e4ac10184815d270\r\n Date: Sun Dec 18 00:35:07 2022 +0530\r\n\r\n better debugging & code refactoring\r\n\r\n, which at first glance looks like a copy-paste\r\nmistake.","shortMessageHtmlLink":"cpdbConcatPath: Actually check XDG_CONFIG_DIRS (#48)"}},{"before":"4761e1decc8b63d8045b4c9f807044726afbed00","after":"464208cd9aebcde819c165508d85430c5a433124","ref":"refs/heads/master","pushedAt":"2024-07-21T06:54:37.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Fix a memory leak in cpdbGetSysConfDir (#47)\n\n`cpdbConcatPath` allocates a new string, so\r\nfree it if it's not returned.\r\n\r\nThe value is not used in other code paths,\r\nas `config_dir` is assigned something else.","shortMessageHtmlLink":"Fix a memory leak in cpdbGetSysConfDir (#47)"}},{"before":"24fe4803023e34a843072677c96924811625f393","after":"4761e1decc8b63d8045b4c9f807044726afbed00","ref":"refs/heads/master","pushedAt":"2024-07-21T06:53:27.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"frontend: Drop unused 'own_id' member (#46)\n\nDrop `cpdb_frontend_obj_s::own_id`,\r\nsince it's effectively unused since\r\n\r\n commit 8f9e0544aa6bd244b79b310f76b2478d407006cc\r\n Date: Fri May 31 00:04:43 2024 +0530\r\n\r\n Add new backends while the dialog is open, let frontend not be D-Bus service (#32)","shortMessageHtmlLink":"frontend: Drop unused 'own_id' member (#46)"}},{"before":"81b6ab025442cc1ebd8859642c4635b4d73ef015","after":"24fe4803023e34a843072677c96924811625f393","ref":"refs/heads/master","pushedAt":"2024-07-21T06:52:01.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Fix bad free (#45)","shortMessageHtmlLink":"Fix bad free (#45)"}},{"before":"11bb89ac7ee32d8d900bb84c5a0932366cde34cc","after":"81b6ab025442cc1ebd8859642c4635b4d73ef015","ref":"refs/heads/master","pushedAt":"2024-07-18T23:14:05.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Documentation for newly added API functions (#43)\n\nAdded header comments for auto-generating developer documentation.","shortMessageHtmlLink":"Documentation for newly added API functions (#43)"}},{"before":"512bb4b3978a2c425ce6eac6a67694dfbc1b15b8","after":"11bb89ac7ee32d8d900bb84c5a0932366cde34cc","ref":"refs/heads/master","pushedAt":"2024-07-18T23:11:53.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Correct DBus calls to add, delete and state change of printers (#44)","shortMessageHtmlLink":"Correct DBus calls to add, delete and state change of printers (#44)"}},{"before":"20a9050579437abd6335519f3f3e7caf45bbe481","after":"512bb4b3978a2c425ce6eac6a67694dfbc1b15b8","ref":"refs/heads/master","pushedAt":"2024-07-18T13:00:15.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Replace cpdbGetStringCopy with g_strdup (#42)\n\nGLib's `g_strdup` already provides the same functionality\r\nas `cpdbGetStringCopy`, so there's no need to have a\r\ncustom implementation and even make that part of the\r\npublic API.\r\n\r\nTherefore, replace all uses of `cpdbGetStringCopy` with\r\n`g_strdup` and drop `cpdbGetStringCopy`.\r\n\r\n[1] https://docs.gtk.org/glib/func.strdup.html","shortMessageHtmlLink":"Replace cpdbGetStringCopy with g_strdup (#42)"}},{"before":"fb2686ba8f2fc60dc95ae0e2421e386922bf232e","after":"20a9050579437abd6335519f3f3e7caf45bbe481","ref":"refs/heads/master","pushedAt":"2024-07-08T15:58:00.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Pass backend name to cpdbRefreshPrinterList() as const char* (#40)\n\nUse `const char*` instead of `char*` for the `backend`\r\nparam of `cpdbRefreshPrinterList`. The function was\r\nrecently added in\r\n\r\n commit 17a1d82d7526c33591879bd97d961405212b408f\r\n Author: Biswadeep Purkayastha <98874428+metabiswadeep@users.noreply.github.com>\r\n Date: Thu Jun 27 19:27:08 2024 +0530\r\n\r\n API functions to refresh printer list and to get D-Bus connection (#35)\r\n\r\n - Added API function cpdbRefreshPrinterList() to refresh the printer list\r\n - Turned static function get_dbus_connection() into API function cpdbGetDbusConnection()\r\n\r\n`const char*` is the usual way to pass C strings.\r\nThat also simplifies using the function, see\r\ne.g. comment [1] in one of the changes of a pending\r\nchange series implementing/updating CPDB support\r\nfor the LibreOffice print dialog.\r\n\r\n[1] https://gerrit.libreoffice.org/c/core/+/169617/comment/ef77074d_16034f9f/","shortMessageHtmlLink":"Pass backend name to cpdbRefreshPrinterList() as const char* (#40)"}},{"before":"06d56c6c158798b18c3fed715bc8d47d04e9b7c9","after":"fb2686ba8f2fc60dc95ae0e2421e386922bf232e","ref":"refs/heads/master","pushedAt":"2024-07-08T15:51:01.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Removed unused parameter instance_name (#41)\n\nFrom API functions cpdbGetNewFrontendObj() and cpdbStartListingPrinters().\r\n\r\nParameter got unused since commit 8f9e054.","shortMessageHtmlLink":"Removed unused parameter instance_name (#41)"}},{"before":"1aaed39dc8198d8847a61938d42be71b612d85a7","after":"06d56c6c158798b18c3fed715bc8d47d04e9b7c9","ref":"refs/heads/master","pushedAt":"2024-07-05T12:19:22.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"text-frontend: Don't crash when printer doesn't exist (#39)\n\nInstead of crashing due to a NULL dereference,\r\nprint a message and skip further processing of\r\nthe current command when `cpdbFindPrinterObj`\r\nreturns NULL, e.g. because the user has entered\r\nthe name of a nonexisting printer or backend.\r\n\r\nFor some commands, null checks were in place\r\nwithout printing a message. Unify that.","shortMessageHtmlLink":"text-frontend: Don't crash when printer doesn't exist (#39)"}},{"before":"2a9c312ec9b4ec9f97914f9a20733293641c61e7","after":"1aaed39dc8198d8847a61938d42be71b612d85a7","ref":"refs/heads/master","pushedAt":"2024-07-04T13:13:31.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Turn cpdbFillBasicOptions() into a frontend API function (#37)","shortMessageHtmlLink":"Turn cpdbFillBasicOptions() into a frontend API function (#37)"}},{"before":"8f855a0a560248dff0ed3bdd7bc5c2c91a26da31","after":"2a9c312ec9b4ec9f97914f9a20733293641c61e7","ref":"refs/heads/master","pushedAt":"2024-07-04T13:05:25.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"text-frontend: Quit on EOF (Ctrl + D) (#38)\n\nQuit the text frontend when scanf returns EOF,\r\nwhich e.g. happens when the user presses Ctrl + D.\r\n\r\nPreviously, pressing Ctrl + D would result in the loop running\r\nindefinitely, printing \">\" without end.","shortMessageHtmlLink":"text-frontend: Quit on EOF (Ctrl + D) (#38)"}},{"before":"17a1d82d7526c33591879bd97d961405212b408f","after":"8f855a0a560248dff0ed3bdd7bc5c2c91a26da31","ref":"refs/heads/master","pushedAt":"2024-07-03T20:29:19.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Turn some static functions into frontend API functions (#36)\n\n- Promoted static functions into frontend API\r\n - on_printer_added() -> cpdbOnPrinterAdded()\r\n - on_printer_removed() -> cpdbOnPrinterRemoved()\r\n - on_printer_state_changed -> cpdbOnPrinterStateChanged()\r\n- New API function cpdbPrinterCallback()\r\n - Was printer_callback() in tools/cpdb-text-frontend.c","shortMessageHtmlLink":"Turn some static functions into frontend API functions (#36)"}},{"before":"eb759dcbc2eecc1867277cc2997a78221626e38d","after":"17a1d82d7526c33591879bd97d961405212b408f","ref":"refs/heads/master","pushedAt":"2024-06-27T13:57:08.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"API functions to refresh printer list and to get D-Bus connection (#35)\n\n- Added API function cpdbRefreshPrinterList() to refresh the printer list\r\n- Turned static function get_dbus_connection() into API function cpdbGetDbusConnection()","shortMessageHtmlLink":"API functions to refresh printer list and to get D-Bus connection (#35)"}},{"before":"9c41cd88269a512e12ab40aec084bcc33c4d8236","after":"eb759dcbc2eecc1867277cc2997a78221626e38d","ref":"refs/heads/master","pushedAt":"2024-06-18T21:57:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"cpdb-libs 2.0b6 Release","shortMessageHtmlLink":"cpdb-libs 2.0b6 Release"}},{"before":"8f9e0544aa6bd244b79b310f76b2478d407006cc","after":"9c41cd88269a512e12ab40aec084bcc33c4d8236","ref":"refs/heads/master","pushedAt":"2024-06-12T23:25:47.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Fix job ID not being returned when print job is started (#33)","shortMessageHtmlLink":"Fix job ID not being returned when print job is started (#33)"}},{"before":"85447e866863ebc7327a32f16e86cba6f487bed3","after":"8f9e0544aa6bd244b79b310f76b2478d407006cc","ref":"refs/heads/master","pushedAt":"2024-05-30T18:34:43.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Add new backends while the dialog is open, let frontend not be D-Bus service (#32)\n\n- Let the frontend not be a D-Bus service, only the backends\r\n Controlling of filtering the backend's list of printers to hide remote\r\n printers and/or temporary queues was done by the frontend being\r\n a D-Bus service sending signals and not the backends which are\r\n D-Bus services by themselves just having methods for that. Having\r\n both frontends and backends being D-Bus services makes the\r\n interface unnecessarily complicated, especially for distro-independent/\r\n sandboxed packaging, like snapping. No we use backend methods\r\n for that and have done away with the frontends being a D-Bus service.\r\n\r\n- Add newly appearing backends while the dialog is open\r\n CPDB Backends can get installed or removed at any time, also while a\r\n print dialog is open. Now a background thread is added to observe\r\n the come and go of backends and to update the printer list\r\n appropriately. New API functions are cpdbStartBackendListRefreshing()\r\n and cpdbStopBackendListRefreshing, to start and stop this thread.\r\n\r\n- Convenience API functions to start/stop listing printers\r\n When a print dialog is opened, available printers are listed and the list\r\n is continuously updated, until the dialog is closed. To simplify this,\r\n there are now two convenience API functions cpdbStartListingPrinters()\r\n and cpdbStopListingPrinters() to be called when opening and closing\r\n the dialog, resp. The former creates the data structures, gets an initial\r\n printer list, sets up the auto-updating by the backends, and starts the\r\n background process to look for backends appearing/disappearig. The\r\n latter stops updateing and also the background process and frees the\r\n memory allocated for the data structures.","shortMessageHtmlLink":"Add new backends while the dialog is open, let frontend not be D-Bus …"}},{"before":"ebdf368f77cbec274e35b434dedad33fa009ec7a","after":"85447e866863ebc7327a32f16e86cba6f487bed3","ref":"refs/heads/master","pushedAt":"2024-03-16T15:19:05.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Stream print data through a Unix domain socket (#30)\n\nTo ease making a Snap from the CPDB backend for CUPS (and\r\nother CPDB backends in the future) we now transfer the print\r\njob data from the dialog to the backend via a Unix domain socket\r\nand not by dropping the data into a file.\r\n\r\nIn addition, we have done also the following changes:\r\n- Removed support for the \"FILE\" CPDB backend.\r\n- Removed API functions cpdbGetAllJobs(),\r\n cpdbGetActiveJobsCount(), cpdbCancelJob(), and\r\n cpdbPrintFilePath() and the corresponding D-Bus\r\n methods.\r\n- Removed the appropriate commands, \"get-all-jobs\",\r\n \"get-active-jobs-count\", and \"cancel-job\" from the\r\n \"cpdb-text-frontend\" utility.","shortMessageHtmlLink":"Stream print data through a Unix domain socket (#30)"}},{"before":"e95b263878a3850af733d1fbf6001abc98cf7b23","after":"ebdf368f77cbec274e35b434dedad33fa009ec7a","ref":"refs/heads/master","pushedAt":"2023-08-20T13:04:32.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"Added support for CPDB backends running as permanent system daemon\n\nThe function cpdbActivateBackends() finds all available backends and\nregisters them with the frontend. For this it uses the\n\"ListActivatableNames\" method which finds the backends by the\n*.service files which are used to automatically start the program\nwhich provides a given D-Bus services.\n\nNow we want to package CPDB backends as Snap. When installing a Snap\nwe cannot install a *.service file, so we cannot make our backend\nautomatically started. Therefore the snapped backend we want to run as\na permanently running system daemon. The it registers itself on the\nD-Bus and is available.\n\nProblem is that the frontend does not search for already registered\nservices and so does not find this backend despite being readily\navailable, as there is no *.service file for it.\n\nNow we use both the \"ListActivatableNames\" and the \"ListNames\"\nmethods, where the latter searches for already running services\nregardless of *.service files. With both we always get a complete\nlist. We also check for duplicates, reported by both methods, now.","shortMessageHtmlLink":"Added support for CPDB backends running as permanent system daemon"}},{"before":"4194795742a0655481554d27703c57d62d522604","after":"e95b263878a3850af733d1fbf6001abc98cf7b23","ref":"refs/heads/master","pushedAt":"2023-08-20T00:20:57.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"tillkamppeter","name":"Till Kamppeter","path":"/tillkamppeter","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/1244825?s=80&v=4"},"commit":{"message":"cpdbActivateBackends(): Fixed crash caused by wrong unreferencing","shortMessageHtmlLink":"cpdbActivateBackends(): Fixed crash caused by wrong unreferencing"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEtNM-CAA","startCursor":null,"endCursor":null}},"title":"Activity · OpenPrinting/cpdb-libs"}