Re: [PATCH 1/2] Clean nad simplify SAP server error printouts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Waldek,

On Thu, May 26, 2011, Waldemar Rymarkiewicz wrote:
> -	DBG("Client has been authorized.");
> +	info("Access has been granted.");

You should be very conservative with the use of info() instead of DBG().
Essentially it should be reserved for some very fundamental core daemon
events only, such as init and exit of bluetoothd. Plugins shouldn't
really need to use it ever.

>  	if (conn) {
> +		info("Another SAP connection already exists.");

Same here (change to DBG)

> -	DBG("SAP incoming connection (sock %d) authorization.",
> -				g_io_channel_unix_get_fd(io));
> +	info("Authorizing incomming SAP connection from %s", dstaddr);

And here.

> @@ -1298,7 +1282,7 @@ static DBusMessage *get_properties(DBusConnection *c,
>  			DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);
>  
>  	connected = (conn->state == SAP_STATE_CONNECTED ||
> -			conn->state == SAP_STATE_GRACEFUL_DISCONNECT);
> +				conn->state == SAP_STATE_GRACEFUL_DISCONNECT);
>  	dict_append_entry(&dict, "Connected", DBUS_TYPE_BOOLEAN, &connected);

This looks like a coding style cleanup. Don't mix that with the logging
changes (i.e. separate patch please). Usually having the word "and" in
your commit message summary (or "nad" in this case ;) is a good
indication that you might need to consider splitting up your patch.

>  	if (!g_dbus_register_interface(connection, path, SAP_SERVER_INTERFACE,
> -				server_methods, server_signals, NULL,
> -				server, destroy_sap_interface)) {
> +					server_methods, server_signals, NULL,
> +					server, destroy_sap_interface)) {
>  		error("D-Bus failed to register %s interface",
> -						SAP_SERVER_INTERFACE);
> +							SAP_SERVER_INTERFACE);

Same here.

Johan
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux