[tango] 02/07: Imported Upstream version 9.2.1+dfsg
Frédéric-Emmanuel Picca
picca at moszumanska.debian.org
Wed Mar 16 17:33:53 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 1dff876d7b416db5ceb6ca1505c702dab3f88602
Author: Picca Frédéric-Emmanuel <picca at debian.org>
Date: Fri Mar 11 18:27:09 2016 +0100
Imported Upstream version 9.2.1+dfsg
---
README | 16 +++++++++-------
TANGO_CHANGES | 7 +++++--
configure | 22 +++++++++++-----------
configure.ac | 4 ++--
cppserver/database/DataBase.cpp | 8 ++++----
cppserver/database/stored_proc.sql.in | 24 ++++++++++++------------
lib/cpp/client/Database.h | 3 +++
lib/cpp/client/dbapi_base.cpp | 11 +++++++++--
lib/cpp/client/devapi_base.cpp | 11 +++--------
lib/cpp/client/event.cpp | 20 ++++++++++----------
lib/cpp/client/eventconsumer.h | 2 +-
lib/cpp/client/zmqeventconsumer.cpp | 31 ++++++++++++++-----------------
lib/cpp/server/device_3.cpp | 9 ++++-----
lib/cpp/server/deviceclass.cpp | 11 +++++++----
lib/cpp/server/tango_const.h | 4 ++--
lib/cpp/server/zmqeventsupplier.cpp | 16 ++++++++--------
lib/java/Makefile.am | 2 +-
lib/java/Makefile.in | 2 +-
pogo/preferences/common_target.opt | 35 +++++++++++++++++++++++------------
pogo/preferences/tango.opt.in | 12 +++++++-----
pogo/templates/cpp/Makefile | 2 +-
21 files changed, 137 insertions(+), 115 deletions(-)
diff --git a/README b/README
index 3c4785e..5aeeda1 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
- TANGO source code release version 9.2.0 - README (02/2016)
+ TANGO source code release version 9.2.1 - README (03/2016)
==========================================================
@@ -26,7 +26,7 @@ This is the README for the TANGO source code release. TANGO is a
toolkit for building object oriented control systems based on CORBA ans ZMQ.
TANGO is a joint effort of the several European research institutes.
-This source code release is based on the latest version of TANGO 9 (9.2.0)
+This source code release is based on the latest version of TANGO 9 (9.2.1)
and is intended for Unix platforms. A binary version for Windows of TANGO
is available. The source code contained in this package
runs on Windows but the Makefile don't.
@@ -211,7 +211,7 @@ ready to be installed.
Example:
Source code location: ../..
- Version: 9.2.0
+ Version: 9.2.1
Compiler: gcc,g++
OMNIORB PATH: /segfs/tango/ORB/omniORB4.2.1/ubuntu1404
@@ -527,13 +527,13 @@ documentation, news and to download add-on packages.
See the file TANGO_CHANGES to get an overview of all modification
between the different Tango library versions.
-Changes between Tango distribution 9.1.0 and 9.2.0
+Changes between Tango distribution 9.1.0 and 9.2.1
--------------------------------------------------
-- Updated C++ library to Release 9.2.0
+- Updated C++ library to Release 9.2.1
- Updated Jive to Release 6.9
- Updated atkpanel to Release 5.4
-- Updated Pogo to Release 9.2.2
+- Updated Pogo to Release 9.2.4
- Updated DbServer to Release 5.4 (stored procedure release 1.11)
- Updated JTango to Release 9.0.7
- Updated ATK to Release 9.1.13
@@ -546,7 +546,9 @@ Changes between Tango distribution 9.1.0 and 9.2.0
- SourceForge bug 762 : TangoTest : SegFault writing to long_spectrum attribute
- SourceForge bug 763 : DBserver : NULL insertion in NOT NULL columns
- SourceForge bug 766 : Starter : memory leak
-- SourceForge bug 772 : Pogo : Fix makefile dependencies to prevent unnecessary rebuilds
+- SourceForge bug 772 : Makefile dependencies to prevent unnecessary rebuilt
+- SourceForge bug 778 : tango.opt defines wrong LDFLAGS
+- SourceForge bug 782 : Bug in common_target.opt file
- TangoTest : Memory not freed in delete_device() method
- DBserver : Add command DbGetForwardedAttributeForDevice
- DBserver : Change default value for accessed columns in 2 tables
diff --git a/TANGO_CHANGES b/TANGO_CHANGES
index 536a0e1..5a445b4 100644
--- a/TANGO_CHANGES
+++ b/TANGO_CHANGES
@@ -1,8 +1,8 @@
TANGO history file
-01/2016 *******************************************************
+03/2016 *******************************************************
* *
- * Tango release 9.2.0 : Changes since version 9.1.0 *
+ * Tango release 9.2.1 : Changes since version 9.1.0 *
* *
*******************************************************
@@ -16,6 +16,8 @@ Changes in Tango itself
-----------------------
- Apply changes sent by Szeged university for better code
+- Improve way TANGO_HOST is used when the host name specified in TANGO_HOST is a host alias name
+- Method DeviceClass::get_pipe_list() with device name as arg. is now case independant
Bug fixes
---------
@@ -31,6 +33,7 @@ Bug recorded in SourceForge:
- 761 : Crash when pushing events from my own thread
- 765 : Asyn re-connection after admin device DevRestart command
- 767 : push_change_event("State") crashes device server process
+- 783 : Tango server NO_SYNC serial mode
Other bugs
diff --git a/configure b/configure
index 0e2c665..d2c31cc 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
#! /bin/sh
# From configure.ac Revision.
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Tango 9.2.0.
+# Generated by GNU Autoconf 2.69 for Tango 9.2.1.
#
# Report bugs to <tango at esrf.fr>.
#
@@ -591,8 +591,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='Tango'
PACKAGE_TARNAME='tango'
-PACKAGE_VERSION='9.2.0'
-PACKAGE_STRING='Tango 9.2.0'
+PACKAGE_VERSION='9.2.1'
+PACKAGE_STRING='Tango 9.2.1'
PACKAGE_BUGREPORT='tango at esrf.fr'
PACKAGE_URL=''
@@ -1433,7 +1433,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures Tango 9.2.0 to adapt to many kinds of systems.
+\`configure' configures Tango 9.2.1 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1503,7 +1503,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of Tango 9.2.0:";;
+ short | recursive ) echo "Configuration of Tango 9.2.1:";;
esac
cat <<\_ACEOF
@@ -1657,7 +1657,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-Tango configure 9.2.0
+Tango configure 9.2.1
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2292,7 +2292,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by Tango $as_me 9.2.0, which was
+It was created by Tango $as_me 9.2.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -3262,7 +3262,7 @@ fi
# Define the identity of the package.
PACKAGE='tango'
- VERSION='9.2.0'
+ VERSION='9.2.1'
cat >>confdefs.h <<_ACEOF
@@ -3418,7 +3418,7 @@ ac_config_headers="$ac_config_headers ac_config.h.tmp"
# interface numbers in the range from number `CURRENT - AGE' to
# `CURRENT'.
-VERSION_INFO=11:0:2
+VERSION_INFO=11:1:2
# Checks for programs.
@@ -19721,7 +19721,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by Tango $as_me 9.2.0, which was
+This file was extended by Tango $as_me 9.2.1, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -19787,7 +19787,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-Tango config.status 9.2.0
+Tango config.status 9.2.1
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff --git a/configure.ac b/configure.ac
index b12c1a3..f057358 100644
--- a/configure.ac
+++ b/configure.ac
@@ -20,7 +20,7 @@
# packagename, the second is the version used for the tar file,
# the third is an email address for bug reports (shouldn't be necessary),
# and the fourth argument is
-AC_INIT(Tango,9.2.0,tango at esrf.fr,tango)
+AC_INIT(Tango,9.2.1,tango at esrf.fr,tango)
AC_CONFIG_AUX_DIR(config)
AC_CONFIG_MACRO_DIR([m4])
@@ -63,7 +63,7 @@ AC_CONFIG_HEADERS(ac_config.h.tmp)
# interface numbers in the range from number `CURRENT - AGE' to
# `CURRENT'.
-VERSION_INFO=11:0:2
+VERSION_INFO=11:1:2
# Checks for programs.
diff --git a/cppserver/database/DataBase.cpp b/cppserver/database/DataBase.cpp
index e5f1ad1..0efb145 100644
--- a/cppserver/database/DataBase.cpp
+++ b/cppserver/database/DataBase.cpp
@@ -1,5 +1,5 @@
/*----- PROTECTED REGION ID(DataBase.cpp) ENABLED START -----*/
-static const char *RcsId = "$Id: DataBase.cpp 29163 2016-02-10 15:23:26Z taurel $";
+static const char *RcsId = "$Id: DataBase.cpp 29197 2016-02-16 09:13:48Z taurel $";
//=============================================================================
//
// file : DataBase.cpp
@@ -34,8 +34,8 @@ static const char *RcsId = "$Id: DataBase.cpp 29163 2016-02-10 15:23:26Z taurel
// You should have received a copy of the GNU General Public License
// along with Tango. If not, see <http://www.gnu.org/licenses/>.
//
-// $Revision: 29163 $
-// $Date: 2016-02-10 16:23:26 +0100 (Wed, 10 Feb 2016) $
+// $Revision: 29197 $
+// $Date: 2016-02-16 10:13:48 +0100 (Tue, 16 Feb 2016) $
//
// $HeadURL: https://svn.code.sf.net/p/tango-cs/code/classes/cpp/dbase/tags/DataBase-Release-5.4/DataBase.cpp $
//
@@ -7184,7 +7184,7 @@ Tango::DevVarStringArray *DataBase::db_get_data_for_server_cache(const Tango::De
sql_query = sql_query + mysql_db_name;
sql_query = sql_query + ".ds_start('" + svc + "','" + host + "'," + tmp_var_name + ")";
sql_query = sql_query + ";SELECT " + tmp_var_name;
-// cout << "Query = " << sql_query << endl;
+// cout << "Query = " << sql_query << endl;
int con_nb = get_connection();
if (mysql_real_query(conn_pool[con_nb].db, sql_query.c_str(),sql_query.length()) != 0)
diff --git a/cppserver/database/stored_proc.sql.in b/cppserver/database/stored_proc.sql.in
index 0deaffc..ca209f5 100644
--- a/cppserver/database/stored_proc.sql.in
+++ b/cppserver/database/stored_proc.sql.in
@@ -38,7 +38,7 @@ DELIMITER |
CREATE PROCEDURE @TANGO_DB_NAME at .ds_start
(IN ds_name VARCHAR(255),
IN recev_host VARCHAR(255),
- OUT res_str BLOB) READS SQL DATA COMMENT 'release 1.11'
+ OUT res_str MEDIUMBLOB) READS SQL DATA COMMENT 'release 1.11'
proc: BEGIN
DECLARE notifd_event_name VARCHAR(255) DEFAULT 'notifd/factory/';
@@ -286,7 +286,7 @@ END proc|
CREATE PROCEDURE @TANGO_DB_NAME at .import_event
(IN ev_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_ior TEXT;
DECLARE tmp_version VARCHAR(8);
@@ -341,7 +341,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .import_device
(IN dev_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
imp_proc: BEGIN
DECLARE tmp_ior TEXT;
DECLARE tmp_version VARCHAR(8);
@@ -397,7 +397,7 @@ END imp_proc |
CREATE PROCEDURE @TANGO_DB_NAME at .class_prop
(IN class_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name VARCHAR(255);
DECLARE tmp_value TEXT;
@@ -459,7 +459,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .dev_prop
(IN dev_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name VARCHAR(255);
DECLARE tmp_value TEXT;
@@ -522,7 +522,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .class_att_prop
(IN class_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name,tmp_attribute VARCHAR(255);
DECLARE known_att VARCHAR(255) DEFAULT '';
@@ -623,7 +623,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .dev_att_prop
(IN dev_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name,tmp_attribute VARCHAR(255);
DECLARE known_att VARCHAR(255) DEFAULT '';
@@ -724,7 +724,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .get_dev_list
(IN class_name VARCHAR(255), IN serv VARCHAR(255),
- INOUT res_str BLOB, OUT d_list TEXT, OUT d_num INT) READS SQL DATA
+ INOUT res_str MEDIUMBLOB, OUT d_list TEXT, OUT d_num INT) READS SQL DATA
BEGIN
DECLARE tmp_name VARCHAR(255);
DECLARE done INT DEFAULT 0;
@@ -773,7 +773,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .class_pipe_prop
(IN class_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name,tmp_pipe VARCHAR(255);
DECLARE known_pipe VARCHAR(255) DEFAULT '';
@@ -874,7 +874,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .dev_pipe_prop
(IN dev_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name,tmp_pipe VARCHAR(255);
DECLARE known_pipe VARCHAR(255) DEFAULT '';
@@ -973,7 +973,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .proc_release_nb
-(INOUT res_str BLOB) READS SQL DATA
+(INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_rel VARCHAR(255);
DECLARE not_found INT DEFAULT 0;
@@ -1003,7 +1003,7 @@ END |
CREATE PROCEDURE @TANGO_DB_NAME at .obj_prop
(IN obj_name VARCHAR(255),OUT serv_dev_name VARCHAR(255),
- INOUT res_str BLOB) READS SQL DATA
+ INOUT res_str MEDIUMBLOB) READS SQL DATA
BEGIN
DECLARE tmp_name VARCHAR(255);
DECLARE tmp_value TEXT;
diff --git a/lib/cpp/client/Database.h b/lib/cpp/client/Database.h
index bc1f06e..f94205c 100644
--- a/lib/cpp/client/Database.h
+++ b/lib/cpp/client/Database.h
@@ -61,6 +61,8 @@ private :
{
public:
DatabaseExt() {};
+
+ string orig_tango_host;
};
#ifdef HAS_UNIQUE_PTR
@@ -1840,6 +1842,7 @@ public :
vector<string> &get_multi_port() {return multi_db_port;}
const string &get_file_name();
+ const string &get_orig_tango_host() {return ext->orig_tango_host;}
#ifdef _TG_WINDOWS_
Database(CORBA::ORB *orb,string &,string &);
diff --git a/lib/cpp/client/dbapi_base.cpp b/lib/cpp/client/dbapi_base.cpp
index 7605d94..9d3e9b8 100644
--- a/lib/cpp/client/dbapi_base.cpp
+++ b/lib/cpp/client/dbapi_base.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: dbapi_base.cpp 28018 2015-06-05 10:55:32Z taurel $\n$Name$";
+static const char *RcsId = "$Id: dbapi_base.cpp 29267 2016-02-24 16:59:11Z taurel $\n$Name$";
//
// cpp - C++ source code file for TANGO dbapi class Database
@@ -270,11 +270,18 @@ void Database::check_tango_host(const char *tango_host_env_c_str)
}
//
-// Get FQDN
+// Get FQDN but store original TANGO_HOST (for event in case of alias used in TANGO_HOST)
//
+ ext->orig_tango_host = db_host;
if (db_host.find('.') == string::npos)
+ {
get_fqdn(db_host);
+ string::size_type pos = db_host.find('.');
+ string fq = db_host.substr(pos);
+ ext->orig_tango_host = ext->orig_tango_host + fq;
+ }
+
}
host = db_host;
diff --git a/lib/cpp/client/devapi_base.cpp b/lib/cpp/client/devapi_base.cpp
index 2b07bfa..d46e956 100644
--- a/lib/cpp/client/devapi_base.cpp
+++ b/lib/cpp/client/devapi_base.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: devapi_base.cpp 28946 2015-12-18 09:00:25Z taurel $\n$Name$";
+static const char *RcsId = "$Id: devapi_base.cpp 29267 2016-02-24 16:59:11Z taurel $\n$Name$";
//===================================================================================================================
//
@@ -25,7 +25,7 @@ static const char *RcsId = "$Id: devapi_base.cpp 28946 2015-12-18 09:00:25Z taur
// You should have received a copy of the GNU Lesser General Public License along with Tango.
// If not, see <http://www.gnu.org/licenses/>.
//
-// $Revision: 28946 $
+// $Revision: 29267 $
//
//===================================================================================================================
@@ -1078,12 +1078,7 @@ void Connection::get_fqdn(string &the_host)
if (host_found == false && nb_loop == 1 && i == (ip_list.size() - 1))
{
- if (pos != string::npos)
- {
- the_host = the_host + myhost.substr(pos);
- }
- else
- the_host = myhost;
+ the_host = myhost;
}
}
}
diff --git a/lib/cpp/client/event.cpp b/lib/cpp/client/event.cpp
index 4adb048..3a5f2aa 100644
--- a/lib/cpp/client/event.cpp
+++ b/lib/cpp/client/event.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: event.cpp 28853 2015-12-07 13:38:45Z taurel $";
+static const char *RcsId = "$Id: event.cpp 29267 2016-02-24 16:59:11Z taurel $";
//====================================================================================================================
//
@@ -27,7 +27,7 @@ static const char *RcsId = "$Id: event.cpp 28853 2015-12-07 13:38:45Z taurel $";
// You should have received a copy of the GNU Lesser General Public License along with Tango.
// If not, see <http://www.gnu.org/licenses/>.
//
-// $Revision: 28853 $
+// $Revision: 29267 $
//
//
//====================================================================================================================
@@ -161,6 +161,7 @@ EventConsumer::EventConsumer(ApiUtil *api_ptr)
Database *db = (api_ptr->get_db_vect())[api_ptr->get_db_ind()];
string prefix = "tango://" + db->get_db_host() + ':' + db->get_db_port() + '/' ;
env_var_fqdn_prefix.push_back(prefix);
+
if (db->is_multi_tango_host() == true)
{
vector<string> &tango_hosts = db->get_multi_host();
@@ -269,17 +270,17 @@ void EventConsumer::get_cs_tango_host(Database *db)
if (pos != string::npos)
lower_vs.erase(pos);
- string db_host_lower(db->get_db_host());
- transform(db_host_lower.begin(),db_host_lower.end(),db_host_lower.begin(),::tolower);
+ string tg_host(db->get_orig_tango_host());
+ transform(tg_host.begin(),tg_host.end(),tg_host.begin(),::tolower);
- if (lower_vs != db_host_lower)
+ if (lower_vs != tg_host)
{
- if (alias_map.find(db_host_lower) == alias_map.end())
+ if (alias_map.find(tg_host) == alias_map.end())
{
#ifdef INIT_LIST
- alias_map.insert({db_host_lower,lower_vs});
+ alias_map.insert({lower_vs,tg_host});
#else
- alias_map.insert(make_pair(db_host_lower,lower_vs));
+ alias_map.insert(make_pair(lower_vs,tg_host));
#endif
}
}
@@ -1757,7 +1758,7 @@ int EventConsumer::connect_event(DeviceProxy *device,
new_event_callback.callback_monitor->timeout(1000);
//
-// If we have a CS for which TANGO_HOST is one alias, replace alias by original name in map key
+// If we have a CS for which TANGO_HOST is one alias (host name in alias map), set flag in map
//
pos = local_callback_key.find(':',6);
@@ -1765,7 +1766,6 @@ int EventConsumer::connect_event(DeviceProxy *device,
map<string,string>::iterator ite = alias_map.find(tg_host);
if (ite != alias_map.end())
{
- local_callback_key.replace(8,tg_host.size(),ite->second);
new_event_callback.alias_used = true;
}
diff --git a/lib/cpp/client/eventconsumer.h b/lib/cpp/client/eventconsumer.h
index 22d9a4f..dc9722e 100644
--- a/lib/cpp/client/eventconsumer.h
+++ b/lib/cpp/client/eventconsumer.h
@@ -471,7 +471,7 @@ protected :
static vector<EventNotConnected> event_not_connected;
static int subscribe_event_id; // unique event id
static vector<string> env_var_fqdn_prefix;
- static map<std::string,std::string> alias_map; // key - alias, value - real host name
+ static map<std::string,std::string> alias_map; // key - real host name, value - alias
static omni_mutex ev_consumer_inst_mutex;
diff --git a/lib/cpp/client/zmqeventconsumer.cpp b/lib/cpp/client/zmqeventconsumer.cpp
index ff26ed3..a7749ca 100644
--- a/lib/cpp/client/zmqeventconsumer.cpp
+++ b/lib/cpp/client/zmqeventconsumer.cpp
@@ -1426,23 +1426,6 @@ void ZmqEventConsumer::connect_event_channel(string &channel_name,TANGO_UNUSED(D
{
EventChannelStruct new_event_channel_struct;
-//
-// If we have a CS for which TANGO_HOST is one alias, replace alias by original name in map key
-// but don't do this if the TANGO_HOSt has been specified as aone IP address
-//
-
- string::size_type pos = channel_name.find(':',6);
- string tg_host = channel_name.substr(8,pos - 8);
- int nb_point = count(tg_host.begin(),tg_host.end(),'.');
- if (nb_point != 3)
- {
- map<string,string>::iterator ite = alias_map.find(tg_host);
- if (ite != alias_map.end())
- {
- channel_name.replace(8,tg_host.size(),ite->second);
- }
- }
-
new_event_channel_struct.last_heartbeat = time(NULL);
new_event_channel_struct.heartbeat_skipped = false;
new_event_channel_struct.adm_device_proxy = NULL;
@@ -1968,6 +1951,11 @@ void ZmqEventConsumer::push_zmq_event(string &ev_name,unsigned char endian,zmq::
bool map_lock = true;
// 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());
+// for (const auto &elem : channel_map)
+// printf("Key in channel_map = %s\n",elem.first.c_str());
+
//
// Search for entry within the event_callback map using the event name received in the event
//
@@ -2074,11 +2062,20 @@ void ZmqEventConsumer::push_zmq_event(string &ev_name,unsigned char endian,zmq::
if (pos1 != string::npos)
event_name.erase(0,EVENT_COMPAT_IDL5_SIZE);
+//
+// If the client TANGO_HOST is one alias, replace in the event name the host name by the alias
+//
+
string full_att_name;
if (evt_cb.alias_used == true)
{
pos = evt_cb.fully_qualified_event_name.rfind('.');
full_att_name = evt_cb.fully_qualified_event_name.substr(0,pos);
+
+ string::size_type pos = full_att_name.find(':',8);
+ string host = full_att_name.substr(8,pos - 8);
+ map<string,string>::iterator ite = alias_map.find(host);
+ full_att_name.replace(8,pos - 8,ite->second);
}
else
{
diff --git a/lib/cpp/server/device_3.cpp b/lib/cpp/server/device_3.cpp
index ab620c7..2320a30 100644
--- a/lib/cpp/server/device_3.cpp
+++ b/lib/cpp/server/device_3.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: device_3.cpp 28853 2015-12-07 13:38:45Z taurel $\n$Name$";
+static const char *RcsId = "$Id: device_3.cpp 29394 2016-03-05 09:25:38Z taurel $\n$Name$";
//====================================================================================================================
//
@@ -29,7 +29,7 @@ static const char *RcsId = "$Id: device_3.cpp 28853 2015-12-07 13:38:45Z taurel
// You should have received a copy of the GNU Lesser General Public License along with Tango.
// If not, see <http://www.gnu.org/licenses/>.
//
-// $Revision: 28853 $
+// $Revision: 29394 $
//
//====================================================================================================================
@@ -390,7 +390,6 @@ void Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray& nam
att.throw_startup_exception("Device_3Impl::read_attributes_no_except()");
wanted_w_attr.push_back(x);
wanted_attr.push_back(x);
- att.set_value_flag(false);
att.get_when().tv_sec = 0;
att.save_alarm_quality();
}
@@ -412,7 +411,6 @@ void Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray& nam
if(att.is_startup_exception())
att.throw_startup_exception("Device_3Impl::read_attributes_no_except()");
wanted_attr.push_back(x);
- att.set_value_flag(false);
att.get_when().tv_sec = 0;
att.save_alarm_quality();
}
@@ -434,7 +432,6 @@ void Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray& nam
if(att.is_startup_exception())
att.throw_startup_exception("Device_3Impl::read_attributes_no_except()");
wanted_attr.push_back(x);
- att.set_value_flag(false);
att.get_when().tv_sec = 0;
att.save_alarm_quality();
}
@@ -538,6 +535,8 @@ void Device_3Impl::read_attributes_no_except(const Tango::DevVarStringArray& nam
// device startup sequence
//
+ att.set_value_flag(false);
+
if (att.is_mem_exception() == false)
attr_vect[att.get_attr_idx()]->read(this,att);
else
diff --git a/lib/cpp/server/deviceclass.cpp b/lib/cpp/server/deviceclass.cpp
index 9cf9e4b..a295ce2 100644
--- a/lib/cpp/server/deviceclass.cpp
+++ b/lib/cpp/server/deviceclass.cpp
@@ -1,4 +1,4 @@
-static const char *RcsId = "$Id: deviceclass.cpp 28932 2015-12-16 11:51:47Z taurel $\n$Name$";
+static const char *RcsId = "$Id: deviceclass.cpp 29261 2016-02-23 14:08:21Z taurel $\n$Name$";
//+=================================================================================================================
//
@@ -29,7 +29,7 @@ static const char *RcsId = "$Id: deviceclass.cpp 28932 2015-12-16 11:51:47Z taur
// You should have received a copy of the GNU Lesser General Public License along with Tango.
// If not, see <http://www.gnu.org/licenses/>.
//
-// $Revision: 28932 $
+// $Revision: 29261 $
//
//-================================================================================================================
@@ -1730,13 +1730,16 @@ void DeviceClass::create_device_pipe(DeviceClass *cl,DeviceImpl *dev)
//
// argument :
// in :
-// - dev_name : The device name (lower case letters)
+// - dev_name : The device name
//
//------------------------------------------------------------------------------------------------------------------
vector<Pipe *> &DeviceClass::get_pipe_list(const string &dev_name)
{
- map<string,vector<Pipe *> >::iterator ite = ext->dev_pipe_list.find(dev_name);
+ string local_dev_name(dev_name);
+ transform(local_dev_name.begin(),local_dev_name.end(),local_dev_name.begin(),::tolower);
+
+ map<string,vector<Pipe *> >::iterator ite = ext->dev_pipe_list.find(local_dev_name);
if (ite == ext->dev_pipe_list.end())
{
cout3 << "DeviceClass::get_pipe_by_name throwing exception" << endl;
diff --git a/lib/cpp/server/tango_const.h b/lib/cpp/server/tango_const.h
index 74621aa..2b67269 100644
--- a/lib/cpp/server/tango_const.h
+++ b/lib/cpp/server/tango_const.h
@@ -25,7 +25,7 @@
// You should have received a copy of the GNU Lesser General Public License along with Tango.
// If not, see <http://www.gnu.org/licenses/>.
//
-// $Revision: 29023 $
+// $Revision: 29394 $
//
//=====================================================================================================================
@@ -42,7 +42,7 @@ namespace Tango
#define TANGO_VERSION_MAJOR 9
#define TANGO_VERSION_MINOR 2
-#define TANGO_VERSION_PATCH 0
+#define TANGO_VERSION_PATCH 1
#define TANGO_BASE_CLASS Tango::Device_5Impl
diff --git a/lib/cpp/server/zmqeventsupplier.cpp b/lib/cpp/server/zmqeventsupplier.cpp
index 3a77f38..cfd2c71 100644
--- a/lib/cpp/server/zmqeventsupplier.cpp
+++ b/lib/cpp/server/zmqeventsupplier.cpp
@@ -114,14 +114,14 @@ name_specified(false),double_send(0),double_send_heartbeat(false)
#ifndef _TG_WINDOWS_
if (specified_addr.empty() == false && inet_pton(AF_INET,specified_addr.c_str(),buf) == 0)
#else
- struct sockaddr_storage ss;
- int size = sizeof(ss);
- char src_copy[INET6_ADDRSTRLEN+1];
-
- ZeroMemory(&ss, sizeof(ss));
- strncpy (src_copy, specified_addr.c_str(), INET6_ADDRSTRLEN+1);
- src_copy[INET6_ADDRSTRLEN] = 0;
-
+ struct sockaddr_storage ss;
+ int size = sizeof(ss);
+ char src_copy[INET6_ADDRSTRLEN+1];
+
+ ZeroMemory(&ss, sizeof(ss));
+ strncpy (src_copy, specified_addr.c_str(), INET6_ADDRSTRLEN+1);
+ src_copy[INET6_ADDRSTRLEN] = 0;
+
if (specified_addr.empty() == false && WSAStringToAddress(src_copy,AF_INET,NULL,(struct sockaddr *)&ss,&size) != 0)
#endif
specified_name = true;
diff --git a/lib/java/Makefile.am b/lib/java/Makefile.am
index e4e86c8..ff49960 100644
--- a/lib/java/Makefile.am
+++ b/lib/java/Makefile.am
@@ -9,7 +9,7 @@ dist_java_DATA=\
DeviceTree-1.9.6.jar \
ATKCore-9.1.13.jar \
Jive-6.9.jar \
- org.tango.pogo-9.2.2.jar \
+ org.tango.pogo-9.2.4.jar \
atkpanel-5.4.jar \
log4j-1.2.15.jar \
AtkTuning-2.8.jar \
diff --git a/lib/java/Makefile.in b/lib/java/Makefile.in
index 3bf12e2..3979f81 100644
--- a/lib/java/Makefile.in
+++ b/lib/java/Makefile.in
@@ -350,7 +350,7 @@ dist_java_DATA = \
DeviceTree-1.9.6.jar \
ATKCore-9.1.13.jar \
Jive-6.9.jar \
- org.tango.pogo-9.2.2.jar \
+ org.tango.pogo-9.2.4.jar \
atkpanel-5.4.jar \
log4j-1.2.15.jar \
AtkTuning-2.8.jar \
diff --git a/pogo/preferences/common_target.opt b/pogo/preferences/common_target.opt
index 20961cc..93b7dbf 100644
--- a/pogo/preferences/common_target.opt
+++ b/pogo/preferences/common_target.opt
@@ -1,6 +1,6 @@
INSTALL_DIR=$(TANGO_HOME)/bin
-#create all directories
+# create all directories
directories := $(shell mkdir -p $(OUTPUT_DIR); for FILE in $(SVC_OBJS); do mkdir -p `dirname $$FILE`; done)
#------------------------------------------------------------------------------
@@ -55,7 +55,7 @@ $(OBJDIR)/%.o: %.cc
#------------------------------------------------------------------------------
#-- rule: $(CPPDIRUSER)/*.cc
#------------------------------------------------------------------------------
-$(OBJDIR)/%.o: $(CPPDIRUSER)/%.cc
+$(OBJDIR)/%.o: $(CPPDIRUSER)/%.cxx
@echo "Compiling $< ..."
$(CXX) $(CXXFLAGS) -c $< -o $@
@@ -69,7 +69,7 @@ $(OBJDIR)/%.o: %.c $(SVC_INCL)
#------------------------------------------------------------------------------
#-- rule: $(CPPDIRUSER)/*.c
#------------------------------------------------------------------------------
-$(OBJDIR)/%.o: $(CPPDIRUSER)/%.c $(SVC_INCL)
+$(OBJDIR)/%.o: $(CPPDIRUSER)/%.c
@echo "Compiling $< ..."
$(CXX) $(CXXFLAGS) -c $< -o $@
@@ -78,7 +78,19 @@ $(OBJDIR)/%.o: $(CPPDIRUSER)/%.c $(SVC_INCL)
#------------------------------------------------------------------------------
#-- all:
#------------------------------------------------------------------------------
+
+ifeq ($(PROJECT_TYPE),DEVICE)
+all: $(SPECIFIC_ALL_TARGET) $(OUTPUT_DIR)/$(PROJECT_NAME)
+endif
+ifeq ($(PROJECT_TYPE),SIMPLE_EXE)
all: $(SPECIFIC_ALL_TARGET) $(OUTPUT_DIR)/$(PROJECT_NAME)
+endif
+ifeq ($(PROJECT_TYPE),STATIC_LIB)
+all: $(SPECIFIC_ALL_TARGET) $(OUTPUT_DIR)/lib$(PROJECT_NAME).a
+endif
+ifeq ($(PROJECT_TYPE),SHARED_LIB)
+all: $(SPECIFIC_ALL_TARGET) $(OUTPUT_DIR)/lib$(PROJECT_NAME).so
+endif
#------------------------------------------------------------------------------
#-- $(PROJECT_NAME) for DEVICE:
@@ -104,17 +116,17 @@ endif
#-- $(PROJECT_NAME) for STATIC_LIB:
#------------------------------------------------------------------------------
ifeq ($(PROJECT_TYPE),STATIC_LIB)
-(OUTPUT_DIR)/lib$(PROJECT_NAME).a: $(SVC_OBJS)
+$(OUTPUT_DIR)/lib$(PROJECT_NAME).a: $(LIB_OBJS)
@echo "Creating static library "$(OUTPUT_DIR)/lib$(PROJECT_NAME).a
ifdef EXTERNAL_LIBS
- mkdir -p $(OBJDIR)/external_libs
- cd $(OBJDIR)/external_libs && \
+ mkdir -p $(OBJ_DIR)/external_libs
+ cd $(OBJ_DIR)/external_libs && \
for EXTERNAL_LIB in $(EXTERNAL_LIBS); do ar x $$EXTERNAL_LIB; done && \
cd -
- ar rcs $(OUTPUT_DIR)/lib$(PROJECT_NAME).a $(SVC_OBJS) $(OBJDIR)/external_libs/*.o
- rm -f $(OBJDIR)/external_libs/*
+ ar rcs $(OUTPUT_DIR)/lib$(PROJECT_NAME).a $(LIB_OBJS) $(OBJ_DIR)/external_libs/*.o
+ rm -f $(OBJ_DIR)/external_libs/*
else
- ar rcs $(OUTPUT_DIR)/lib$(PROJECT_NAME).a $(SVC_OBJS)
+ ar rcs $(OUTPUT_DIR)/lib$(PROJECT_NAME).a $(LIB_OBJS)
endif
endif
@@ -122,10 +134,9 @@ endif
#-- $(PROJECT_NAME) for SHARED_LIB:
#------------------------------------------------------------------------------
ifeq ($(PROJECT_TYPE),SHARED_LIB)
-$(PROJECT_NAME): diretories $(SVC_OBJS)
-(OUTPUT_DIR)/lib$(PROJECT_NAME).so: $(SVC_OBJS)
+$(OUTPUT_DIR)/lib$(PROJECT_NAME).so: $(LIB_OBJS)
@echo "Linking shared library "$(OUTPUT_DIR)/lib$(PROJECT_NAME).so
- $(CXX) $(SVC_OBJS) $(LDFLAGS) -o $(OUTPUT_DIR)/lib$(PROJECT_NAME).so
+ $(CXX) $(LIB_OBJS) $(LDFLAGS) -o $(OUTPUT_DIR)/lib$(PROJECT_NAME).so
@echo "Link successfull"
endif
diff --git a/pogo/preferences/tango.opt.in b/pogo/preferences/tango.opt.in
index 93845ee..b7ff900 100644
--- a/pogo/preferences/tango.opt.in
+++ b/pogo/preferences/tango.opt.in
@@ -120,12 +120,12 @@ ifeq ($(PROJECT_TYPE),DEVICE)
OUTPUT_DIR= $(HOME)/DeviceServers
else
ifeq ($(PROJECT_TYPE),STATIC_LIB)
- OUTPUT_DIR= ../lib
+ OUTPUT_DIR= lib
else
ifeq ($(PROJECT_TYPE),SHARED_LIB)
- OUTPUT_DIR= ../lib
+ OUTPUT_DIR= lib
else
- OUTPUT_DIR= ../bin
+ OUTPUT_DIR= bin
endif
endif
endif
@@ -196,8 +196,10 @@ endif
LDFLAGS += $(LDFLAGS_USER) $(LIB_DIR_USER)
ifeq ($(TANGO_REQUIRED),TRUE)
- LDFLAGS += -L$(TANGO_HOME)/lib -ltango -llog4tango
- LDFLAGS += -L$(OMNI_HOME)/lib -L$(ZMQ_HOME)/lib -lCOS4 -lomniORB4 -lomniDynamic4 -lomnithread -lzmq
+ OMNI_LIB = $(shell pkg-config --libs-only-L omniORB4)
+ ZMQ_LIB = $(shell pkg-config --libs-only-L libzmq)
+ TANGO_LIB = $(shell pkg-config --libs tango)
+ LDFLAGS += $(OMNI_LIB) $(ZMQ_LIB) $(TANGO_LIB)
endif
LDFLAGS += -ldl -lpthread -lstdc++
diff --git a/pogo/templates/cpp/Makefile b/pogo/templates/cpp/Makefile
index ab566bc..db534d3 100644
--- a/pogo/templates/cpp/Makefile
+++ b/pogo/templates/cpp/Makefile
@@ -32,7 +32,7 @@ RELEASE = Release_$(MAJOR_VERS)_$(MINOR_VERS)
# Set default home directories
#-----------------------------------------
-TANGO_HOME = /home/taurel/tmp/tango_920
+TANGO_HOME = /home/taurel/tmp/tango_921
CPP_SERVERS = $(TANGO_HOME)/cppserver
ifdef no_debug
--
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