Compare commits

...

6 Commits

Author SHA1 Message Date
Pekka Lundstrom
cf6278f5cc Merge pull request #181 from plundstr/master
Packaging fixes
2014-02-19 16:48:49 +02:00
Pekka Lundstrom
dd3b0c5aca No restart on update
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
2014-02-19 15:01:31 +02:00
Pekka Lundstrom
988a759e4c [packaking] Add fail safe to post scripts
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
2014-02-19 14:08:27 +02:00
Pekka Lundstrom
555585c17f [packaking] get rid off .yaml
Signed-off-by: Pekka Lundstrom <pekka.lundstrom@jollamobile.com>
2014-02-19 14:06:25 +02:00
Martti Piirainen
4b99034c3f Merge pull request #175 from ptakalok/subs_master
[rilmodem] Allow subscription of stk notifications only once
2014-02-13 08:10:08 +02:00
Petri Takalokastari
03e35b6757 [rilmodem] Allow subscription of stk notifications only once
Allow subscription of stk notifications only when simkit agent registers
for first time. This implementation fixes double subscription problems
which may happen if simkit agent has exited and restarts subscribing to
stk commands again.

Signed-off-by: Petri Takalokastari <petri.takalokastari@oss.tieto.com>
2014-02-11 11:00:01 +02:00
3 changed files with 21 additions and 89 deletions

View File

@@ -46,6 +46,8 @@ struct stk_data {
GRil *ril;
};
gboolean subscribed;
static void ril_envelope_cb(struct ril_msg *message, gpointer user_data)
{
struct cb_data *cbd = user_data;
@@ -236,15 +238,18 @@ static void ril_stk_agent_ready(struct ofono_stk *stk)
DBG("");
/* register for unsol's only if agent has registered */
g_ril_register(sd->ril, RIL_UNSOL_STK_PROACTIVE_COMMAND,
ril_stk_pcmd_notify, stk);
if (!subscribed) {
DBG("Subscribing notifications");
g_ril_register(sd->ril, RIL_UNSOL_STK_PROACTIVE_COMMAND,
ril_stk_pcmd_notify, stk);
g_ril_register(sd->ril, RIL_UNSOL_STK_SESSION_END,
ril_stk_session_end_notify, stk);
g_ril_register(sd->ril, RIL_UNSOL_STK_SESSION_END,
ril_stk_session_end_notify, stk);
g_ril_register(sd->ril, RIL_UNSOL_STK_EVENT_NOTIFY,
ril_stk_event_notify, stk);
g_ril_register(sd->ril, RIL_UNSOL_STK_EVENT_NOTIFY,
ril_stk_event_notify, stk);
subscribed = TRUE;
}
/* fire and forget i.e. not waiting for the callback*/
ret = g_ril_send(sd->ril, request, NULL, 0,
@@ -270,6 +275,8 @@ static int ril_stk_probe(struct ofono_stk *stk, unsigned int vendor, void *data)
/* Register interface in this phase for stk agent */
ofono_stk_register(stk);
subscribed = FALSE;
return 0;
}

View File

@@ -1,13 +1,5 @@
#
# Do NOT Edit the Auto-generated Part!
# Generated by: spectacle version 0.26
#
Name: ofono
# >> macros
# << macros
Summary: Open Source Telephony
Version: 1.14
Release: 1
@@ -15,7 +7,6 @@ Group: Communications/Connectivity Adaptation
License: GPLv2
URL: http://ofono.org
Source0: http://www.kernel.org/pub/linux/network/ofono/ofono-%{version}.tar.xz
Source100: ofono.yaml
Requires: dbus
Requires: systemd
Requires: ofono-configs
@@ -66,14 +57,10 @@ This package provides default configs for ofono
%prep
%setup -q -n %{name}-%{version}/%{name}
# >> setup
./bootstrap
# << setup
%build
# >> build pre
autoreconf --force --install
# << build pre
%configure --disable-static \
--enable-dundee \
@@ -82,35 +69,30 @@ autoreconf --force --install
make %{?jobs:-j%jobs}
# >> build post
# << build post
%install
rm -rf %{buildroot}
# >> install pre
# << install pre
%make_install
# >> install post
mkdir -p %{buildroot}/%{_lib}/systemd/system/network.target.wants
ln -s ../ofono.service %{buildroot}/%{_lib}/systemd/system/network.target.wants/ofono.service
# << install post
%preun
if [ "$1" -eq 0 ]; then
systemctl stop ofono.service
systemctl stop ofono.service ||:
fi
%post
systemctl daemon-reload
systemctl reload-or-try-restart ofono.service
systemctl daemon-reload ||:
# Do not restart during update
# We don't want to break anything during update
# New daemon is taken in use after reboot
# systemctl reload-or-try-restart ofono.service ||:
%postun
systemctl daemon-reload
systemctl daemon-reload ||:
%files
%defattr(-,root,root,-)
# >> files
%doc COPYING ChangeLog AUTHORS README
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/*.conf
%{_sbindir}/*
@@ -122,23 +104,16 @@ systemctl daemon-reload
%exclude %{_sysconfdir}/ofono/phonesim.conf
%doc /usr/share/man/man8/ofonod.8.gz
%dir %attr(775,radio,radio) /var/lib/ofono
# << files
%files devel
%defattr(-,root,root,-)
%{_includedir}/ofono/
%{_libdir}/pkgconfig/ofono.pc
# >> files devel
# << files devel
%files tests
%defattr(-,root,root,-)
%{_libdir}/%{name}/test/*
# >> files tests
# << files tests
%files configs-mer
%defattr(-,root,root,-)
%config /etc/ofono/ril_subscription.conf
# >> files ofono-configs-mer
# << files ofono-configs-mer

View File

@@ -1,50 +0,0 @@
Name: ofono
Summary: Open Source Telephony
Description: Telephony stack
Version: 1.14
Release: 1
Group: Communications/Connectivity Adaptation
License: GPLv2
URL: http://ofono.org
Sources:
- http://www.kernel.org/pub/linux/network/ofono/ofono-%{version}.tar.xz
Requires:
- dbus
PkgBR:
- libtool
- automake
- autoconf
PkgConfigBR:
- glib-2.0
- dbus-1
- libudev >= 145
- bluez >= 4.85
- mobile-broadband-provider-info
SetupOptions: -q -n %{name}-%{version}/%{name}
ConfigOptions:
- --enable-dundee
- --enable-test
- --with-systemdunitdir="/%{_lib}/systemd/system"
SubPackages:
- Name: devel
Summary: Headers for oFono
Group: Development/Libraries
Description: Development headers and libraries for oFono
Files:
- "%{_includedir}/ofono/"
- "%{_libdir}/pkgconfig/ofono.pc"
- Name: tests
Summary: Test Scripts for oFono
Group: Development/Libraries
Description: Scripts for testing oFono and its functionality
Obsoletes:
- "ofono-test < 1.0"
Provides:
- "ofono-test >= 1.0"
Requires:
- dbus-python
- pygobject2
Files:
- "%{_libdir}/%{name}/test/*"