projects
/
metaproxy-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
New log method for package class
[metaproxy-moved-to-github.git]
/
src
/
origin.cpp
diff --git
a/src/origin.cpp
b/src/origin.cpp
index
ac2da44
..
f76a4d6
100644
(file)
--- a/
src/origin.cpp
+++ b/
src/origin.cpp
@@
-1,5
+1,5
@@
/* This file is part of Metaproxy.
/* This file is part of Metaproxy.
- Copyright (C) 2005-2009 Index Data
+ Copyright (C) 2005-2011 Index Data
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Metaproxy is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-16,8
+16,8
@@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-//#include "config.hpp"
-#include "origin.hpp"
+#include "config.hpp"
+#include <metaproxy/origin.hpp>
#include <iostream>
#include <iostream>
@@
-67,18
+67,25
@@
void mp::Origin::set_tcpip_address(std::string addr, unsigned long s)
m_origin_id = s;
}
m_origin_id = s;
}
+void mp::Origin::set_custom_session(const std::string &s)
+{
+ m_custom_session = s;
+}
+
std::string mp::Origin::get_address()
{
return m_address;
}
std::string mp::Origin::get_address()
{
return m_address;
}
-std::ostream& std::operator<<(std::ostream& os, mp::Origin& o)
+std::ostream& std::operator<<(std::ostream& os, const mp::Origin& o)
{
{
- if (o.m_address != "")
+ if (o.m_address.length())
os << o.m_address;
else
os << "0";
os << ":" << o.m_origin_id;
os << o.m_address;
else
os << "0";
os << ":" << o.m_origin_id;
+ if (o.m_custom_session.length())
+ os << ":" << o.m_custom_session;
return os;
}
return os;
}