MethodCall call = ((MethodReply) m).getCall();
   private void sendMessage(DBusMessage m)   {      if (m instanceof DBusSignal)          try {            m.setSerial(dbus_send_signal(connid, ((DBusSignal) m).getObjectPath(), m.getType(), m.getName(), m.getParameters()));         } catch (Exception e) {}      else if (m instanceof DBusErrorMessage)          try {            m.setSerial(dbus_send_error_message(connid, ((DBusErrorMessage) m).getDestination(), m.getType(), m.getReplySerial(), m.getParameters()));         } catch (Exception e) {}      else if (m instanceof MethodCall) {         try {            synchronized (pendingCalls) {               int flags = ((MethodCall) m).getFlags();               m.setSerial(dbus_call_method(connid, ((MethodCall) m).getService(), ((MethodCall) m).getObjectPath(), m.getType(), m.getName(), 1 == (flags & MethodCall.NO_REPLY), m.getParameters()));               if (0 < m.getSerial()) {                  if (0 == (flags & MethodCall.NO_REPLY))                     pendingCalls.put(m.getSerial(),(MethodCall) m);               }               else                  ((MethodCall) m).setReply(new DBusErrorMessage(m, new InternalMessageException("Message Failed to Send")));            }         } catch (DBusExecutionException DBEe) {               ((MethodCall) m).setReply(new DBusErrorMessage(m, DBEe));         } catch (Exception e) {               ((MethodCall) m).setReply(new DBusErrorMessage(m, new DBusExecutionException("Message Failed to Send: "+e.getMessage())));               e.printStackTrace();         }      }      else if (m instanceof MethodReply) {         MethodCall call = ((MethodReply) m).getCall();         try {            m.setSerial(dbus_reply_to_call(connid, call.getSource(), call.getType(), call.getObjectPath(), call.getName(), call.getSerial(), m.getParameters()));         } catch (Exception e) {            dbus_send_error_message(connid, call.getSource(), DBusExecutionException.class.getName(), call.getSerial(), new Object[] { "Error sending reply: "+e.getMessage() });         }      }   }