I have made the following changes intended for :
  CE:UX:MTF / timed

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/3247

Thank You,
bossbot ([email protected])

[This message was auto-generated]

---

Request # 3247:

Messages from BOSS:
     Could not notify CE-maintainers (no address found)

State:   review          2011-11-24T12:05:43 bossbot

Reviews:
     accepted by bossbot : Prechecks completed; none failed.
     new by   None

Changes:
  submit: Project:MTF:UX / timed -> CE:UX:MTF / timed
  
changes files:
--------------
--- timed.changes
+++ timed.changes
@@ -0,0 +1,4 @@
+* Tue Nov 08 2011 Marko Saukko <[email protected]> - 2.54
+- Updated to 2.54.
+- Added /var/cache/timed/aegis/ dir to package so timed can fix missing aegis 
data file itself.
+

old:
----
  timed-2.53.tar.bz2

new:
----
  timed-2.54.tar.bz2

spec files:
-----------
--- timed.spec
+++ timed.spec
@@ -7,7 +7,7 @@
 
 Name:       timed
 Summary:    Time daemon
-Version:    2.53
+Version:    2.54
 Release:    1
 Group:      System/System Control
 License:    LGPLv2
@@ -23,9 +23,9 @@
 Patch4:     %{name}-2.37-uid-creds.patch
 Patch5:     %{name}-2.53-BMC17566-update-old-date-on-first-boot.patch
 Patch6:     %{name}-2.53-no-werror.patch
-Patch7:     %{name}-2.53-disable-dsme.patch
-Patch8:     lower-server-loglevel.patch
-Patch9:     %{name}-2.53-no-docs.patch
+Patch7:     lower-server-loglevel.patch
+Patch8:     %{name}-2.53-no-docs.patch
+Patch9:     timed-2.53-disable-dsme.patch
 Requires:   tzdata
 Requires:   tzdata-timed
 Requires:   systemd
@@ -97,11 +97,11 @@
 %patch5 -p1
 # %{name}-2.53-no-werror.patch
 %patch6 -p1
-# %{name}-2.53-disable-dsme.patch
-%patch7 -p1
 # lower-server-loglevel.patch
-%patch8 -p1
+%patch7 -p1
 # %{name}-2.53-no-docs.patch
+%patch8 -p1
+# timed-2.53-disable-dsme.patch
 %patch9 -p1
 # >> setup
 # << setup
@@ -137,7 +137,7 @@
 #install -m 644 src/doc/libtimed-voland.3 
%{buildroot}/%{_mandir}/man3/libtimed-voland.3
 
 install -m 644 -D %{SOURCE1} 
%{buildroot}/%{_sysconfdir}/dbus-1/system.d/%{name}.conf
-install -d %{buildroot}/%{_localstatedir}/cache/%{name}/
+install -d %{buildroot}/%{_localstatedir}/cache/%{name}/aegis/
 
 install -m 644 -D %{SOURCE2} %{buildroot}/lib/systemd/system/%{name}.service
 install -d %{buildroot}/lib/systemd/system/multi-user.target.wants/
@@ -192,6 +192,7 @@
 # %{_mandir}/man3/libtimed-voland.3.gz
 # %{_mandir}/man8/timed.8.gz
 %{_localstatedir}/cache/timed/
+%{_localstatedir}/cache/timed/aegis/
 /lib/systemd/system/%{name}.service
 /lib/systemd/system/multi-user.target.wants/%{name}.service
 # << files

other changes:
--------------

++++++ timed-2.53-disable-dsme.patch
--- timed-2.53-disable-dsme.patch
+++ timed-2.53-disable-dsme.patch
@@ -1,7 +1,21 @@
-diff -ruN --exclude='*~' timed-2.53.orig/src/memory/memory.pro 
timed-2.53/src/memory/memory.pro
---- timed-2.53.orig/src/memory/memory.pro      2011-09-20 18:01:06.773912581 
+0300
-+++ timed-2.53/src/memory/memory.pro   2011-09-21 09:56:01.138049914 +0300
-@@ -4,7 +4,10 @@
+From 3fef317e366fa5bcbe99f55fca14a3f86f89a1f2 Mon Sep 17 00:00:00 2001
+From: Marko Saukko <[email protected]>
+Date: Tue, 8 Nov 2011 16:58:03 +0200
+Subject: Patch to allow building timed without DSME.
+
+---
+ src/memory/memory.pro |    5 ++++-
+ src/server/server.pro |   14 ++++++++++----
+ src/server/timed.cpp  |   12 ++++++++++++
+ src/server/timed.h    |    6 ++++++
+ src/ticker/ticker.h   |    6 +++++-
+ 5 files changed, 37 insertions(+), 6 deletions(-)
+
+diff --git a/src/memory/memory.pro b/src/memory/memory.pro
+index 4965715..dfdcdc8 100644
+--- a/src/memory/memory.pro
++++ b/src/memory/memory.pro
+@@ -4,7 +4,10 @@ QT += dbus
  CONFIG += qmlog
  CONFIG += link_pkgconfig
  
@@ -13,10 +27,11 @@
  
  TEMPLATE = app
  TARGET = memory
-diff -ruN --exclude='*~' timed-2.53.orig/src/server/server.pro 
timed-2.53/src/server/server.pro
---- timed-2.53.orig/src/server/server.pro      2011-09-20 18:01:06.811913422 
+0300
-+++ timed-2.53/src/server/server.pro   2011-09-21 10:19:44.037333596 +0300
-@@ -14,10 +14,12 @@
+diff --git a/src/server/server.pro b/src/server/server.pro
+index e04015f..e3dc377 100644
+--- a/src/server/server.pro
++++ b/src/server/server.pro
+@@ -14,10 +14,12 @@ CONFIG += qmlog
  
  IODATA_TYPES = queue.type config.type settings.type customization.type 
tzdata.type
  
@@ -32,7 +47,7 @@
  SOURCES += peer.cpp tzdata.cpp cellular.cpp csd.cpp cluster.cpp machine.cpp 
state.cpp main.cpp timed.cpp timeutil.cpp event.cpp misc.cpp settings.cpp 
pinguin.cpp unix-signal.cpp onitz.cpp
  
  SOURCES += credentials.cpp aegis.cpp
-@@ -33,7 +35,11 @@
+@@ -33,7 +35,11 @@ SOURCES += notification.cpp
  HEADERS += notification.h
  
  CONFIG += link_pkgconfig iodata
@@ -45,9 +60,10 @@
  
  target.path = $$(DESTDIR)/usr/bin
  
-diff -ruN --exclude='*~' timed-2.53.orig/src/server/timed.cpp 
timed-2.53/src/server/timed.cpp
---- timed-2.53.orig/src/server/timed.cpp       2011-09-20 18:01:06.809913377 
+0300
-+++ timed-2.53/src/server/timed.cpp    2011-09-21 10:25:50.917215409 +0300
+diff --git a/src/server/timed.cpp b/src/server/timed.cpp
+index ed96ea2..e6b364c 100644
+--- a/src/server/timed.cpp
++++ b/src/server/timed.cpp
 @@ -41,7 +41,9 @@
  #include "customization.type.h"
  #include "settings.type.h"
@@ -58,7 +74,7 @@
  #include "adaptor.h"
  #include "backup.h"
  #include "timed.h"
-@@ -313,9 +315,11 @@
+@@ -318,9 +320,11 @@ static bool init_act_dead_v2(bool use_status_files)
  void Timed::init_device_mode()
  {
    current_mode = "(unknown)" ;
@@ -70,7 +86,7 @@
    if (scratchbox_mode)
    {
      int is_act_dead = is_act_dead_by_status_files() ;
-@@ -325,7 +329,11 @@
+@@ -330,7 +334,11 @@ void Timed::init_device_mode()
      device_mode_reached(user_mode) ;
    }
    else
@@ -82,7 +98,7 @@
    const char *startup_path="/com/nokia/startup/signal", 
*startup_iface="com.nokia.startup.signal" ;
    const char *desktop_visible_slot = SLOT(harmattan_desktop_visible()) ;
    const char *init_done_slot = SLOT(harmattan_init_done(int)) ;
-@@ -811,6 +819,7 @@
+@@ -818,6 +826,7 @@ void Timed::system_owner_changed(const QString &name, 
const QString &oldowner, c
  
  void Timed::send_next_bootup_event(int value)
  {
@@ -90,7 +106,7 @@
    QDBusConnection dsme = QDBusConnection::systemBus() ;
    QString path = Maemo::Timed::objpath() ;
    QString iface = Maemo::Timed::interface() ;
-@@ -821,6 +830,7 @@
+@@ -828,6 +837,7 @@ void Timed::send_next_bootup_event(int value)
      log_info("signal %s(%d) sent", string_q_to_std(signal).c_str(), value) ;
    else
      log_error("Failed to send the signal %s(%d) on system bus: %s", 
string_q_to_std(signal).c_str(), value, 
dsme.lastError().message().toStdString().c_str()) ;
@@ -98,7 +114,7 @@
  }
  
  void Timed::event_queue_changed()
-@@ -1074,6 +1084,7 @@
+@@ -1081,6 +1091,7 @@ void Timed::open_epoch()
    time_operational_p->setValue(true) ;
  }
  
@@ -106,7 +122,7 @@
  void Timed::dsme_mode_is_changing()
  {
    log_notice("mode is changing, freezeng machine") ;
-@@ -1105,6 +1116,7 @@
+@@ -1112,6 +1123,7 @@ void Timed::dsme_mode_reported(const string &mode)
    start_voland_watcher() ;
  #endif
  }
@@ -114,9 +130,10 @@
  
  void Timed::connect_to_session_bus(const string &session_bus_address)
  {
-diff -ruN --exclude='*~' timed-2.53.orig/src/server/timed.h 
timed-2.53/src/server/timed.h
---- timed-2.53.orig/src/server/timed.h 2011-09-20 18:01:06.811913422 +0300
-+++ timed-2.53/src/server/timed.h      2011-09-21 09:51:25.180233851 +0300
+diff --git a/src/server/timed.h b/src/server/timed.h
+index ad60432..7b0823b 100644
+--- a/src/server/timed.h
++++ b/src/server/timed.h
 @@ -46,7 +46,9 @@
  #include "csd.h"
  #include "event.h"
@@ -127,7 +144,7 @@
  #include "notification.h"
  
  struct Timed : public QCoreApplication
-@@ -163,7 +165,9 @@
+@@ -163,7 +165,9 @@ private:
    unsigned ping_period, ping_max_num ;
    string events_path, settings_path ;
    int default_gmt_offset ;
@@ -137,7 +154,7 @@
    std::string current_mode ;
    void load_rc() ;
    void load_settings() ;
-@@ -194,8 +198,10 @@
+@@ -194,8 +198,10 @@ public Q_SLOTS:
  private Q_SLOTS:
    void queue_threshold_timeout() ;
    void unix_signal(int signo) ;
@@ -148,10 +165,11 @@
    void harmattan_init_done(int runlevel) ;
    void harmattan_desktop_visible() ;
    void harmattan_session_started() ;
-diff -ruN --exclude='*~' timed-2.53.orig/src/ticker/ticker.h 
timed-2.53/src/ticker/ticker.h
---- timed-2.53.orig/src/ticker/ticker.h        2011-09-20 18:01:06.816913533 
+0300
-+++ timed-2.53/src/ticker/ticker.h     2011-09-21 09:51:25.183233914 +0300
-@@ -159,6 +159,7 @@
+diff --git a/src/ticker/ticker.h b/src/ticker/ticker.h
+index 8df8207..bd2ce5e 100644
+--- a/src/ticker/ticker.h
++++ b/src/ticker/ticker.h
+@@ -160,6 +160,7 @@ public:
      else
        log_critical("not connected to D-Bus signal, no time change signal will 
be delivered!") ;
  
@@ -159,7 +177,7 @@
      QDBusConnection dsme_bus = QDBusConnection::systemBus() ;
      QString path = Maemo::Timed::objpath() ;
      QString iface = Maemo::Timed::interface() ;
-@@ -168,7 +169,8 @@
+@@ -169,7 +170,8 @@ public:
        log_notice("connected to system bus signal '%s'", 
signal.toStdString().c_str()) ;
      else
        log_critical("not connected to system bus signal 
'%s'",signal.toStdString().c_str()) ;
@@ -169,7 +187,7 @@
  #if USE_CELLULAR_QT
      cellular_time = new Cellular::NetworkTime ;
  #  if NEW_CELLULAR
-@@ -242,6 +244,7 @@
+@@ -243,6 +245,7 @@ public slots:
      cout << endl ;
      log_notice("Settings change signalled (system time %schanged), new 
settings: %s", time ? "" : "not ", info.str().toStdString().c_str()) ;
    }
@@ -177,7 +195,7 @@
    void dsme(int value)
    {
      ostringstream os ;
-@@ -254,6 +257,7 @@
+@@ -255,6 +258,7 @@ public slots:
      cout << endl ;
      log_notice("%s", os.str().c_str()) ;
    }
@@ -185,3 +203,6 @@
  #if NEW_CELLULAR
  
  #if NEW_CELLULAR_BROKEN_SIGNAL
+-- 
+1.7.6.4
(1 more lines skipped)

++++++ timed-2.53.tar.bz2 -> timed-2.54.tar.bz2
--- debian/changelog
+++ debian/changelog
@@ -1,3 +1,9 @@
+timed (2.54) unstable; urgency=low
+
+  * Fixes: NB#270501 - peer caching is removed
+
+ -- Victor Portnov <[email protected]>  Tue, 18 Oct 2011 17:08:06 +0400
+
 timed (2.53) unstable; urgency=low
 
   * Fixes: NB#273463 - setting timezone by MCC in large countries
--- debian/control
+++ debian/control
@@ -1,7 +1,7 @@
 Source: timed
 Section: misc
 Priority: optional
-Maintainer: Ilya Dogolazky <[email protected]>
+Maintainer: Victor Portnov <[email protected]>
 Uploaders: Philippe De Swert <[email protected]>
 Build-Depends: debhelper (>= 7),
  libqt4-dev (>= 4.7),
--- src/server/adaptor.h
+++ src/server/adaptor.h
@@ -49,7 +49,7 @@
 #define SQC str().toStdString().c_str()
 #define QC toStdString().c_str()
 #define CC c_str()
-#define PEER timed->peer->info(message.service().toStdString()).c_str()
+#define PEER timed->peer ? 
timed->peer->info(message.service().toStdString()).c_str() : 
qPrintable(message.service())
 
 static QDateTime time_t_to_qdatetime(time_t t)
 {
--- src/server/peer.cpp
+++ src/server/peer.cpp
@@ -79,29 +79,23 @@
 }
 #endif
 
-peer_t::peer_t(bool mode)
+peer_t::peer_t(bool mode, QObject *parent) :
+  QObject(parent)
 {
   enabled = mode ;
 }
 
 peer_t::~peer_t()
 {
-  for (map<string, peer_entry_t*>::const_iterator it=entries.begin(); 
it!=entries.end(); ++it)
-    delete it->second ;
 }
 
 string peer_t::info(const string &name)
 {
-  const peer_entry_t *entry = NULL ;
   if (enabled)
   {
-    map<string, peer_entry_t*>::const_iterator it = entries.find(name) ;
-    if (it!=entries.end())
-      entry = it->second ;
-    else
-      entry = entries[name] = new peer_entry_t(name) ;
+      new peer_entry_t(name, this) ;
   }
-  return str_printf("PEER::%s %s", name.c_str(), entry ? 
entry->get_info().c_str() : "DISABLED") ;
+  return str_printf("PEER::%s %s", name.c_str(), enabled ? "info requested" : 
"DISABLED") ;
 }
 
 peer_entry_t::peer_entry_t(const string &new_name, QObject *parent) :
@@ -121,6 +115,8 @@
 
 void peer_entry_t::reply_slot(QDBusPendingCallWatcher *w)
 {
+  std::string info ;
+
   if (w!=watcher)
     log_critical("QDBusPendingCallWatcher mismatch: w=%p, watcher=%p", w, 
watcher) ;
   QDBusPendingReply<uint> reply = *w ;
@@ -144,12 +140,12 @@
       info = str_printf("pid=%d, cmdline='%s', creds=%s", pid, 
cmd_line.c_str(), cred.str().c_str()) ;
     }
   }
-  delete watcher ;
-  watcher = NULL ;
   log_notice("PEER::%s %s", name.c_str(), info.c_str()) ;
+  delete this;
 }
 
 peer_entry_t::~peer_entry_t()
 {
   delete watcher ;
+  watcher = NULL ;
 }
--- src/server/peer.h
+++ src/server/peer.h
@@ -31,24 +31,21 @@
 struct peer_t ;
 struct peer_entry_t ;
 
-struct peer_t
+struct peer_t : public QObject
 {
-  peer_t(bool mode) ;
+  peer_t(bool mode, QObject *parent=NULL) ;
   ~peer_t() ;
   std::string info(const std::string &) ;
 private:
   bool enabled ;
-  std::map<std::string, peer_entry_t*> entries ;
 } ;
 
 struct peer_entry_t : public QObject
 {
   peer_entry_t(const std::string &new_name, QObject *parent=NULL) ;
   virtual ~peer_entry_t() ;
-  bool is_pending() const { return watcher != NULL ; }
-  std::string get_info() const { return info ; }
 
-  std::string name, info ;
+  std::string name ;
   QDBusPendingCallWatcher *watcher ;
 
   Q_OBJECT ;
--- src/server/timed.cpp
+++ src/server/timed.cpp
@@ -84,6 +84,7 @@
 
 Timed::Timed(int ac, char **av) :
   QCoreApplication(ac, av),
+  peer(NULL),
 //  session_bus_name("timed_not_connected"),
   session_bus("*** not available ***")
 //  session_bus_address("invalid_address")
@@ -98,8 +99,10 @@
   init_unix_signal_handler() ;
   log_debug() ;
 
-  init_dbus_peer_info() ;
-  log_debug() ;
+  QMLOG_IF
+    init_dbus_peer_info() ;
+    log_debug() ;
+  QMLOG_ENDIF ;
 
   // init_act_dead() ;
   // init_dsme_mode() ;
@@ -177,7 +180,6 @@
 // * Enable questioning of Dbus peers
 void Timed::init_dbus_peer_info()
 {
-  // TODO: make it depening on qmlog::enabled() ?
   peer =  new peer_t(true) ;
 }
 

++++++ timed.yaml
--- timed.yaml
+++ timed.yaml
@@ -1,6 +1,6 @@
 Name: timed
 Summary: Time daemon
-Version: 2.53
+Version: 2.54
 Release: 1
 Group: System/System Control
 License: LGPLv2
@@ -17,9 +17,9 @@
     - "%{name}-2.37-uid-creds.patch"
     - "%{name}-2.53-BMC17566-update-old-date-on-first-boot.patch"
     - "%{name}-2.53-no-werror.patch"
-    - "%{name}-2.53-disable-dsme.patch"
     - "lower-server-loglevel.patch"
     - "%{name}-2.53-no-docs.patch"
+    - "timed-2.53-disable-dsme.patch"
 Description: |
     The time daemon (%{name}) managing system time, time zone and settings,
     executing actions at given time and managing the event queue.
@@ -28,10 +28,6 @@
     - tzdata
     - tzdata-timed
 PkgBR:
-#    - asciidoc
-#    - dblatex
-#    - docbook-style-xsl
-#    - graphviz
     - libiodata-devel >= 0.17
     - libqmlog-devel >= 0.10
     - libxslt



Reply via email to