Skip to content

Commit

Permalink
Added "ippPort()" call to the beginning of the program, to initialize…
Browse files Browse the repository at this point in the history
… libcups

The CUPS backend runs into a bug of libcups, of the default server
name, port, domain socket file name not being initialized depending on
which functions of the library are used. See this upstream bug report
on CUPS:

apple/cups#5642

A simple call of "ippPort()" in the very beginning of the backend executable
solves the problem.

This also caused the issue

#2

which is solved now, too.
  • Loading branch information
tillkamppeter committed Aug 29, 2019
1 parent 6ea958e commit d8d7aa1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/print_backend_cups.c
Expand Up @@ -23,6 +23,9 @@ BackendObj *b;


int main() int main()
{ {
/* Initialize internal default settings of the CUPS library */
int p = ippPort();

b = get_new_BackendObj(); b = get_new_BackendObj();
acquire_session_bus_name(BUS_NAME); acquire_session_bus_name(BUS_NAME);
GMainLoop *loop = g_main_loop_new(NULL, FALSE); GMainLoop *loop = g_main_loop_new(NULL, FALSE);
Expand Down

0 comments on commit d8d7aa1

Please sign in to comment.