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