linux-bluetooth.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Holtmann <marcel@holtmann.org>
To: Szymon Janc <szymon.janc@codecoup.pl>
Cc: Brian Gix <brian.gix@intel.com>,
	linux-bluetooth@vger.kernel.org,
	Johan Hedberg <johan.hedberg@gmail.com>,
	inga.stotland@intel.com
Subject: Re: [PATCH BlueZ] mesh: Up-rev ELL dependancies to >= 0.14
Date: Thu, 22 Nov 2018 10:27:24 +0100	[thread overview]
Message-ID: <4E8E1B98-04EE-4A05-919A-F1F56C378332@holtmann.org> (raw)
In-Reply-To: <102860007.z2ZSbi0IGQ@ix>

Hi Szymon,

>> ---
>> configure.ac |  4 ++--
>> mesh/dbus.c  |  4 ++--
>> mesh/main.c  | 27 ++++++++++-----------------
>> 3 files changed, 14 insertions(+), 21 deletions(-)
>> 
>> diff --git a/configure.ac b/configure.ac
>> index cbc854d62..d22f9d539 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -249,8 +249,8 @@ AC_ARG_ENABLE(btpclient,
>> AC_HELP_STRING([--enable-btpclient], AM_CONDITIONAL(BTPCLIENT, test
>> "${enable_btpclient}" = "yes")
>> 
>> if (test "${enable_btpclient}" = "yes" || test "${enable_mesh}" = "yes");
>> then -	PKG_CHECK_MODULES(ELL, ell >= 0.3, enable_ell=yes,
>> -			  AC_MSG_ERROR(ell library >= 0.3 is required))
>> +	PKG_CHECK_MODULES(ELL, ell >= 0.14, enable_ell=yes,
>> +			  AC_MSG_ERROR(ell library >= 0.14 is required))
>> 	AC_SUBST(ELL_CFLAGS)
>> 	AC_SUBST(ELL_LIBS)
>> fi
>> diff --git a/mesh/dbus.c b/mesh/dbus.c
>> index a94ba067d..0df664f2b 100644
>> --- a/mesh/dbus.c
>> +++ b/mesh/dbus.c
>> @@ -76,11 +76,11 @@ struct l_dbus_message *dbus_error(struct l_dbus_message
>> *msg, int err, if (description)
>> 		return l_dbus_message_new_error(msg,
>> 				error_table[err].dbus_err,
>> -				description);
>> +				"%s", description);
>> 	else
>> 		return l_dbus_message_new_error(msg,
>> 				error_table[err].dbus_err,
>> -				error_table[err].default_desc);
>> +				"%s", error_table[err].default_desc);
>> }
>> 
>> struct l_dbus *dbus_get_bus(void)
>> diff --git a/mesh/main.c b/mesh/main.c
>> index 0722f3af8..96a013510 100644
>> --- a/mesh/main.c
>> +++ b/mesh/main.c
>> @@ -26,6 +26,7 @@
>> #include <stdio.h>
>> #include <unistd.h>
>> #include <ctype.h>
>> +#include <signal.h>
>> 
>> #include <sys/stat.h>
>> #include <ell/ell.h>
>> @@ -96,21 +97,16 @@ static void disconnect_callback(void *user_data)
>> 	l_main_quit();
>> }
>> 
>> -static void signal_handler(struct l_signal *signal, uint32_t signo,
>> -							void *user_data)
>> +static void signal_handler(void *user_data)
>> {
>> 	static bool terminated;
>> 
>> -	switch (signo) {
>> -	case SIGINT:
>> -	case SIGTERM:
>> -		if (terminated)
>> -			return;
>> -		l_info("Terminating");
>> -		l_main_quit();
>> -		terminated = true;
>> -		break;
>> -	}
>> +	if (terminated)
>> +		return;
>> +
>> +	l_info("Terminating");
>> +	l_main_quit();
>> +	terminated = true;
>> }
>> 
>> int main(int argc, char *argv[])
>> @@ -120,7 +116,6 @@ int main(int argc, char *argv[])
>> 	bool dbus_debug = false;
>> 	struct l_dbus *dbus = NULL;
>> 	struct l_signal *signal = NULL;
>> -	sigset_t mask;
>> 	const char *config_dir = NULL;
>> 	int index = MGMT_INDEX_NONE;
>> 
>> @@ -181,10 +176,8 @@ int main(int argc, char *argv[])
>> 		goto done;
>> 	}
>> 
>> -	sigemptyset(&mask);
>> -	sigaddset(&mask, SIGINT);
>> -	sigaddset(&mask, SIGTERM);
>> -	signal = l_signal_create(&mask, signal_handler, NULL, NULL);
>> +	signal = l_signal_create(SIGINT, signal_handler, NULL, NULL);
>> +	signal = l_signal_create(SIGTERM, signal_handler, NULL, NULL);
>> 
>> 	umask(0077);
> 
> btpclient is also using ELL, should it be updated too?

yes, please.

Regards

Marcel


      reply	other threads:[~2018-11-22  9:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 20:46 [PATCH BlueZ] mesh: Up-rev ELL dependancies to >= 0.14 Brian Gix
2018-11-22  7:13 ` Marcel Holtmann
2018-11-22  8:19 ` Szymon Janc
2018-11-22  9:27   ` Marcel Holtmann [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E8E1B98-04EE-4A05-919A-F1F56C378332@holtmann.org \
    --to=marcel@holtmann.org \
    --cc=brian.gix@intel.com \
    --cc=inga.stotland@intel.com \
    --cc=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=szymon.janc@codecoup.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).