diff options
| author | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-03-28 20:59:36 +0000 | 
|---|---|---|
| committer | Claudio Takahasi <claudio.takahasi@openbossa.org> | 2007-03-28 20:59:36 +0000 | 
| commit | a26656784f5bdd8b5010637b78d3604343d694d0 (patch) | |
| tree | ba0267996a554fe196c3cf39e90043d37e153cf3 | |
| parent | 12575376b7b94dd7b4a145ab166f0805755c13a1 (diff) | |
network: update the service record when the attributes changed(name, security)
| -rw-r--r-- | network/server.c | 19 | 
1 files changed, 17 insertions, 2 deletions
| diff --git a/network/server.c b/network/server.c index 72f8dc4a..82927162 100644 --- a/network/server.c +++ b/network/server.c @@ -159,7 +159,6 @@ static int create_server_record(sdp_buf_t *buf, const char *name,  	add_lang_attr(&record); -	/* FIXME: Missing check the security attribute */  	sdp_attr_add_new(&record, SDP_ATTR_SECURITY_DESC,  				SDP_UINT16, &security_desc); @@ -707,7 +706,14 @@ static DBusHandlerResult set_name(DBusConnection *conn,  		g_free(ns->name);  	ns->name = g_strdup(name); -	/* FIXME: Update the service record attribute */ +	if (ns->io) { +		/* Server enabled - service record already registred +		 * Workaround: Currently it is not possible update +		 * one service record attribute using D-Bus methods +		 */ +		remove_server_record(ns->conn, ns->record_id); +		ns->record_id = add_server_record(ns); +	}  	return send_message_and_unref(conn, reply);  } @@ -792,6 +798,15 @@ static DBusHandlerResult set_security(DBusConnection *conn,  	ns->secure = secure; +	if (ns->io) { +		/* Server enabled - service record already registred +		 * Workaround: Currently it is not possible update +		 * one service record attribute using D-Bus methods +		 */ +		remove_server_record(ns->conn, ns->record_id); +		ns->record_id = add_server_record(ns); +	} +  	return send_message_and_unref(conn, reply);  } | 
