[SCM] tango branch, master, updated. debian/8.0.5+dfsg-1-1-g1dd4c13

Picca Frédéric-Emma?==?UTF-8?Q?nuel picca at debian.org
Tue May 7 07:14:38 UTC 2013


The following commit has been merged in the master branch:
commit 2bb89e5efa801ddb3f7d0acde01830c8b7cc9546
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date:   Sat Oct 27 21:21:35 2012 +0200

    add the p805_2 patch

diff --git a/debian/changelog b/debian/changelog
index 6048017..833692e 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -9,7 +9,9 @@ tango (8.0.5+dfsg-1) UNRELEASED; urgency=low
     - 0004-upstream-fix-bug3285674.patch (deleted)
     - 0004-upstream-fix-p805_1.patch (new)
     - 0005-upstream-fix-bug3213730.patch (deleted)
+    - 0005-fix-forwaded-upstream-add-LIBZMQ_LIBS-to-libtango.patch (new)
     - 0006-feature-forwarded-upstream-pkg-config-small-fixes.patch (deleted)
+    - 0006-upstream-fix-p805_2.patch (new)
     - 0007-upstream-fix-tango-db-start-during-init.patch (deleted)
     - 0008-feature-add-jpegmmx-option-to-configure-script.patch (deleted)
     - 0009-upstream-fix-bug3339975.patch (deleted)
diff --git a/debian/patches/0006-upstream-fix-p805_2.patch b/debian/patches/0006-upstream-fix-p805_2.patch
new file mode 100644
index 0000000..907c6fa
--- /dev/null
+++ b/debian/patches/0006-upstream-fix-p805_2.patch
@@ -0,0 +1,253 @@
+From: =?UTF-8?q?Picca=20Fr=C3=A9d=C3=A9ric-Emmanuel?= <picca at debian.org>
+Date: Sat, 27 Oct 2012 21:18:17 +0200
+Subject: upstream fix p805_2
+
+---
+ lib/cpp/client/accessproxy.cpp      |    2 +
+ lib/cpp/client/accessproxy.h        |    1 +
+ lib/cpp/client/api_util.cpp         |    2 +
+ lib/cpp/client/eventconsumer.h      |    1 +
+ lib/cpp/client/eventkeepalive.cpp   |    1 -
+ lib/cpp/client/zmqeventconsumer.cpp |  113 ++++++++++++++++-------------------
+ 6 files changed, 59 insertions(+), 61 deletions(-)
+
+diff --git a/lib/cpp/client/accessproxy.cpp b/lib/cpp/client/accessproxy.cpp
+index 085584a..03abde5 100644
+--- a/lib/cpp/client/accessproxy.cpp
++++ b/lib/cpp/client/accessproxy.cpp
+@@ -122,6 +122,8 @@ AccessControlType AccessProxy::check_access_control(string &devname)
+ 	bool multi_ip = true;
+ 	bool two_tries = false;
+ 
++	omni_mutex_lock oml(only_one);
++
+ 	while (two_tries == false)
+ 	{
+ 		try
+diff --git a/lib/cpp/client/accessproxy.h b/lib/cpp/client/accessproxy.h
+index 86c7d5e..6eae01e 100644
+--- a/lib/cpp/client/accessproxy.h
++++ b/lib/cpp/client/accessproxy.h
+@@ -48,6 +48,7 @@ protected:
+ 	vector<string>					host_ips;
+ 	bool							forced;
+ 	map<string,vector<string> > 	allowed_cmd_table;
++	omni_mutex						only_one;
+ 
+ 	void get_allowed_commands(string &,vector<string> &);
+ 
+diff --git a/lib/cpp/client/api_util.cpp b/lib/cpp/client/api_util.cpp
+index 795f9c1..08d9bad 100644
+--- a/lib/cpp/client/api_util.cpp
++++ b/lib/cpp/client/api_util.cpp
+@@ -1489,6 +1489,8 @@ int ApiUtil::get_env_var(const char *env_var_name,string &env_var)
+ 
+ void ApiUtil::get_ip_from_if(vector<string> &ip_adr_list)
+ {
++	omni_mutex_lock oml(lock_th_map);
++
+     if (ext->host_ip_adrs.empty() == true)
+     {
+ #ifndef _TG_WINDOWS_
+diff --git a/lib/cpp/client/eventconsumer.h b/lib/cpp/client/eventconsumer.h
+index 8f1231d..c324edd 100644
+--- a/lib/cpp/client/eventconsumer.h
++++ b/lib/cpp/client/eventconsumer.h
+@@ -513,6 +513,7 @@ private :
+     DevErrorList_var                        del;
+ 
+     int                                     old_poll_nb;
++	omni_mutex								subscription_mutex;
+ 
+ 	void *run_undetached(void *arg);
+ 	void push_heartbeat_event(string &);
+diff --git a/lib/cpp/client/eventkeepalive.cpp b/lib/cpp/client/eventkeepalive.cpp
+index 927056e..8ff8bc4 100644
+--- a/lib/cpp/client/eventkeepalive.cpp
++++ b/lib/cpp/client/eventkeepalive.cpp
+@@ -960,7 +960,6 @@ void *EventConsumerKeepAliveThread::run_undetached(TANGO_UNUSED(void *arg))
+ 												DeviceAttribute *da = NULL;
+ 												DevErrorList err;
+ 												err.length(0);
+-												string domain_name = epos->second.device->dev_name() + "/" + epos->second.attr_name;
+ 
+ 												bool old_transp = epos->second.device->get_transparency_reconnection();
+ 												epos->second.device->set_transparency_reconnection(true);
+diff --git a/lib/cpp/client/zmqeventconsumer.cpp b/lib/cpp/client/zmqeventconsumer.cpp
+index 8900300..b3ddbb0 100644
+--- a/lib/cpp/client/zmqeventconsumer.cpp
++++ b/lib/cpp/client/zmqeventconsumer.cpp
+@@ -257,47 +257,6 @@ void *ZmqEventConsumer::run_undetached(TANGO_UNUSED(void *arg))
+         }
+ 
+ //
+-// Something received by the control socket?
+-//
+-
+-        if (items[0].revents & ZMQ_POLLIN)
+-        {
+-//cout << "For the control socket" << endl;
+-            control_sock->recv(&received_ctrl);
+-
+-            string ret_str;
+-            bool ret = false;
+-
+-            try
+-            {
+-                ret = process_ctrl(received_ctrl,items,nb_poll_item);
+-                ret_str = "OK";
+-            }
+-            catch (zmq::error_t &e)
+-            {
+-                ret_str = e.what();
+-            }
+-            catch (Tango::DevFailed &e)
+-            {
+-                ret_str = e.errors[0].desc;
+-            }
+-
+-            zmq::message_t reply(ret_str.size());
+-            ::memcpy((void *)reply.data(),ret_str.data(),ret_str.size());
+-            control_sock->send(reply);
+-
+-            if (ret == true)
+-            {
+-                delete heartbeat_sub_sock;
+-                delete control_sock;
+-                delete [] items;
+-
+-                break;
+-            }
+-            items[0].revents = 0;
+-        }
+-
+-//
+ // Something received by the event socket (TCP transport)?
+ //
+ 
+@@ -349,6 +308,47 @@ void *ZmqEventConsumer::run_undetached(TANGO_UNUSED(void *arg))
+         }
+ 
+ //
++// Something received by the control socket?
++//
++
++        if (items[0].revents & ZMQ_POLLIN)
++        {
++//cout << "For the control socket" << endl;
++            control_sock->recv(&received_ctrl);
++
++            string ret_str;
++            bool ret = false;
++
++            try
++            {
++                ret = process_ctrl(received_ctrl,items,nb_poll_item);
++                ret_str = "OK";
++            }
++            catch (zmq::error_t &e)
++            {
++                ret_str = e.what();
++            }
++            catch (Tango::DevFailed &e)
++            {
++                ret_str = e.errors[0].desc;
++            }
++
++            zmq::message_t reply(ret_str.size());
++            ::memcpy((void *)reply.data(),ret_str.data(),ret_str.size());
++            control_sock->send(reply);
++
++            if (ret == true)
++            {
++                delete heartbeat_sub_sock;
++                delete control_sock;
++                delete [] items;
++
++                break;
++            }
++            items[0].revents = 0;
++        }
++
++//
+ // Something received by the event socket (mcast transport)?
+ // What is stored in the zmq::pollitem_t structure is the real C
+ // zmq socket, not the C++ zmq::socket_t class instance
+@@ -2172,12 +2172,6 @@ void ZmqEventConsumer::push_zmq_event(string &ev_name,unsigned char endian,zmq::
+                         EventQueue *ev_queue;
+                         ev_queue = esspos->ev_queue;
+ 
+-                        if (cb_ctr == cb_nb)
+-                        {
+-                            map_lock = false;
+-                            map_modification_lock.readerOut();
+-                        }
+-
+                         if ((ev_attr_conf == false) && (ev_attr_ready == false))
+                         {
+                             EventData *event_data;
+@@ -2348,21 +2342,11 @@ void ZmqEventConsumer::push_zmq_event(string &ev_name,unsigned char endian,zmq::
+                             }
+                         }
+                     }
+-                    else // id < 0
+-                    {
+-                        if (cb_ctr == cb_nb)
+-                        {
+-                            map_lock = false;
+-                            map_modification_lock.readerOut();
+-                        }
+-
+-                        if ((ev_attr_conf == false) && (ev_attr_ready == false))
+-                            delete dev_attr;
+-                        else if (ev_attr_ready == false)
+-                            delete attr_info_ex;
+-                    }
+                 } // End of for
+ 
++				map_lock = false;
++				map_modification_lock.readerOut();
++
+                 delete missed_event_data;
+                 delete missed_conf_event_data;
+                 delete missed_ready_event_data;
+@@ -2706,6 +2690,8 @@ DelayEvent::DelayEvent(EventConsumer *ec):released(false),eve_con(NULL)
+             buffer[length] = ZMQ_DELAY_EVENT;
+             length++;
+ 
++			eve_con->subscription_mutex.lock();
++
+ //
+ // Send command to main ZMQ thread
+ //
+@@ -2718,6 +2704,8 @@ DelayEvent::DelayEvent(EventConsumer *ec):released(false),eve_con(NULL)
+         }
+         catch (zmq::error_t &e)
+         {
++			eve_con->subscription_mutex.unlock();
++
+             TangoSys_OMemStream o;
+ 
+             o << "Failed to delay event!\n";
+@@ -2735,6 +2723,8 @@ DelayEvent::DelayEvent(EventConsumer *ec):released(false),eve_con(NULL)
+ 
+         if (reply.size() != 2)
+         {
++			eve_con->subscription_mutex.unlock();
++
+             char err_mess[512];
+             ::memcpy(err_mess,reply.data(),reply.size());
+             err_mess[reply.size()] = '\0';
+@@ -2791,9 +2781,12 @@ void DelayEvent::release()
+ 
+             sender.recv(&reply);
+             released = true;
++			eve_con->subscription_mutex.unlock();
+         }
+         catch (zmq::error_t &e)
+         {
++			eve_con->subscription_mutex.unlock();
++
+             TangoSys_OMemStream o;
+ 
+             o << "Failed to delay event!\n";
diff --git a/debian/patches/series b/debian/patches/series
index c282b92..0c3efc8 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@
 0003-debian-notify_daemon.patch
 0004-upstream-fix-p805_1.patch
 0005-fix-forwaded-upstream-add-LIBZMQ_LIBS-to-libtango.patch
+0006-upstream-fix-p805_2.patch

-- 
TANGO distributed control system.



More information about the debian-science-commits mailing list