problem running make test with cups 1.2.10

Thomas Lohman thomasl at mtl.mit.edu
Tue Apr 3 07:54:43 PDT 2007


> This is a known bug (STR #2307) which is fixed in the current SVN
> repo and will be fixed in 1.2.11.


Thanks Michael.  Sorry that I missed that in my search through the previous postings.  I've downloaded and compiled 1.2.11 and all tests are successful.

I do get 3 compile warnings in subscriptions.c regarding dbus and mismatches on parameter types expected:

subscriptions.c: In function `cupsd_send_dbus':
subscriptions.c:1365: warning: passing arg 2 of `dbus_message_iter_append_string' from incompatible pointer type
subscriptions.c:1369: warning: passing arg 2 of `dbus_message_iter_append_uint32' makes integer from pointer without a cast
subscriptions.c:1370: warning: passing arg 2 of `dbus_message_iter_append_string' from incompatible pointer type

My system has the following dbus packages from Redhat installed:

dbus-devel-0.22-12.EL.8
dbus-0.22-12.EL.8

In looking at the dbus include files, it appears that a const char * is expected for dbus_message_iter_append_string and an unsigned int for dbus_message_iter_append_uint32.  In subscriptions.c, it appears that an address pointing to the value is being passed as opposed to the value itself.

It looks like in newer versions of dbus, these functions have been replaced by a "wrapper" function that takes a value type and then a pointer to the value.  So, I'm guessing the dbus on RH AS 4 is old.

Based on all of this, I got the errors to go away by making the following changes to subscriptions.c:

1365,1370c1365
< #ifdef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
<      dbus_message_iter_append_string(&iter, &(dest->name));
< #else
<      dbus_message_iter_append_string(&iter, dest->name);
< #endif
<
---
>     dbus_message_iter_append_string(&iter, &(dest->name));
1373,1379c1368,1369
< #ifdef HAVE_DBUS_MESSAGE_ITER_INIT_APPEND
<      dbus_message_iter_append_uint32(&iter, &(job->id));
<      dbus_message_iter_append_string(&iter, &(job->username));
< #else
<      dbus_message_iter_append_uint32(&iter, job->id);
<      dbus_message_iter_append_string(&iter, job->username);
< #endif
---
>     dbus_message_iter_append_uint32(&iter, &(job->id));
>     dbus_message_iter_append_string(&iter, &(job->username));

Let me know if that is incorrect or if there is a more proper way to make this patch.

thanks much,


--tom





More information about the cups-devel mailing list