This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.

commit d1c587d0dda243739c8f0a027973e66aafd9705e
Author: Daniel P. Berrange <d...@berrange.com>
Date:   Sat Oct 15 13:21:47 2005 +0000

    Use correct printf format string for pointers. Remove unused variables. Add 
missing return values
---
 DBus.xs | 79 +++++++++++++++++++++++++++++------------------------------------
 1 file changed, 35 insertions(+), 44 deletions(-)

diff --git a/DBus.xs b/DBus.xs
index fd31fed..17fd9b9 100644
--- a/DBus.xs
+++ b/DBus.xs
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  *
- * $Id: DBus.xs,v 1.15 2005/10/15 13:31:42 dan Exp $
+ * $Id: DBus.xs,v 1.16 2005/10/15 14:21:47 dan Exp $
  */
 
 #include "EXTERN.h"
@@ -40,7 +40,7 @@ dbus_int32_t server_data_slot = -1;
 
 void
 _object_release(void *obj) {
-    PD_DEBUG("Releasing object count on %x\n", obj);
+    PD_DEBUG("Releasing object count on %p\n", obj);
     SvREFCNT_dec((SV*)obj);
 }
 
@@ -49,11 +49,10 @@ _watch_generic(DBusWatch *watch, void *data, char *key, 
dbus_bool_t server) {
     SV *selfref;
     HV *self;
     SV **call;
-    SV *h_sv1;
-    SV *h_sv2;
+    SV *h_sv;
     dSP;
 
-    PD_DEBUG("Watch generic callback %x %x %s %d\n", watch, data, key, server);
+    PD_DEBUG("Watch generic callback %p %p %s %d\n", watch, data, key, server);
 
     if (server) {
       selfref = (SV*)dbus_server_get_data((DBusServer*)data, server_data_slot);
@@ -62,7 +61,7 @@ _watch_generic(DBusWatch *watch, void *data, char *key, 
dbus_bool_t server) {
     }
     self = (HV*)SvRV(selfref);
 
-    PD_DEBUG("Got owner %x\n", self);
+    PD_DEBUG("Got owner %p\n", self);
 
     call = hv_fetch(self, key, strlen(key), 0);
 
@@ -77,15 +76,17 @@ _watch_generic(DBusWatch *watch, void *data, char *key, 
dbus_bool_t server) {
 
     PUSHMARK(SP);
     XPUSHs(selfref);
-    h_sv2 = sv_newmortal();
-    sv_setref_pv(h_sv2, "Net::DBus::Binding::C::Watch", (void*)watch);
-    XPUSHs(h_sv2);
+    h_sv = sv_newmortal();
+    sv_setref_pv(h_sv, "Net::DBus::Binding::C::Watch", (void*)watch);
+    XPUSHs(h_sv);
     PUTBACK;
 
     call_sv(*call, G_DISCARD);
 
     FREETMPS;
     LEAVE;
+
+    return 1;
 }
 
 dbus_bool_t
@@ -120,8 +121,7 @@ _timeout_generic(DBusTimeout *timeout, void *data, char 
*key, dbus_bool_t server
     SV *selfref;
     HV *self;
     SV **call;
-    SV *h_sv1;
-    SV *h_sv2;
+    SV *h_sv;
     dSP;
 
     if (server) {
@@ -143,15 +143,17 @@ _timeout_generic(DBusTimeout *timeout, void *data, char 
*key, dbus_bool_t server
 
     PUSHMARK(SP);
     XPUSHs((SV*)selfref);
-    h_sv2 = sv_newmortal();
-    sv_setref_pv(h_sv2, "Net::DBus::Binding::C::Timeout", (void*)timeout);
-    XPUSHs(h_sv2);
+    h_sv = sv_newmortal();
+    sv_setref_pv(h_sv, "Net::DBus::Binding::C::Timeout", (void*)timeout);
+    XPUSHs(h_sv);
     PUTBACK;
 
     call_sv(*call, G_DISCARD);
 
     FREETMPS;
     LEAVE;
+
+    return 1;
 }
 
 dbus_bool_t
@@ -187,10 +189,7 @@ _connection_callback (DBusServer *server,
     SV *selfref = (SV*)dbus_server_get_data((DBusServer*)data, 
server_data_slot);
     HV *self = (HV*)SvRV(selfref);
     SV **call;
-    SV *proto;
-    SV *name;
     SV *value;
-    SV *h_sv;
     dSP;
 
     call = hv_fetch(self, "_callback", strlen("_callback"), 0);
@@ -200,7 +199,7 @@ _connection_callback (DBusServer *server,
       return;
     }
 
-    PD_DEBUG("Created connection in callback %x\n", new_connection);
+    PD_DEBUG("Created connection in callback %p\n", new_connection);
     /* The DESTROY method will de-ref it later */
     dbus_connection_ref(new_connection);
 
@@ -236,7 +235,7 @@ _message_filter(DBusConnection *con,
     selfref = (SV*)dbus_connection_get_data(con, connection_data_slot);
     self = (HV*)SvRV(selfref);
 
-    PD_DEBUG("Create message in filter %x\n", msg);
+    PD_DEBUG("Create message in filter %p\n", msg);
     PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
     PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
     PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -289,7 +288,7 @@ _path_message_callback(DBusConnection *con,
     SV *value;
     dSP;
 
-    PD_DEBUG("Got message in callback %x\n", msg);
+    PD_DEBUG("Got message in callback %p\n", msg);
     PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
     PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
     PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -311,6 +310,8 @@ _path_message_callback(DBusConnection *con,
 
     FREETMPS;
     LEAVE;
+
+    return DBUS_HANDLER_RESULT_HANDLED;
 }
 
 DBusObjectPathVTable _path_callback_vtable = {
@@ -423,7 +424,6 @@ _open(address)
     PREINIT:
         DBusError error;
         DBusConnection *con;
-        SV *h_sv;
     CODE:
         dbus_error_init(&error);
         con = dbus_connection_open(address, &error);
@@ -481,15 +481,13 @@ _send_with_reply_and_block(con, msg, timeout)
         int timeout;
     PREINIT:
         DBusMessage *reply;
-        DBusMessageIter *iter;
         DBusError error;
-        SV *h_sv;
     CODE:
         dbus_error_init(&error);
         if (!(reply = dbus_connection_send_with_reply_and_block(con, msg, 
timeout, &error))) {
           _croak_error(&error);
         }
-        PD_DEBUG("Create msg reply %x\n", reply);
+        PD_DEBUG("Create msg reply %p\n", reply);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(reply));
         PD_DEBUG("  Interface %s\n", dbus_message_get_interface(reply) ? 
dbus_message_get_interface(reply) : "");
         PD_DEBUG("  Path %s\n", dbus_message_get_path(reply) ? 
dbus_message_get_path(reply) : "");
@@ -631,8 +629,8 @@ void
 DESTROY(con)
         DBusConnection *con;
    CODE:
-        PD_DEBUG("Destroying connection %x\n", con);
-        dbus_connection_close(con);
+        PD_DEBUG("Destroying connection %p\n", con);
+        dbus_connection_disconnect(con);
         // XXX do we need this or not ?
         //dbus_connection_unref(con);
 
@@ -647,11 +645,10 @@ _open(address)
     PREINIT:
         DBusError error;
         DBusServer *server;
-        SV *h_sv;
     CODE:
         dbus_error_init(&error);
         server = dbus_server_listen(address, &error);
-        PD_DEBUG("Created server %x on address %s", server, address);
+        PD_DEBUG("Created server %p on address %s", server, address);
         if (!server) {
           _croak_error(&error);
         }
@@ -719,7 +716,7 @@ void
 DESTROY(server)
         DBusServer *server;
    CODE:
-        PD_DEBUG("Destroying server %x\n", server);
+        PD_DEBUG("Destroying server %p\n", server);
         dbus_server_unref(server);
 
 
@@ -733,7 +730,6 @@ _open(type)
     PREINIT:
         DBusError error;
         DBusConnection *con;
-        SV *h_sv;
     CODE:
         dbus_error_init(&error);
         con = dbus_bus_get(type, &error);
@@ -753,13 +749,12 @@ _create(type)
         IV type;
     PREINIT:
         DBusMessage *msg;
-        SV *h_sv;
     CODE:
         msg = dbus_message_new(type);
         if (!msg) {
           croak("No memory to allocate message");
         }
-        PD_DEBUG("Create msg new %x\n", msg);
+        PD_DEBUG("Create msg new %p\n", msg);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
         RETVAL = msg;
     OUTPUT:
@@ -800,7 +795,7 @@ void
 DESTROY(msg)
         DBusMessage *msg;
     CODE:
-        PD_DEBUG("De-referencing message %x\n", msg);
+        PD_DEBUG("De-referencing message %p\n", msg);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
         PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
         PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -856,13 +851,12 @@ _create(path, interface, name)
         char *name;
     PREINIT:
         DBusMessage *msg;
-        SV *h_sv;
     CODE:
         msg = dbus_message_new_signal(path, interface, name);
         if (!msg) {
           croak("No memory to allocate message");
         }
-        PD_DEBUG("Create msg new signal %x\n", msg);
+        PD_DEBUG("Create msg new signal %p\n", msg);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
         PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
         PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -883,13 +877,12 @@ _create(service, path, interface, method)
         char *method;
     PREINIT:
         DBusMessage *msg;
-        SV *h_sv;
     CODE:
         msg = dbus_message_new_method_call(service, path, interface, method);
         if (!msg) {
           croak("No memory to allocate message");
         }
-        PD_DEBUG("Create msg new method call %x\n", msg);
+        PD_DEBUG("Create msg new method call %p\n", msg);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
         PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
         PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -907,7 +900,6 @@ _create(call)
         DBusMessage *call;
     PREINIT:
         DBusMessage *msg;
-        SV *h_sv;
     CODE:
         msg = dbus_message_new_method_return(call);
         if (!msg) {
@@ -916,7 +908,7 @@ _create(call)
         dbus_message_set_interface(msg, dbus_message_get_interface(call));
         dbus_message_set_path(msg, dbus_message_get_path(call));
         dbus_message_set_member(msg, dbus_message_get_member(call));
-        PD_DEBUG("Create msg new method return %x\n", msg);
+        PD_DEBUG("Create msg new method return %p\n", msg);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
         PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
         PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -936,13 +928,12 @@ _create(replyto, name, message)
         char *message;
     PREINIT:
         DBusMessage *msg;
-        SV *h_sv;
     CODE:
         msg = dbus_message_new_error(replyto, name, message);
         if (!msg) {
           croak("No memory to allocate message");
         }
-        PD_DEBUG("Create msg new error %x\n", msg);
+        PD_DEBUG("Create msg new error %p\n", msg);
         PD_DEBUG("  Type %d\n", dbus_message_get_type(msg));
         PD_DEBUG("  Interface %s\n", dbus_message_get_interface(msg) ? 
dbus_message_get_interface(msg) : "");
         PD_DEBUG("  Path %s\n", dbus_message_get_path(msg) ? 
dbus_message_get_path(msg) : "");
@@ -983,7 +974,7 @@ handle(watch, flags)
         DBusWatch *watch;
         unsigned int flags;
     CODE:
-        PD_DEBUG("Handling event %d on fd %d (%x)\n", flags, 
dbus_watch_get_fd(watch), watch);
+        PD_DEBUG("Handling event %d on fd %d (%p)\n", flags, 
dbus_watch_get_fd(watch), watch);
         dbus_watch_handle(watch, flags);
 
 
@@ -1025,7 +1016,7 @@ void
 handle(timeout)
         DBusTimeout *timeout;
     CODE:
-        PD_DEBUG("Handling timeout event %x\n", timeout);
+        PD_DEBUG("Handling timeout event %p\n", timeout);
         dbus_timeout_handle(timeout);
 
 void *
@@ -1247,7 +1238,7 @@ void
 DESTROY(iter)
         DBusMessageIter *iter;
     CODE:
-        PD_DEBUG("Destroying iterator %x\n", iter);
+        PD_DEBUG("Destroying iterator %p\n", iter);
         dbus_free(iter);
 
 MODULE = Net::DBus             PACKAGE = Net::DBus

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git

_______________________________________________
Pkg-perl-cvs-commits mailing list
Pkg-perl-cvs-commits@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits

Reply via email to