X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=src%2Forigin.cpp;h=6901a92b7c6257b75bfdaf3a6ab545a47c61ba93;hb=cdb9d2053fa54a0a2d7da1514164de3bbe52edb3;hp=d49ba1e4d2481e1a5b1310a833ec5056755cb1b4;hpb=b0c61b7f8b17d876c88347a96c246c47493140da;p=metaproxy-moved-to-github.git diff --git a/src/origin.cpp b/src/origin.cpp index d49ba1e..6901a92 100644 --- a/src/origin.cpp +++ b/src/origin.cpp @@ -1,5 +1,5 @@ /* This file is part of Metaproxy. - Copyright (C) 2005-2010 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 @@ -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 */ -//#include "config.hpp" -#include "origin.hpp" +#include "config.hpp" +#include #include @@ -67,6 +67,11 @@ void mp::Origin::set_tcpip_address(std::string addr, unsigned long 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; @@ -74,11 +79,13 @@ std::string mp::Origin::get_address() std::ostream& std::operator<<(std::ostream& os, mp::Origin& o) { - if (o.m_address != "") + if (o.m_address.length()) 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; }