[tango] 01/02: add the p922_1 upstream patch
Frédéric-Emmanuel Picca
picca at moszumanska.debian.org
Tue Apr 26 08:16:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
picca pushed a commit to branch master
in repository tango.
commit defcff9a0c063c807140d03c3da8a119c6306d9c
Author: Picca Frédéric-Emmanuel <picca at synchrotron-soleil.fr>
Date: Tue Apr 26 09:43:59 2016 +0200
add the p922_1 upstream patch
---
debian/patches/0003-fix-doc.patch | 2 +-
debian/patches/0004-p922_1.patch | 1091 +++++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 1093 insertions(+), 1 deletion(-)
diff --git a/debian/patches/0003-fix-doc.patch b/debian/patches/0003-fix-doc.patch
index dd154b5..990e30e 100644
--- a/debian/patches/0003-fix-doc.patch
+++ b/debian/patches/0003-fix-doc.patch
@@ -7,7 +7,7 @@ Subject: fix doc
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/doc/src/Makefile.am b/doc/src/Makefile.am
-index d34f2ac..1bf43c1 100644
+index d34f2ac..6cb1dcb 100644
--- a/doc/src/Makefile.am
+++ b/doc/src/Makefile.am
@@ -4,6 +4,5 @@ if TANGO_DOC_ENABLED
diff --git a/debian/patches/0004-p922_1.patch b/debian/patches/0004-p922_1.patch
new file mode 100644
index 0000000..f5c6f1f
--- /dev/null
+++ b/debian/patches/0004-p922_1.patch
@@ -0,0 +1,1091 @@
+From: =?utf-8?q?Picca_Fr=C3=A9d=C3=A9ric-Emmanuel?=
+ <picca at synchrotron-soleil.fr>
+Date: Tue, 26 Apr 2016 09:43:17 +0200
+Subject: p922_1
+
+---
+ lib/cpp/client/asynreq.cpp | 2 +-
+ lib/cpp/client/cbthread.h | 6 +-
+ lib/cpp/client/devapi_base.cpp | 4 +-
+ lib/cpp/client/devasyn.h | 8 +-
+ lib/cpp/client/eventkeepalive.cpp | 22 ++-
+ lib/cpp/client/proxy_asyn.cpp | 85 ++++++++----
+ lib/cpp/client/proxy_asyn_cb.cpp | 18 ++-
+ lib/cpp/client/zmqeventconsumer.cpp | 2 +-
+ lib/cpp/server/device_3.cpp | 13 +-
+ lib/cpp/server/except.cpp | 268 ++++++++++++++++++++++++++++++++++--
+ lib/cpp/server/except.h | 1 +
+ lib/cpp/server/pollobj.cpp | 36 ++---
+ lib/cpp/server/pollobj.h | 20 +--
+ 13 files changed, 390 insertions(+), 95 deletions(-)
+
+diff --git a/lib/cpp/client/asynreq.cpp b/lib/cpp/client/asynreq.cpp
+index b532a21..d4641cf 100644
+--- a/lib/cpp/client/asynreq.cpp
++++ b/lib/cpp/client/asynreq.cpp
+@@ -376,7 +376,7 @@ void AsynReq::remove_request(Connection *dev,CORBA::Request_ptr req)
+
+ void AsynReq::mark_as_cancelled(long req_id)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+ map<long,TgRequest>::iterator pos;
+
+ pos = asyn_poll_req_table.find(req_id);
+diff --git a/lib/cpp/client/cbthread.h b/lib/cpp/client/cbthread.h
+index 6ec821c..8c8fee9 100644
+--- a/lib/cpp/client/cbthread.h
++++ b/lib/cpp/client/cbthread.h
+@@ -46,9 +46,9 @@ class CbThreadCmd: public omni_mutex
+ {
+ public:
+ CbThreadCmd():stop(false) {};
+- void stop_thread() {omni_mutex_lock(*this);stop=true;}
+- void start_thread() {omni_mutex_lock(*this);stop=false;}
+- bool is_stopped() {omni_mutex_lock(*this);return stop;}
++ void stop_thread() {omni_mutex_lock sync(*this);stop=true;}
++ void start_thread() {omni_mutex_lock sync(*this);stop=false;}
++ bool is_stopped() {omni_mutex_lock sync(*this);return stop;}
+
+ bool stop;
+ };
+diff --git a/lib/cpp/client/devapi_base.cpp b/lib/cpp/client/devapi_base.cpp
+index e441dfe..ac972e6 100644
+--- a/lib/cpp/client/devapi_base.cpp
++++ b/lib/cpp/client/devapi_base.cpp
+@@ -2242,7 +2242,9 @@ void DeviceProxy::parse_name(string &full_name)
+ if (alias_used == true)
+ {
+ ext_proxy->nethost_alias = true;
+- ext_proxy->orig_tango_host = safe_tmp_host + fq;
++ ext_proxy->orig_tango_host = safe_tmp_host;
++ if (safe_tmp_host.find('.') == string::npos)
++ ext_proxy->orig_tango_host = ext_proxy->orig_tango_host + fq;
+ }
+ else
+ ext_proxy->nethost_alias = false;
+diff --git a/lib/cpp/client/devasyn.h b/lib/cpp/client/devasyn.h
+index 4de182e..eb39649 100644
+--- a/lib/cpp/client/devasyn.h
++++ b/lib/cpp/client/devasyn.h
+@@ -348,7 +348,7 @@ private:
+ class UniqIdent: public omni_mutex
+ {
+ public:
+- UniqIdent() {omni_mutex_lock(*this);ctr = 0;}
++ UniqIdent() {omni_mutex_lock sync(*this);ctr = 0;}
+ long get_ident() {omni_mutex_lock sync(*this);return ++ctr;}
+
+ long ctr;
+@@ -400,8 +400,8 @@ public:
+ void remove_request(long);
+ void remove_request(Connection *,CORBA::Request_ptr);
+
+- size_t get_request_nb() {omni_mutex_lock(*this);return asyn_poll_req_table.size();}
+- size_t get_cb_request_nb() {omni_mutex_lock(*this);return cb_req_table.size();}
++ size_t get_request_nb() {omni_mutex_lock sync(*this);return asyn_poll_req_table.size();}
++ size_t get_cb_request_nb() {omni_mutex_lock sync(*this);return cb_req_table.size();}
+ size_t get_cb_request_nb_i() {return cb_req_table.size();}
+
+ void mark_as_arrived(CORBA::Request_ptr req);
+@@ -410,7 +410,7 @@ public:
+ void mark_as_cancelled(long);
+ void mark_all_polling_as_cancelled();
+ void wait() {cond.wait();}
+- void signal() {omni_mutex_lock(*this);cond.signal();}
++ void signal() {omni_mutex_lock sync(*this);cond.signal();}
+
+ protected:
+ map<long,TgRequest> asyn_poll_req_table;
+diff --git a/lib/cpp/client/eventkeepalive.cpp b/lib/cpp/client/eventkeepalive.cpp
+index 24c299e..6a39a6d 100644
+--- a/lib/cpp/client/eventkeepalive.cpp
++++ b/lib/cpp/client/eventkeepalive.cpp
+@@ -191,7 +191,14 @@ bool EventConsumerKeepAliveThread::reconnect_to_zmq_channel(EvChanIte &ipos,Even
+ string adm_name = ipos->second.full_adm_name;
+
+ #ifdef ZMQ_HAS_DISCONNECT
+- event_consumer->disconnect_event_channel(adm_name,ipos->second.endpoint,epos->second.endpoint);
++//
++// Forget exception which could happen during massive restart of device server process running on the same host
++//
++ try
++ {
++ event_consumer->disconnect_event_channel(adm_name,ipos->second.endpoint,epos->second.endpoint);
++ }
++ catch (Tango::DevFailed &e) {}
+ #endif
+ event_consumer->connect_event_channel(adm_name,
+ epos->second.device->get_device_db(),
+@@ -560,17 +567,22 @@ void *EventConsumerKeepAliveThread::run_undetached(TANGO_UNUSED(void *arg))
+ if (notifd_event_consumer == NULL)
+ notifd_event_consumer = ApiUtil::instance()->get_notifd_event_consumer();
+
+- // lock the maps only for reading
+- event_consumer->map_modification_lock.writerIn();
+ now = time(NULL);
++ if ( event_consumer->event_not_connected.empty() == false)
++ {
++ DelayEvent de(event_consumer);
++ event_consumer->map_modification_lock.writerIn();
++
+
+ //
+ // Check the list of not yet connected events and try to subscribe
+ //
+
+- not_conected_event(event_consumer,now,notifd_event_consumer);
++ not_conected_event(event_consumer,now,notifd_event_consumer);
++
++ event_consumer->map_modification_lock.writerOut();
++ }
+
+- event_consumer->map_modification_lock.writerOut();
+
+ //
+ // Check for all other event reconnections
+diff --git a/lib/cpp/client/proxy_asyn.cpp b/lib/cpp/client/proxy_asyn.cpp
+index b473560..419dd25 100644
+--- a/lib/cpp/client/proxy_asyn.cpp
++++ b/lib/cpp/client/proxy_asyn.cpp
+@@ -279,7 +279,8 @@ DeviceData Connection::command_inout_reply(long id)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout(id,cb_excep_mess);
+@@ -293,7 +294,8 @@ DeviceData Connection::command_inout_reply(long id)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ return omni420_except(id,cb_excep_mess,req);
+ }
+
+@@ -348,7 +350,8 @@ DeviceData Connection::command_inout_reply(long id)
+ catch(...) {}
+ }
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ if (need_reconnect == false)
+ {
+@@ -435,7 +438,8 @@ DeviceData Connection::command_inout_reply(long id)
+ *(nv->value()) >>= cmd;
+ char *tmp = CORBA::string_dup(cmd);
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ //
+ // Check if the exception was a connection exception
+@@ -598,7 +602,8 @@ DeviceData Connection::command_inout_reply(long id,long call_timeout)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout(id,cb_excep_mess);
+@@ -612,7 +617,8 @@ DeviceData Connection::command_inout_reply(long id,long call_timeout)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ return omni420_except(id,cb_excep_mess,req);
+ }
+
+@@ -667,7 +673,8 @@ DeviceData Connection::command_inout_reply(long id,long call_timeout)
+ catch(...) {}
+ }
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ if (need_reconnect == false)
+ {
+@@ -752,7 +759,8 @@ DeviceData Connection::command_inout_reply(long id,long call_timeout)
+ *(nv->value()) >>= cmd;
+ char *tmp = CORBA::string_dup(cmd);
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ //
+ // Check if the exception was a connection exception
+@@ -983,7 +991,8 @@ vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout_attr(id,cb_excep_mess,MULTIPLE);
+@@ -1001,7 +1010,8 @@ vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ omni420_except_attr(id,cb_excep_mess,MULTIPLE);
+
+ vector<DeviceAttribute> *a_ptr = redo_synch_reads_call(req);
+@@ -1186,7 +1196,8 @@ DeviceAttribute *DeviceProxy::read_attribute_reply(long id)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout_attr(id,cb_excep_mess,SIMPLE);
+@@ -1204,7 +1215,8 @@ DeviceAttribute *DeviceProxy::read_attribute_reply(long id)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ omni420_except_attr(id,cb_excep_mess,SIMPLE);
+
+ DeviceAttribute *a_ptr = redo_synch_read_call(req);
+@@ -1392,7 +1404,7 @@ vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id,long call_ti
+ nanosleep(&to_wait,&inter);
+ #endif
+ }
+-
++
+ if (i == nb)
+ {
+ TangoSys_OMemStream desc;
+@@ -1419,7 +1431,8 @@ vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id,long call_ti
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout_attr(id,cb_excep_mess,MULTIPLE);
+@@ -1437,7 +1450,8 @@ vector<DeviceAttribute> *DeviceProxy::read_attributes_reply(long id,long call_ti
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ omni420_except_attr(id,cb_excep_mess,MULTIPLE);
+
+ vector<DeviceAttribute> *a_ptr = redo_synch_reads_call(req);
+@@ -1648,7 +1662,7 @@ DeviceAttribute *DeviceProxy::read_attribute_reply(long id,long call_timeout)
+
+ //
+ // Check if the reply is an exception
+-// Due to a compatibility pb between omniORB 4.1 and omniORB 4.1 (at least 4.2.0),
++// Due to a compatibility pb between omniORB 4.1 and omniORB 4.2 (at least 4.2.0),
+ // we have to also handle CORBA::Request instance throwing exception in its env() and
+ // other methods. This was not the case in omniORB 4.1!
+ //
+@@ -1660,7 +1674,8 @@ DeviceAttribute *DeviceProxy::read_attribute_reply(long id,long call_timeout)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout_attr(id,cb_excep_mess,SIMPLE);
+@@ -1678,7 +1693,8 @@ DeviceAttribute *DeviceProxy::read_attribute_reply(long id,long call_timeout)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ omni420_except_attr(id,cb_excep_mess,SIMPLE);
+
+ DeviceAttribute *a_ptr = redo_synch_read_call(req);
+@@ -1831,7 +1847,8 @@ void DeviceProxy::read_attr_except(CORBA::Request_ptr req,long id,read_attr_type
+ catch(...) {}
+ }
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ string meth;
+ if (type == SIMPLE)
+@@ -1930,7 +1947,8 @@ void DeviceProxy::read_attr_except(CORBA::Request_ptr req,long id,read_attr_type
+ CORBA::NamedValue_ptr nv = req_arg->item(0);
+ *(nv->value()) >>= names;
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ //
+ // Check if the exception was a connection exception
+@@ -2271,7 +2289,8 @@ void DeviceProxy::write_attributes_reply(long id,long call_timeout)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout_wattr(id,cb_excep_mess);
+@@ -2286,7 +2305,8 @@ void DeviceProxy::write_attributes_reply(long id,long call_timeout)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ omni420_except_wattr(id,cb_excep_mess);
+ redo_synch_write_call(req);
+ }
+@@ -2374,7 +2394,8 @@ void DeviceProxy::write_attributes_reply(long id)
+ }
+ catch (CORBA::TRANSIENT &tra)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&tra,cb_excep_mess);
+ if (tra.minor() == omni::TRANSIENT_CallTimedout)
+ {
+ omni420_timeout_wattr(id,cb_excep_mess);
+@@ -2389,7 +2410,8 @@ void DeviceProxy::write_attributes_reply(long id)
+ catch(CORBA::SystemException &ex)
+ {
+ set_connection_state(CONNECTION_NOTOK);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&ex,cb_excep_mess);
+ omni420_except_wattr(id,cb_excep_mess);
+ redo_synch_write_call(req);
+ }
+@@ -2463,7 +2485,8 @@ void DeviceProxy::write_attr_except(CORBA::Request_ptr req,long id,TgRequest::Re
+ catch(...) {}
+ }
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ if (need_reconnect == false)
+ {
+@@ -2646,7 +2669,8 @@ void DeviceProxy::write_attr_except(CORBA::Request_ptr req,long id,TgRequest::Re
+ nb_att = att_4->length();
+ }
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ //
+ // Check if the exception was a connection exception
+@@ -2729,7 +2753,8 @@ void DeviceProxy::retrieve_read_args(TgRequest &req,vector<string> &att_list)
+ }
+ catch (CORBA::SystemException &e)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&e);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&e,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Failed to redo the call synchronously on device " << device_name;
+@@ -2839,7 +2864,8 @@ void DeviceProxy::redo_synch_write_call(TgRequest &req)
+ }
+ catch (CORBA::SystemException &e)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&e);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&e,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Failed to redo the call synchronously on device " << device_name << ends;
+@@ -2885,7 +2911,8 @@ DeviceData Connection::redo_synch_cmd(TgRequest &req)
+ }
+ catch (CORBA::SystemException &e)
+ {
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(&e);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(&e,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Failed to redo the call synchronously on device " << dev_name() << ends;
+diff --git a/lib/cpp/client/proxy_asyn_cb.cpp b/lib/cpp/client/proxy_asyn_cb.cpp
+index c43f25d..36f07fb 100644
+--- a/lib/cpp/client/proxy_asyn_cb.cpp
++++ b/lib/cpp/client/proxy_asyn_cb.cpp
+@@ -324,7 +324,8 @@ void Connection::Cb_Cmd_Request(CORBA::Request_ptr req,Tango::CallBack *cb_ptr)
+ {
+ to_except = true;
+ char *tmp = CORBA::string_dup(cmd);
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Timeout (" << timeout << " mS) exceeded on device " << dev_name();
+@@ -386,7 +387,8 @@ void Connection::Cb_Cmd_Request(CORBA::Request_ptr req,Tango::CallBack *cb_ptr)
+
+ char *tmp = CORBA::string_dup(cmd);
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Failed to execute command_inout_asynch on device " << dev_name();
+@@ -559,7 +561,8 @@ void Connection::Cb_ReadAttr_Request(CORBA::Request_ptr req,Tango::CallBack *cb_
+ if (tra->minor() == omni::TRANSIENT_CallTimedout)
+ {
+ to_except = true;
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Timeout (" << timeout << " mS) exceeded on device " << dev_name();
+@@ -629,7 +632,8 @@ void Connection::Cb_ReadAttr_Request(CORBA::Request_ptr req,Tango::CallBack *cb_
+ // Re-throw all CORBA system exceptions
+ //
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Failed to execute read_attributes_asynch on device " << dev_name();
+@@ -731,7 +735,8 @@ void Connection::Cb_WriteAttr_Request(CORBA::Request_ptr req,Tango::CallBack *cb
+ if (tra->minor() == omni::TRANSIENT_CallTimedout)
+ {
+ to_except = true;
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(tra);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(tra,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Timeout (" << timeout << " mS) exceeded on device " << dev_name();
+@@ -856,7 +861,8 @@ void Connection::Cb_WriteAttr_Request(CORBA::Request_ptr req,Tango::CallBack *cb
+ // Re-throw all CORBA system exceptions
+ //
+
+- char *cb_excep_mess = Tango::Except::print_CORBA_SystemException(sys_ex);
++ char cb_excep_mess[256];
++ Tango::Except::print_CORBA_SystemException_r(sys_ex,cb_excep_mess);
+
+ TangoSys_OMemStream desc;
+ desc << "Failed to execute write_attributes_asynch on device " << dev_name();
+diff --git a/lib/cpp/client/zmqeventconsumer.cpp b/lib/cpp/client/zmqeventconsumer.cpp
+index 31b3fbd..f0d7446 100644
+--- a/lib/cpp/client/zmqeventconsumer.cpp
++++ b/lib/cpp/client/zmqeventconsumer.cpp
+@@ -1949,7 +1949,7 @@ void ZmqEventConsumer::push_zmq_event(string &ev_name,unsigned char endian,zmq::
+ {
+ map_modification_lock.readerIn();
+ bool map_lock = true;
+-// cout << "Lib: Received event for " << ev_name << endl;
++// cout << "Lib: Received event for " << ev_name << endl;
+
+ // for (const auto &elem : event_callback_map)
+ // printf("Key in event_callback_map = %s\n",elem.first.c_str());
+diff --git a/lib/cpp/server/device_3.cpp b/lib/cpp/server/device_3.cpp
+index 2320a30..e2f946a 100644
+--- a/lib/cpp/server/device_3.cpp
++++ b/lib/cpp/server/device_3.cpp
+@@ -551,6 +551,12 @@ void Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray& nam
+ "Device_3::read_attributes_no_except");
+ }
+
++//
++// Check alarm
++//
++
++ if ((att.is_alarmed().any() == true) && (att.get_quality() != Tango::ATTR_INVALID))
++ att.check_alarm();
+ }
+ catch (Tango::DevFailed &e)
+ {
+@@ -897,13 +903,6 @@ void Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray& nam
+ {
+ if ((w_type == Tango::READ_WRITE) || (w_type == Tango::READ_WITH_WRITE))
+ dev_attr->add_write_value(att);
+-
+-//
+-// Check attribute alarm
+-//
+-
+- if ((att.is_alarmed().any() == true) && (qual != Tango::ATTR_INVALID))
+- att.check_alarm();
+ }
+
+ //
+diff --git a/lib/cpp/server/except.cpp b/lib/cpp/server/except.cpp
+index 494290d..d00f36a 100644
+--- a/lib/cpp/server/except.cpp
++++ b/lib/cpp/server/except.cpp
+@@ -69,7 +69,9 @@ void Except::print_exception(const CORBA::Exception &e)
+
+ if ((se = dynamic_cast<const CORBA::SystemException *>(&e)) != NULL)
+ {
++ Tango::Except::the_mutex.lock();
+ cerr << print_CORBA_SystemException(se) << endl;
++ Tango::Except::the_mutex.unlock();
+ }
+
+ //
+@@ -449,6 +451,250 @@ char *Except::print_CORBA_SystemException(const CORBA::SystemException *e)
+
+ //+----------------------------------------------------------------------------
+ //
++// method : print_CORBA_SystemException_r
++//
++// description : This method prints the information embedded in
++// a CORBA system exception. This is the reentrant version of
++// print_CORBA_SystemException method
++//
++// in : e : Pointer to the exception object
++// error_msg : Pointer to an already allocated char * buffer
++// buffer_size : Size of error_msg buffer
++//
++//-----------------------------------------------------------------------------
++
++char *Except::print_CORBA_SystemException_r(const CORBA::SystemException *e,
++ char * error_msg)
++{
++ const CORBA::BAD_PARAM *bad;
++ const CORBA::NO_MEMORY *mem;
++ const CORBA::IMP_LIMIT *lim;
++ const CORBA::COMM_FAILURE *comm;
++ const CORBA::INV_OBJREF *inv;
++ const CORBA::NO_PERMISSION *perm;
++ const CORBA::INTERNAL *inter;
++ const CORBA::MARSHAL *mar;
++ const CORBA::INITIALIZE *ini;
++ const CORBA::NO_IMPLEMENT *impl;
++ const CORBA::BAD_TYPECODE *type;
++ const CORBA::BAD_OPERATION *op;
++ const CORBA::NO_RESOURCES *res;
++ const CORBA::NO_RESPONSE *resp;
++ const CORBA::BAD_INV_ORDER *inv_ord;
++ const CORBA::TRANSIENT *tra;
++ const CORBA::OBJ_ADAPTER *adap;
++ const CORBA::OBJECT_NOT_EXIST *not_ex;
++ const CORBA::INV_POLICY *pol;
++
++//
++// It seems that omniORB for Win32 is not compiled with the RTTI enabled
++// (/GR option). We can't use dynamic_casting here.
++// We are using CORBA _downcast() method !!!
++//
++
++ if (CORBA::UNKNOWN::_downcast(e) != 0)
++ {
++ ::strcpy(error_msg,"UNKNOWN CORBA system exception");
++ }
++ else if ((bad = CORBA::BAD_PARAM::_downcast(e)) != 0)
++ {
++ ::strcpy(error_msg,"BAD_PARAM CORBA system exception: ");
++ const char *err_msg = bad->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((mem = CORBA::NO_MEMORY::_downcast(e)) != 0)
++ {
++ ::strcpy(error_msg,"NO_MEMORY CORBA system exception: ");
++ const char *err_msg = mem->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((lim = CORBA::IMP_LIMIT::_downcast(e)) != 0)
++ {
++ ::strcpy(error_msg,"IMP_LIMIT CORBA system exception: ");
++ const char *tmp = lim->NP_minorString();
++ if (tmp == NULL)
++ {
++ ::strcat(error_msg,"Unknown minor code: ");
++ TangoSys_MemStream st;
++ st << hex << lim->minor() << dec << ends;
++ string s = st.str();
++ ::strcat(error_msg,s.c_str());
++ }
++ else
++ ::strcat(error_msg,tmp);
++ }
++ else if ((comm = CORBA::COMM_FAILURE::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"COMM_FAILURE CORBA system exception: ");
++ const char *tmp = comm->NP_minorString();
++ if (tmp == NULL)
++ {
++ ::strcat(error_msg,"Unknown minor code: ");
++ TangoSys_MemStream st;
++ st << hex << comm->minor() << dec << ends;
++
++ string s = st.str();
++ ::strcat(error_msg,s.c_str());
++ }
++ else
++ ::strcat(error_msg,tmp);
++ }
++ else if ((inv = CORBA::INV_OBJREF::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"INV_OBJREF CORBA system exception: ");
++ const char *err_msg = inv->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((perm = CORBA::NO_PERMISSION::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"NO_PERMISSION CORBA system exception: ");
++ const char *err_msg = perm->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((inter = CORBA::INTERNAL::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"INTERNAL CORBA system exception: ");
++ const char *err_msg = inter->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((mar = CORBA::MARSHAL::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"MARSHAL CORBA system exception: ");
++ const char *err_msg = mar->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((ini = CORBA::INITIALIZE::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"INITIALIZE CORBA system exception: ");
++ const char *err_msg = ini->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((impl = CORBA::NO_IMPLEMENT::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"NO_IMPLEMENT CORBA system exception: ");
++ const char *err_msg = impl->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((type = CORBA::BAD_TYPECODE::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"BAD_TYPECODE CORBA system exception: ");
++ const char *err_msg = type->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((op = CORBA::BAD_OPERATION::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"BAD_OPERATION CORBA system exception: ");
++ const char *err_msg = op->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((res = CORBA::NO_RESOURCES::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"NO_RESOURCES CORBA system exception: ");
++ const char *err_msg = res->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((resp = CORBA::NO_RESPONSE::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"NO_RESPONSE CORBA system exception: ");
++ const char *err_msg = resp->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((inv_ord = CORBA::BAD_INV_ORDER::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"BAD_INV_ORDER CORBA system exception: ");
++ const char *err_msg = inv_ord->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((tra = CORBA::TRANSIENT::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"TRANSIENT CORBA system exception: ");
++ const char *tmp = tra->NP_minorString();
++ if (tmp == NULL)
++ {
++ ::strcat(error_msg,"Unknown minor code: ");
++ TangoSys_MemStream st;
++ st << hex << tra->minor() << dec << ends;
++
++ string s = st.str();
++ ::strcat(error_msg,s.c_str());
++ }
++ else
++ ::strcat(error_msg,tmp);
++ }
++ else if ((adap = CORBA::OBJ_ADAPTER::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"OBJ_ADAPTER CORBA system exception: ");
++ const char *err_msg = adap->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((not_ex = CORBA::OBJECT_NOT_EXIST::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"OBJECT_NOT_EXIST CORBA system exception: ");
++ const char *err_msg = not_ex->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else if ((pol = CORBA::INV_POLICY::_downcast(e)) != NULL)
++ {
++ ::strcpy(error_msg,"INV_POLICY CORBA system exception: ");
++ const char *err_msg = pol->NP_minorString();
++ if ( err_msg == NULL )
++ ::strcat(error_msg,"ORB has returned NULL pointer !");
++ else
++ ::strcat(error_msg,err_msg);
++ }
++ else
++ ::strcpy(error_msg,"CORBA unknown system exception !!!!!!!!");
++
++ return error_msg;
++}
++
++//+----------------------------------------------------------------------------
++//
+ // method : print_error_stack
+ //
+ // description : This method prints the a Tango error stack
+@@ -496,13 +742,6 @@ void Except::print_error_stack(const Tango::DevErrorList &e)
+ //
+ // description : These methods throws a Tango DevFailed exception from
+ // a CORBA system exception.
+-// Note that there is no CORBA::string_dup memory
+-// for the reason field because it it is returned by
+-// the print_CORBA_SystemException which in turn is
+-// using an OB method (_OB_defaultToString) which
+-// internally used a CORBA::String_var and its method
+-// _retn() to return the string. Therefore, its
+-// memory is allocated using CORBA::string_alloc.
+ //
+ // in : e : Pointer to the exception object
+ //
+@@ -516,7 +755,10 @@ void Except::throw_exception(const CORBA::SystemException &c_ex,const char *orig
+ errors[0].severity = Tango::ERR;
+ errors[0].origin = CORBA::string_dup(origin);
+ errors[0].reason = CORBA::string_dup(API_CorbaSysException);
+- errors[0].desc = print_CORBA_SystemException(&c_ex);
++ Tango::Except::the_mutex.lock();
++ char *tmp = print_CORBA_SystemException(&c_ex);
++ errors[0].desc = CORBA::string_dup(tmp);
++ Tango::Except::the_mutex.unlock();
+
+ throw Tango::DevFailed(errors);
+ }
+@@ -530,7 +772,10 @@ void Except::throw_exception(const CORBA::SystemException &c_ex,char *origin)
+ errors[0].origin = CORBA::string_dup(origin);
+ delete [] origin;
+ errors[0].reason = CORBA::string_dup(API_CorbaSysException);
+- errors[0].desc = print_CORBA_SystemException(&c_ex);
++ Tango::Except::the_mutex.lock();
++ char *tmp = print_CORBA_SystemException(&c_ex);
++ errors[0].desc = CORBA::string_dup(tmp);
++ Tango::Except::the_mutex.unlock();
+
+ throw Tango::DevFailed(errors);
+ }
+@@ -543,7 +788,10 @@ void Except::throw_exception(const CORBA::SystemException &c_ex,const string &or
+ errors[0].severity = Tango::ERR;
+ errors[0].origin = CORBA::string_dup(origin.c_str());
+ errors[0].reason = CORBA::string_dup(API_CorbaSysException);
+- errors[0].desc = print_CORBA_SystemException(&c_ex);
++ Tango::Except::the_mutex.lock();
++ char *tmp = print_CORBA_SystemException(&c_ex);
++ errors[0].desc = CORBA::string_dup(tmp);
++ Tango::Except::the_mutex.unlock();
+
+ throw Tango::DevFailed(errors);
+ }
+diff --git a/lib/cpp/server/except.h b/lib/cpp/server/except.h
+index df640cb..66ca7d8 100644
+--- a/lib/cpp/server/except.h
++++ b/lib/cpp/server/except.h
+@@ -1865,6 +1865,7 @@ public:
+ /// @privatesection
+
+ static char *print_CORBA_SystemException(const CORBA::SystemException *);
++ static char *print_CORBA_SystemException_r(const CORBA::SystemException *, char * err_msg); // reentrant version
+ static omni_mutex the_mutex;
+
+ protected:
+diff --git a/lib/cpp/server/pollobj.cpp b/lib/cpp/server/pollobj.cpp
+index 3947df7..9a23999 100644
+--- a/lib/cpp/server/pollobj.cpp
++++ b/lib/cpp/server/pollobj.cpp
+@@ -126,7 +126,7 @@ PollObj::PollObj(DeviceImpl *d,PollObjType ty,const string &na,int user_upd,long
+
+ void PollObj::insert_data(CORBA::Any *res,struct timeval &when,struct timeval &needed)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.insert_data(res,when);
+ needed_time = needed;
+@@ -134,7 +134,7 @@ void PollObj::insert_data(CORBA::Any *res,struct timeval &when,struct timeval &n
+
+ void PollObj::insert_data(Tango::AttributeValueList *res,struct timeval &when,struct timeval &needed)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.insert_data(res,when);
+ needed_time = needed;
+@@ -142,7 +142,7 @@ void PollObj::insert_data(Tango::AttributeValueList *res,struct timeval &when,st
+
+ void PollObj::insert_data(Tango::AttributeValueList_3 *res,struct timeval &when,struct timeval &needed)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.insert_data(res,when);
+ needed_time = needed;
+@@ -150,7 +150,7 @@ void PollObj::insert_data(Tango::AttributeValueList_3 *res,struct timeval &when,
+
+ void PollObj::insert_data(Tango::AttributeValueList_4 *res,struct timeval &when,struct timeval &needed)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.insert_data(res,when,true);
+ needed_time = needed;
+@@ -158,7 +158,7 @@ void PollObj::insert_data(Tango::AttributeValueList_4 *res,struct timeval &when,
+
+ void PollObj::insert_data(Tango::AttributeValueList_5 *res,struct timeval &when,struct timeval &needed)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.insert_data(res,when,true);
+ needed_time = needed;
+@@ -184,7 +184,7 @@ void PollObj::insert_except(Tango::DevFailed *res,
+ struct timeval &when,
+ struct timeval &needed)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.insert_except(res,when);
+ needed_time = needed;
+@@ -221,7 +221,7 @@ double PollObj::get_last_insert_date_i()
+
+ CORBA::Any *PollObj::get_last_cmd_result()
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ return ring.get_last_cmd_result();
+ }
+@@ -240,7 +240,7 @@ CORBA::Any *PollObj::get_last_cmd_result()
+ Tango::AttributeValue &PollObj::get_last_attr_value(bool lock)
+ {
+ if (lock == true)
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ return ring.get_last_attr_value();
+ }
+@@ -248,7 +248,7 @@ Tango::AttributeValue &PollObj::get_last_attr_value(bool lock)
+ Tango::AttributeValue_3 &PollObj::get_last_attr_value_3(bool lock)
+ {
+ if (lock == true)
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ return ring.get_last_attr_value_3();
+ }
+@@ -256,7 +256,7 @@ Tango::AttributeValue_3 &PollObj::get_last_attr_value_3(bool lock)
+ Tango::AttributeValue_4 &PollObj::get_last_attr_value_4(bool lock)
+ {
+ if (lock == true)
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ return ring.get_last_attr_value_4();
+ }
+@@ -264,7 +264,7 @@ Tango::AttributeValue_4 &PollObj::get_last_attr_value_4(bool lock)
+ Tango::AttributeValue_5 &PollObj::get_last_attr_value_5(bool lock)
+ {
+ if (lock == true)
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ return ring.get_last_attr_value_5();
+ }
+@@ -315,14 +315,14 @@ void PollObj::update_upd(int new_upd)
+
+ void PollObj::get_cmd_history(long n,Tango::DevCmdHistoryList *ptr)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_cmd_history(n,ptr);
+ }
+
+ void PollObj::get_cmd_history(long n,Tango::DevCmdHistory_4 *ptr,Tango::CmdArgType &loc_type)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_cmd_history(n,ptr,loc_type);
+ }
+@@ -345,14 +345,14 @@ void PollObj::get_cmd_history(long n,Tango::DevCmdHistory_4 *ptr,Tango::CmdArgTy
+
+ void PollObj::get_attr_history(long n,Tango::DevAttrHistoryList *ptr,long attr_type)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_attr_history(n,ptr,attr_type);
+ }
+
+ void PollObj::get_attr_history(long n,Tango::DevAttrHistoryList_3 *ptr,long attr_type)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_attr_history(n,ptr,attr_type);
+
+@@ -372,14 +372,14 @@ void PollObj::get_attr_history(long n,Tango::DevAttrHistoryList_3 *ptr,long attr
+
+ void PollObj::get_attr_history(long n,Tango::DevAttrHistory_4 *ptr,long attr_type,TANGO_UNUSED(AttrDataFormat attr_format))
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_attr_history(n,ptr,attr_type);
+ }
+
+ void PollObj::get_attr_history(long n,Tango::DevAttrHistory_5 *ptr,long attr_type,AttrDataFormat attr_format)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_attr_history(n,ptr,attr_type);
+ ptr->data_format = attr_format;
+@@ -388,7 +388,7 @@ void PollObj::get_attr_history(long n,Tango::DevAttrHistory_5 *ptr,long attr_typ
+
+ void PollObj::get_attr_history_43(long n,Tango::DevAttrHistoryList_3 *ptr,long attr_type)
+ {
+- omni_mutex_lock(*this);
++ omni_mutex_lock sync(*this);
+
+ ring.get_attr_history_43(n,ptr,attr_type);
+ }
+diff --git a/lib/cpp/server/pollobj.h b/lib/cpp/server/pollobj.h
+index 82e0bf3..3b0c316 100644
+--- a/lib/cpp/server/pollobj.h
++++ b/lib/cpp/server/pollobj.h
+@@ -83,40 +83,40 @@ public:
+ Tango::AttributeValue_4 &get_last_attr_value_4(bool);
+ Tango::AttributeValue_5 &get_last_attr_value_5(bool);
+
+- bool is_ring_empty() {omni_mutex_lock(*this);return is_ring_empty_i();}
++ bool is_ring_empty() {omni_mutex_lock sync(*this);return is_ring_empty_i();}
+ bool is_ring_empty_i() {return ring.is_empty();}
+
+- long get_upd() {omni_mutex_lock(*this);return get_upd_i();}
++ long get_upd() {omni_mutex_lock sync(*this);return get_upd_i();}
+ long get_upd_i() {return ((upd.tv_sec * 1000) + (upd.tv_usec / 1000));}
+
+- string &get_name() {omni_mutex_lock(*this);return get_name_i();}
++ string &get_name() {omni_mutex_lock sync(*this);return get_name_i();}
+ string &get_name_i() {return name;}
+
+- inline double get_needed_time() {omni_mutex_lock(*this);return get_needed_time_i();}
++ inline double get_needed_time() {omni_mutex_lock sync(*this);return get_needed_time_i();}
+ inline double get_needed_time_i()
+ {
+ return ((needed_time.tv_sec * 1000) + (needed_time.tv_usec / 1000.0));
+ }
+
+- inline PollObjType get_type() {omni_mutex_lock(*this);return get_type_i();}
++ inline PollObjType get_type() {omni_mutex_lock sync(*this);return get_type_i();}
+ inline PollObjType get_type_i() {return type;}
+
+- double get_last_insert_date() {omni_mutex_lock(*this);return get_last_insert_date_i();}
++ double get_last_insert_date() {omni_mutex_lock sync(*this);return get_last_insert_date_i();}
+ double get_last_insert_date_i();
+
+- bool is_last_an_error() {omni_mutex_lock(*this);return is_last_an_error_i();}
++ bool is_last_an_error() {omni_mutex_lock sync(*this);return is_last_an_error_i();}
+ bool is_last_an_error_i() {return ring.is_last_an_error();}
+ bool is_last_an_error_i_3()
+ {if (type==POLL_CMD)return ring.is_last_cmd_an_error();else return ring.is_last_attr_an_error();}
+
+- Tango::DevFailed *get_last_except() {omni_mutex_lock(*this);return get_last_except_i();}
++ Tango::DevFailed *get_last_except() {omni_mutex_lock sync(*this);return get_last_except_i();}
+ Tango::DevFailed *get_last_except_i() {return ring.get_last_except();}
+ Tango::DevErrorList &get_last_attr_error_i() {return ring.get_last_attr_error();}
+
+- void get_delta_t(vector<double> &vd, long nb) {omni_mutex_lock(*this);get_delta_t_i(vd,nb);}
++ void get_delta_t(vector<double> &vd, long nb) {omni_mutex_lock sync(*this);get_delta_t_i(vd,nb);}
+ void get_delta_t_i(vector<double> &vd,long nb) {ring.get_delta_t(vd,nb);}
+
+- long get_elt_nb_in_buffer() {omni_mutex_lock(*this);return get_elt_nb_in_buffer_i();}
++ long get_elt_nb_in_buffer() {omni_mutex_lock sync(*this);return get_elt_nb_in_buffer_i();}
+ long get_elt_nb_in_buffer_i() {return ring.get_nb_elt();}
+
+ void get_cmd_history(long,Tango::DevCmdHistoryList *);
diff --git a/debian/patches/series b/debian/patches/series
index ef298b7..9c93bf4 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
0001-debian-fix_database_scripts.patch
0002-debian-my.cnf.in.patch
0003-fix-doc.patch
+0004-p922_1.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/tango.git
More information about the debian-science-commits
mailing list