summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
db7203a)
The ID is specified by using x-session-id argument for the SRU URL.
It is attached to the origin instance and passed down the chain.
/// get tcpip address
std::string get_address();
/// get tcpip address
std::string get_address();
+
+ void set_custom_session(const std::string &s);
private:
friend std::ostream&
std::operator<<(std::ostream& os, metaproxy_1::Origin& o);
private:
friend std::ostream&
std::operator<<(std::ostream& os, metaproxy_1::Origin& o);
std::string m_listen_host;
unsigned int m_listen_port;
int m_max_sockets;
std::string m_listen_host;
unsigned int m_listen_port;
int m_max_sockets;
+ std::string m_custom_session;
{
package.origin().set_max_sockets(atoi(arg->value));
}
{
package.origin().set_max_sockets(atoi(arg->value));
}
+ else if (!strcmp(arg->name, "x-session-id"))
+ {
+ package.origin().set_custom_session(arg->value);
+ }
+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, mp::Origin& o)
{
+ 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;