Re: Code standards
by Rémi Denis-Courmont
Hello,
> > I assume the coding styles are the "usual" ones, and the last thing I
want is
> > to start a flame war about those. But which C dialect is Ofono supposed
to be
> > written in? plain C89, C89 syntax + C99 library, full C99, GNU C... ?
> the coding style of oFono is the same as for the Linux kernel, BlueZ,
> ConnMan, obexd etc. So basically checkpatch.pl patches are fine.
I am not wondering what the cosmetic style is. I am wondering what parts of
the C language are used. Namely many (most?) C programmers claim to use
ANSI C a.k.a. C89 even though there are using lots of GNU C and/or C99
extensions. Inline functions, C++-styled comments, non-constant variable
initializers, variadic macros, named initializers for structs and
fixed-size integer types and (v)snprintf() are perhaps the most commonly
used C99 features. Restricted pointers, variable-sized arrays, mixed
variables and code (including C++-style for() loops), new printf() format
modifiers (e.g. %zu for size_t), booleans and compound initializers are
arguably more "controversial" or less commonly used, but nevertheless
standard.
I tend pretty much all of them (and avoid GNU-specifics like a :? b)
because I don't care about legacy compilers like gcc 2.x or MSVC, but I
don't want to start a religion war.
A related issue is how careful/pedantic use of integer types should be.
Kernel core or glib tend to be sloppy about int vs (s)size_t.
> When using ./bootstrap-configure is used it enables a certain set of GCC
> warnings and it should be warnings free. So that is good measurement for
> the style details ;)
As a matter of fact, current HEAD is failing here with gcc 4.3:
../../src/voicecall.c: In function ‘ofono_voicecall_notify’:
../../src/voicecall.c:1239: error: ‘v’ may be used uninitialized in
this function
--
Rémi
11 years, 9 months
two patches for voicecall.c
by Li, Minjun
Hi Folks,
I have made 2 patches for minor bugs in functions of voicecall_busy and dial_callback in /src/voicecall.c.
The first one is to use the function pointer set_udub to replace release_specific.
The second one is to delete the repeated calling of voicecall_create in dial_callback function, since it was called in previous line in the same function.
Best Regards,
Minjun
11 years, 9 months
Code standards
by Rémi Denis-Courmont
Hello,
I assume the coding styles are the "usual" ones, and the last thing I want is
to start a flame war about those. But which C dialect is Ofono supposed to be
written in? plain C89, C89 syntax + C99 library, full C99, GNU C... ?
--
Rémi Denis-Courmont
Nokia Devices R&D, Maemo Software, Helsinki
11 years, 9 months
(no subject)
by Li, Minjun
Hi Folks,
I have made a patch for minor bugs in functions of dial_callback and voicecall_busy in /src/voicecall.c.
Best Regards,
Minjun
11 years, 9 months
[PATCH] Add dbus .service file to auto start ofonod
by Shane Bryan
Signed-off-by: Shane Bryan <shane.bryan(a)linux.intel.com>
---
configure.ac | 4 ++++
src/Makefile.am | 4 +++-
src/org.ofono.service | 4 ++++
3 files changed, 11 insertions(+), 1 deletions(-)
create mode 100644 src/org.ofono.service
diff --git a/configure.ac b/configure.ac
index 36fec5f..0b452dd 100644
--- a/configure.ac
+++ b/configure.ac
@@ -73,6 +73,10 @@ else
fi
AC_SUBST(DBUS_DATADIR)
+DBUS_SYSTEM_SERVICEDIR="${datadir}/dbus-1/system-services"
+AC_SUBST(DBUS_SYSTEM_SERVICEDIR)
+
+
AC_SUBST([GDBUS_CFLAGS], ['$(DBUS_CFLAGS) -I$(top_srcdir)/gdbus'])
AC_SUBST([GDBUS_LIBS], ['$(top_builddir)/gdbus/libgdbus.la $(DBUS_LIBS)'])
diff --git a/src/Makefile.am b/src/Makefile.am
index 38c97bd..0c618b8 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,8 +1,10 @@
if DATAFILES
dbusdir = @DBUS_DATADIR@
+servicedir = @DBUS_SYSTEM_SERVICEDIR@
dbus_DATA = ofono.conf
+service_DATA = org.ofono.service
endif
sbin_PROGRAMS = ofonod
@@ -35,7 +37,7 @@ AM_CFLAGS = @GTHREAD_CFLAGS@ @GLIB_CFLAGS@ @GDBUS_CFLAGS@ @GATCHAT_CFLAGS@ \
INCLUDES = -I$(top_builddir)/include -I$(top_builddir)
-EXTRA_DIST = ofono.conf
+EXTRA_DIST = ofono.conf org.ofono.service
MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/org.ofono.service b/src/org.ofono.service
new file mode 100644
index 0000000..b98b109
--- /dev/null
+++ b/src/org.ofono.service
@@ -0,0 +1,4 @@
+[D-BUS Service]
+Name=org.ofono
+Exec=/usr/sbin/ofonod
+User=root
--
1.6.0.4
11 years, 9 months
Can't acces to config.h
by Lucien Pereira
Hi Folks,
while I was looking for config.h I discovered that he is specified in
.gitignore.
I don't understand why since this file seems important (included many
times).
Regards, Lucien Pereira.
11 years, 9 months
failed to download source code!
by WuYongbo
Hi all,
I want to download the source code of ofono by:
git clone git://git.kernel.org/pub/scm/network/ofono/ofono.git
it failed with the following info:
Initialized empty Git repository in /home/ubuntu/ofono/.git/
git.kernel.org[0: 130.239.17.7]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
any feedback is welcome !
--
Good luck !
11 years, 9 months
(no subject)
by sudishm m
Hi,
how do I donload the source code, to my PC and build it.Please provide
instructions to do so,
Sudish
11 years, 9 months