summaryrefslogtreecommitdiffstats
path: root/serial/manager.c
diff options
context:
space:
mode:
authorClaudio Takahasi <claudio.takahasi@openbossa.org>2007-05-17 19:08:16 +0000
committerClaudio Takahasi <claudio.takahasi@openbossa.org>2007-05-17 19:08:16 +0000
commit01cb453b85b7cf26ee9e5f848717d82ce455070a (patch)
treedcc20ecb0b5cb6ec498f667bdfd9932e583f77e7 /serial/manager.c
parent23a6e61e8ceeb719a88788292390ad062712034d (diff)
serial: added RemovePort and bonded node list
Diffstat (limited to 'serial/manager.c')
-rw-r--r--serial/manager.c18
1 files changed, 17 insertions, 1 deletions
diff --git a/serial/manager.c b/serial/manager.c
index 6bce2d69..9a6972da 100644
--- a/serial/manager.c
+++ b/serial/manager.c
@@ -777,7 +777,23 @@ done:
static DBusHandlerResult remove_port(DBusConnection *conn,
DBusMessage *msg, void *data)
{
- return DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
+ DBusError derr;
+ const char *path;
+
+ dbus_error_init(&derr);
+ if (!dbus_message_get_args(msg, &derr,
+ DBUS_TYPE_STRING, &path,
+ DBUS_TYPE_INVALID)) {
+ err_invalid_args(conn, msg, derr.message);
+ dbus_error_free(&derr);
+ return DBUS_HANDLER_RESULT_HANDLED;
+ }
+
+ if (port_unregister(path) < 0)
+ return err_does_not_exist(conn, msg, "path doesn't exist");
+
+ return send_message_and_unref(conn,
+ dbus_message_new_method_return(msg));
}
static DBusHandlerResult connect_service(DBusConnection *conn,