diff options
| author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-18 20:39:10 +0000 | 
|---|---|---|
| committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-05-18 20:39:10 +0000 | 
| commit | 68f208cc3b17f8e26318ba411a0974d9489249c9 (patch) | |
| tree | 2d9e022290ac76b1b315bb4da957a0cc96fcd303 /serial/port.c | |
| parent | aab0210d3c33296381cff7f988a30f75f058ae8c (diff) | |
serial: code standard - use int16_t for dev_id
Diffstat (limited to 'serial/port.c')
| -rw-r--r-- | serial/port.c | 9 | 
1 files changed, 5 insertions, 4 deletions
| diff --git a/serial/port.c b/serial/port.c index fac0d5f7..49042785 100644 --- a/serial/port.c +++ b/serial/port.c @@ -201,7 +201,8 @@ static void port_handler_unregister(DBusConnection *conn, void *data)  	debug("Unregistered serial port: %s", node->name); -	snprintf(path, MAX_PATH_LENGTH, "%s/rfcomm%d", SERIAL_MANAGER_PATH, node->id); +	snprintf(path, MAX_PATH_LENGTH, "%s/rfcomm%hd", SERIAL_MANAGER_PATH, node->id); +  	dbus_connection_emit_signal(conn, SERIAL_MANAGER_PATH,  			SERIAL_MANAGER_INTERFACE, "PortRemoved" ,  			DBUS_TYPE_STRING, &ppath, @@ -211,7 +212,7 @@ static void port_handler_unregister(DBusConnection *conn, void *data)  	rfcomm_node_free(node);  } -int port_add_listener(DBusConnection *conn, int id, bdaddr_t *dst, +int port_add_listener(DBusConnection *conn, int16_t id, bdaddr_t *dst,  			int fd, const char *name, const char *owner)  {  	struct rfcomm_node *node; @@ -252,7 +253,7 @@ int port_remove_listener(const char *owner, const char *name)  	return 0;  } -int port_register(DBusConnection *conn, int id, bdaddr_t *dst, +int port_register(DBusConnection *conn, int16_t id, bdaddr_t *dst,  					const char *name, char *ppath)  {  	char path[MAX_PATH_LENGTH]; @@ -264,7 +265,7 @@ int port_register(DBusConnection *conn, int id, bdaddr_t *dst,  	node->name	= g_strdup(name);  	node->conn	= dbus_connection_ref(conn); -	snprintf(path, MAX_PATH_LENGTH, "%s/rfcomm%d", SERIAL_MANAGER_PATH, id); +	snprintf(path, MAX_PATH_LENGTH, "%s/rfcomm%hd", SERIAL_MANAGER_PATH, id);  	if (!dbus_connection_create_object_path(conn, path, node,  						port_handler_unregister)) { | 
