Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
# Conflicts:
#	resip/stack/resiprocate_14_0.vcxproj.filters
  • Loading branch information
sgodin committed Oct 28, 2016
2 parents 97f591c + ef8f9e9 commit 6d8cdb8
Show file tree
Hide file tree
Showing 36 changed files with 881 additions and 19 deletions.
6 changes: 6 additions & 0 deletions apps/telepathy/Connection.cxx
Expand Up @@ -489,6 +489,12 @@ tr::Connection::onMessageReceived(const resip::SipMessage& message)
return;
}

if ( message.header(h_ContentType) != Mime("text", "plain") )
{
qWarning() << "Ignoring a message of type " << message.header(h_ContentType).type().c_str() << "/" << message.header(h_ContentType).subType().c_str();
return;
}

TextChannelPtr textChannel = TextChannelPtr::dynamicCast(channel->interface(TP_QT_IFACE_CHANNEL_TYPE_TEXT));

if ( !textChannel )
Expand Down
1 change: 0 additions & 1 deletion build/travis/configure
Expand Up @@ -9,7 +9,6 @@ set -e
--with-mysql \
--with-postgresql \
--with-apps \
--with-ichat-gw \
--enable-dtls \
--enable-ipv6 \
--with-radcli \
Expand Down
15 changes: 14 additions & 1 deletion repro/ReproRunner.cxx
Expand Up @@ -34,6 +34,7 @@
#include "resip/stack/SipStack.hxx"
#include "resip/stack/Compression.hxx"
#include "resip/stack/EventStackThread.hxx"
#include "resip/stack/HEPSipMessageLoggingHandler.hxx"
#include "resip/stack/InteropHelper.hxx"
#include "resip/stack/ConnectionManager.hxx"
#include "resip/stack/WsCookieContextFactory.hxx"
Expand Down Expand Up @@ -785,7 +786,19 @@ ReproRunner::createSipStack()
mSipStack->setExternalStatsHandler(this);

// Set Transport SipMessage Logging Handler - if enabled
if(mProxyConfig->getConfigBool("EnableSipMessageLogging", false))
Data captureHost;
mProxyConfig->getConfigValue("CaptureHost", captureHost);
if(!captureHost.empty())
{
int capturePort = mProxyConfig->getConfigInt("CapturePort", 9060);
int captureAgentID = mProxyConfig->getConfigInt("CaptureAgentID", 2001);
#ifndef WIN32 // Does not currently build on windows - TODO
mSipStack->setTransportSipMessageLoggingHandler(SharedPtr<HEPSipMessageLoggingHandler>(new HEPSipMessageLoggingHandler(captureHost, capturePort, captureAgentID)));
#else
CritLog(<< "HOMER Capture support is not currently implemented for Windows");
#endif
}
else if(mProxyConfig->getConfigBool("EnableSipMessageLogging", false))
{
mSipStack->setTransportSipMessageLoggingHandler(SharedPtr<ReproSipMessageLoggingHandler>(new ReproSipMessageLoggingHandler));
}
Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/AmIResponsible.hxx
Expand Up @@ -15,7 +15,7 @@ namespace repro

virtual processor_action_t process(RequestContext &);

private:
protected:
bool mAlwaysAllowRelaying;
};
}
Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/CertificateAuthenticator.hxx
Expand Up @@ -30,7 +30,7 @@ namespace repro
virtual processor_action_t process(RequestContext &);
virtual void dump(EncodeStream &os) const;

private:
protected:
bool isTrustedSource(const std::list<resip::Data>& peerNames);
bool authorizedForThisIdentity(RequestContext& context, const std::list<resip::Data>& peerNames, resip::Uri &fromUri);

Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/CookieAuthenticator.hxx
Expand Up @@ -22,7 +22,7 @@ namespace repro
virtual processor_action_t process(RequestContext &);
virtual void dump(EncodeStream &os) const;

private:
protected:
std::auto_ptr<resip::ExtensionHeader> mWsCookieExtraHeader;

bool cookieUriMatch(const resip::Uri &first, const resip::Uri &second);
Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/DigestAuthenticator.hxx
Expand Up @@ -32,7 +32,7 @@ namespace repro
virtual resip::Data getRealm(RequestContext &);
virtual bool isMyRealm(RequestContext &, const resip::Data& realm);

private:
protected:
Dispatcher* mAuthRequestDispatcher;
resip::Data mStaticRealm;
bool mNoIdentityHeaders;
Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/IsTrustedNode.hxx
Expand Up @@ -20,7 +20,7 @@ namespace repro

virtual processor_action_t process(RequestContext &);

private:
protected:
AclStore& mAclStore;
};
}
Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/LocationServer.hxx
Expand Up @@ -23,7 +23,7 @@ namespace repro

virtual processor_action_t process(RequestContext &);

private:
protected:
resip::RegistrationPersistenceManager& mStore;
Dispatcher* mUserInfoDispatcher;
};
Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/OutboundTargetHandler.hxx
Expand Up @@ -15,7 +15,7 @@ class OutboundTargetHandler : public Processor

virtual processor_action_t process(RequestContext &);

private:
protected:
resip::RegistrationPersistenceManager& mRegStore;
};

Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/SimpleStaticRoute.hxx
Expand Up @@ -16,7 +16,7 @@ class SimpleStaticRoute: public Processor

virtual processor_action_t process(RequestContext &);

private:
protected:
resip::NameAddrs mRouteSet;
};

Expand Down
2 changes: 1 addition & 1 deletion repro/monkeys/StaticRoute.hxx
Expand Up @@ -16,7 +16,7 @@ class StaticRoute: public Processor

virtual processor_action_t process(RequestContext &);

private:
protected:
RouteStore& mRouteStore;
bool mNoChallenge;
bool mParallelForkStaticRoutes;
Expand Down
15 changes: 15 additions & 0 deletions repro/repro.config
Expand Up @@ -32,8 +32,23 @@ LogFileMaxBytes = 5242880

# Enable INFO level SIP Message Logging - outputs all SIP messages
# sent and/or received to log file in an easy to read format
# This option has no effect if logging to HOMER is enabled
# by setting CaptureHost
EnableSipMessageLogging = false

# Specify the HOMER SIP capture server hostname
# If CaptureHost is commented/not defined, there is no default value and
# repro doesn't attempt to send any HEP packets.
#CaptureHost = localhost

# Specify the HOMER SIP capture server UDP port
# If not defined, the default value, 9060, is used
#CapturePort = 9060

# Specify the HOMER Capture Agent ID
# The default value is 2001
CaptureAgentID = 2001

########################################################
# Transport settings
########################################################
Expand Down
12 changes: 11 additions & 1 deletion resip/stack/Connection.cxx
Expand Up @@ -541,7 +541,17 @@ Connection::processPollEvent(FdPollEventMask mask) {
}
}

bool Connection::isServer()const{ return mIsServer; }
bool
Connection::isServer() const
{
return mIsServer;
}

void
Connection::invokeAfterSocketCreationFunc() const
{
mTransport->callSocketFunc(getSocket());
}

/* ====================================================================
* The Vovida Software License, Version 1.0
Expand Down
2 changes: 2 additions & 0 deletions resip/stack/Connection.hxx
Expand Up @@ -115,6 +115,8 @@ class Connection : public ConnectionBase,
/* callback method of FdPollItemIf */
virtual void processPollEvent(FdPollEventMask mask);

virtual void invokeAfterSocketCreationFunc() const;

private:
ConnectionManager& getConnectionManager() const;
void removeFrontOutstandingSend();
Expand Down
9 changes: 9 additions & 0 deletions resip/stack/ConnectionManager.cxx
Expand Up @@ -462,6 +462,15 @@ ConnectionManager::setPollGrp(FdPollGrp *grp)
mPollGrp = grp;
}

void
ConnectionManager::invokeAfterSocketCreationFunc() const
{
for (AddrMap::const_iterator it = mAddrMap.begin(); it != mAddrMap.end(); it++)
{
it->second->invokeAfterSocketCreationFunc();
}
}

/* ====================================================================
* The Vovida Software License, Version 1.0
*
Expand Down
2 changes: 2 additions & 0 deletions resip/stack/ConnectionManager.hxx
Expand Up @@ -47,6 +47,8 @@ class ConnectionManager
void buildFdSet(FdSet& fdset);
void process(FdSet& fdset);

virtual void invokeAfterSocketCreationFunc() const;

private:
void addToWritable(Connection* conn); // add the specified conn to end
void removeFromWritable(Connection* conn); // remove the current mWriteMark
Expand Down

0 comments on commit 6d8cdb8

Please sign in to comment.