[libjingle/f14] 0.5.8

Tom Callaway spot at fedoraproject.org
Tue Jul 26 20:38:58 UTC 2011


commit f04fc36a729ef3a323b26ee8d5f2bb28879adaf5
Author: Tom "spot" Callaway <tcallawa at redhat.com>
Date:   Tue Jul 26 16:38:46 2011 -0400

    0.5.8

 libjingle-0.5.8-1.fc16.src.rpm           |  Bin 0 -> 1203519 bytes
 libjingle-0.5.8-NULL-fix.patch           |   12 +
 libjingle-0.5.8-build-sanity.patch       |  634 ++++++++++++++++
 libjingle-0.5.8-chromium14-changes.patch | 1204 ++++++++++++++++++++++++++++++
 libjingle-0.5.8-config-linux.patch       |   26 +
 libjingle-0.5.8-devicemanager-fix.patch  |   20 +
 libjingle-0.5.8-fixmacro.patch           |   12 +
 libjingle-0.5.8-statfix.patch            |   22 +
 libjingle-0.5.8-system-expat.patch       |   36 +
 libjingle-0.5.8-system-srtp.patch        |   12 +
 libjingle-0.5.8-v4llookup-fix.patch      |   20 +
 libjingle.spec                           |   32 +-
 sources                                  |    2 +-
 13 files changed, 2019 insertions(+), 13 deletions(-)
---
diff --git a/libjingle-0.5.8-1.fc16.src.rpm b/libjingle-0.5.8-1.fc16.src.rpm
new file mode 100644
index 0000000..62217d9
Binary files /dev/null and b/libjingle-0.5.8-1.fc16.src.rpm differ
diff --git a/libjingle-0.5.8-NULL-fix.patch b/libjingle-0.5.8-NULL-fix.patch
new file mode 100644
index 0000000..8dda42d
--- /dev/null
+++ b/libjingle-0.5.8-NULL-fix.patch
@@ -0,0 +1,12 @@
+diff -up libjingle-0.5.8/talk/base/event.cc.NULL libjingle-0.5.8/talk/base/event.cc
+--- libjingle-0.5.8/talk/base/event.cc.NULL	2011-07-25 11:36:53.561334546 -0400
++++ libjingle-0.5.8/talk/base/event.cc	2011-07-25 11:38:10.157417620 -0400
+@@ -26,6 +26,7 @@
+  */
+ 
+ #include "talk/base/event.h"
++#include <stdlib.h>
+ 
+ #if defined(WIN32)
+ #include <windows.h>
+diff -up libjingle-0.5.8/talk/base/sigslot.h.NULL libjingle-0.5.8/talk/base/sigslot.h
diff --git a/libjingle-0.5.8-build-sanity.patch b/libjingle-0.5.8-build-sanity.patch
new file mode 100644
index 0000000..9b1bc95
--- /dev/null
+++ b/libjingle-0.5.8-build-sanity.patch
@@ -0,0 +1,634 @@
+diff -up libjingle-0.5.8/configure.ac.SANITY libjingle-0.5.8/configure.ac
+--- libjingle-0.5.8/configure.ac.SANITY	2011-07-26 16:23:18.232768372 -0400
++++ libjingle-0.5.8/configure.ac	2011-07-26 16:25:29.909261951 -0400
+@@ -0,0 +1,86 @@
++AC_INIT([libjingle], [0.5.1], [google-talk-open at googlegroups.com])
++AC_CANONICAL_SYSTEM
++AM_CONFIG_HEADER(config.h)
++AM_INIT_AUTOMAKE([dist-zip])
++AC_PROG_CC
++AC_PROG_CXX
++AM_PROG_LIBTOOL
++LIBTOOL="$LIBTOOL --silent"
++AC_PROG_INSTALL
++AC_DEFINE(PRODUCTION_BUILD, 1, [Build as a production build])
++AC_DEFINE(PRODUCTION, 1, [Build as a production build])
++AC_DEFINE(POSIX, 1, [If we're using configure, we're on POSIX])
++AC_DEFINE(FEATURE_ENABLE_VOICEMAIL, 1, [voice mail])
++AC_DEFINE(LOGGING, 1, [Logging])
++
++LIBJINGLE_MAJORMINOR=0.5
++AC_SUBST(LIBJINGLE_MAJORMINOR)
++
++LIBJINGLE_LIBRARY_VERSION=1:0:0
++AC_SUBST(LIBJINGLE_LIBRARY_VERSION)
++
++HAVE_EXPAT=no
++AC_CHECK_LIB(expat, XML_ParserCreate, HAVE_EXPAT="yes")
++if test "x$HAVE_EXPAT" = xyes ; then
++  EXPAT_LIBS="-lexpat"
++  AC_SUBST(EXPAT_LIBS)
++else
++  AC_ERROR([Expat is required to build libjingle. You can get it from http://expat.sourceforge.net/])
++fi
++
++if test `uname -s` = Linux ; then
++  AC_DEFINE(LINUX, 1, [Building on Linux])
++  HAVE_ALSA=no
++  AC_CHECK_LIB(asound, snd_pcm_open, HAVE_ALSA="yes")
++  if test "x$HAVE_ALSA" = xyes ; then
++    ALSA_LIBS="-lasound"
++    AC_SUBST(ALSA_LIBS)
++    AC_DEFINE(HAVE_ALSA, 1, [Using ALSA])
++  else
++    AC_ERROR([libasound is required to build libjingle. You can get it from http://www.alsa-project.org/])
++  fi
++
++  AC_CHECK_HEADER(openssl/ssl.h, HAVE_OPENSSL_SSL_H=yes, HAVE_OPENSSL_SSL_H=no)
++  if test x$HAVE_OPENSSL_SSL_H = xyes; then
++    AC_DEFINE(HAVE_OPENSSL_SSL_H, 1, [Found openssl/ssl.h])
++    PKG_CHECK_MODULES(OPENSSL, openssl >= 0.9.7g, HAVE_OPENSSL=yes, HAVE_OPENSSL=no)
++    AC_SUBST(OPENSSL_CFLAGS)
++    AC_SUBST(OPENSSL_LIBS)
++    AC_DEFINE(SSL_USE_OPENSSL, 1, [Using OpenSSL])
++    AC_DEFINE(FEATURE_ENABLE_SSL, 1, [SSL Enabled])
++    CPPFLAGS+="$OPENSSL_CFLAGS"
++    LDFLAGS+=" $OPENSSL_LIBS"
++  else
++    AC_DEFINE(HAVE_OPENSSL_SSL_H, 0, [Did not find openssl/ssl.h])
++  fi
++fi
++
++PKG_CHECK_MODULES(LIBSRTP, libsrtp >= 1.4.4, enable_srtp=yes, enable_srtp=no)
++if test x$enable_srtp = xno ; then
++        HAVE_SRTP=no
++else
++        AC_SUBST(LIBSRTP_CFLAGS)
++       	AC_SUBST(LIBSRTP_LIBS)
++        AC_DEFINE(HAVE_SRTP, 1, [libSRTP provides SRTP supprt])
++fi
++
++AC_OUTPUT([Makefile
++          talk/Makefile
++          talk/base/Makefile
++          talk/examples/Makefile
++          talk/examples/login/Makefile
++          talk/examples/call/Makefile
++          talk/p2p/Makefile
++          talk/p2p/base/Makefile
++          talk/p2p/client/Makefile
++          talk/session/Makefile
++          talk/session/tunnel/Makefile
++          talk/session/phone/Makefile
++          talk/xmllite/Makefile
++          talk/xmpp/Makefile
++          pkgconfig/Makefile
++          pkgconfig/jinglebase.pc
++          pkgconfig/jinglep2p.pc
++          pkgconfig/jinglesessiontunnel.pc
++          pkgconfig/jinglesessionphone.pc
++        ])
+diff -up libjingle-0.5.8/Makefile.am.SANITY libjingle-0.5.8/Makefile.am
+--- libjingle-0.5.8/Makefile.am.SANITY	2011-07-26 16:23:18.232768372 -0400
++++ libjingle-0.5.8/Makefile.am	2011-07-26 16:23:18.232768372 -0400
+@@ -0,0 +1,4 @@
++SUBDIRS=talk pkgconfig
++
++configdir = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk
++config_HEADERS = config.h
+diff -up libjingle-0.5.8/pkgconfig/jinglebase.pc.in.SANITY libjingle-0.5.8/pkgconfig/jinglebase.pc.in
+--- libjingle-0.5.8/pkgconfig/jinglebase.pc.in.SANITY	2011-07-26 16:23:18.232768372 -0400
++++ libjingle-0.5.8/pkgconfig/jinglebase.pc.in	2011-07-26 16:23:18.232768372 -0400
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: jinglebase
++Description: Jingle Base Library
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lpthread -ljinglebase
++Cflags: -I${includedir}/libjingle- at LIBJINGLE_MAJORMINOR@ -DPOSIX
++
+diff -up libjingle-0.5.8/pkgconfig/jinglep2p.pc.in.SANITY libjingle-0.5.8/pkgconfig/jinglep2p.pc.in
+--- libjingle-0.5.8/pkgconfig/jinglep2p.pc.in.SANITY	2011-07-26 16:23:18.233768361 -0400
++++ libjingle-0.5.8/pkgconfig/jinglep2p.pc.in	2011-07-26 16:23:18.233768361 -0400
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: jinglep2p
++Description: Jingle P2P Library
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -ljinglep2pbase -ljinglep2pclient -ljinglexmllite -ljinglexmpp -lexpat
++Cflags: -I${includedir}/libjingle- at LIBJINGLE_MAJORMINOR@ -DPOSIX
++
+diff -up libjingle-0.5.8/pkgconfig/jinglesessionphone.pc.in.SANITY libjingle-0.5.8/pkgconfig/jinglesessionphone.pc.in
+--- libjingle-0.5.8/pkgconfig/jinglesessionphone.pc.in.SANITY	2011-07-26 16:23:18.233768361 -0400
++++ libjingle-0.5.8/pkgconfig/jinglesessionphone.pc.in	2011-07-26 16:23:18.233768361 -0400
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: jinglesessionphone
++Description: Jingle Session Phone Library
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lpthread -ljinglesessionphone -lsrtp
++Cflags: -I${includedir}/libjingle- at LIBJINGLE_MAJORMINOR@ -DPOSIX
++
+diff -up libjingle-0.5.8/pkgconfig/jinglesessiontunnel.pc.in.SANITY libjingle-0.5.8/pkgconfig/jinglesessiontunnel.pc.in
+--- libjingle-0.5.8/pkgconfig/jinglesessiontunnel.pc.in.SANITY	2011-07-26 16:23:18.233768361 -0400
++++ libjingle-0.5.8/pkgconfig/jinglesessiontunnel.pc.in	2011-07-26 16:23:18.233768361 -0400
+@@ -0,0 +1,12 @@
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++Name: jinglesessiontunnel
++Description: Jingle Session Tunnel Library
++Requires:
++Version: @VERSION@
++Libs: -L${libdir} -lpthread -ljinglesessiontunnel
++Cflags: -I${includedir}/libjingle- at LIBJINGLE_MAJORMINOR@ -DPOSIX
++
+diff -up libjingle-0.5.8/pkgconfig/Makefile.am.SANITY libjingle-0.5.8/pkgconfig/Makefile.am
+--- libjingle-0.5.8/pkgconfig/Makefile.am.SANITY	2011-07-26 16:23:18.233768361 -0400
++++ libjingle-0.5.8/pkgconfig/Makefile.am	2011-07-26 16:23:18.233768361 -0400
+@@ -0,0 +1,20 @@
++### all of the standard pc files we need to generate
++pcfiles = jinglebase- at LIBJINGLE_MAJORMINOR@.pc jinglep2p- at LIBJINGLE_MAJORMINOR@.pc jinglesessiontunnel- at LIBJINGLE_MAJORMINOR@.pc jinglesessionphone- at LIBJINGLE_MAJORMINOR@.pc
++
++all-local: $(pcfiles)
++
++### how to generate pc files
++%- at LIBJINGLE_MAJORMINOR@.pc: %.pc
++	cp $< $@
++
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = $(pcfiles)
++
++EXTRA_DIST =							\
++	jinglebase.pc.in					\
++	jinglep2p.pc.in						\
++	jinglesessionphone.pc.in				\
++	jinglesessiontunnel.pc.in
++
++CLEANFILES = $(pcfiles)
++
+diff -up libjingle-0.5.8/talk/base/Makefile.am.SANITY libjingle-0.5.8/talk/base/Makefile.am
+--- libjingle-0.5.8/talk/base/Makefile.am.SANITY	2011-07-26 16:23:18.234768350 -0400
++++ libjingle-0.5.8/talk/base/Makefile.am	2011-07-26 16:26:00.332913735 -0400
+@@ -0,0 +1,142 @@
++lib_LTLIBRARIES = libjinglebase.la
++
++libjinglebase_la_SOURCES = asyncfile.cc \
++                            asynchttprequest.cc \
++                            asyncsocket.cc \
++                            asynctcpsocket.cc \
++                            asyncudpsocket.cc \
++                            autodetectproxy.cc \
++                            base64.cc \
++                            basicpacketsocketfactory.cc \
++                            bytebuffer.cc \
++                            checks.cc \
++                            common.cc \
++                            diskcache.cc \
++                            event.cc \
++                            fileutils.cc \
++                            firewallsocketserver.cc \
++                            flags.cc \
++                            helpers.cc \
++                            host.cc \
++                            httpbase.cc \
++                            httpclient.cc \
++                            httpcommon.cc \
++                            httprequest.cc \
++                            linux.cc \
++                            logging.cc \
++                            md5c.c \
++                            messagehandler.cc \
++                            messagequeue.cc \
++                            nethelpers.cc \
++                            network.cc \
++                            openssladapter.cc \
++                            opensslidentity.cc \
++                            opensslstreamadapter.cc \
++                            pathutils.cc \
++                            physicalsocketserver.cc \
++                            proxydetect.cc \
++                            proxyinfo.cc \
++                            ratetracker.cc \
++                            signalthread.cc \
++                            socketadapters.cc \
++                            socketaddress.cc \
++                            socketaddresspair.cc \
++                            socketpool.cc \
++                            socketstream.cc \
++                            ssladapter.cc \
++                            sslsocketfactory.cc \
++                            sslstreamadapter.cc \
++                            stream.cc \
++                            stringdigest.cc \
++                            stringencode.cc \
++                            stringutils.cc \
++                            task.cc \
++                            taskparent.cc \
++                            taskrunner.cc \
++                            thread.cc \
++                            time.cc \
++                            unixfilesystem.cc \
++                            urlencode.cc
++
++libjinglebase_la_LIBADD = -lrt
++
++libjinglebase_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION)
++
++libjinglebase_includedir = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/base
++
++libjinglebase_include_HEADERS = asyncfile.h \
++                            asynchttprequest.h \
++                            asyncpacketsocket.h \
++                            asyncsocket.h \
++                            asynctcpsocket.h \
++                            asyncudpsocket.h \
++                            autodetectproxy.h \
++                            base64.h \
++                            basicdefs.h \
++                            basicpacketsocketfactory.h \
++                            basictypes.h \
++                            bytebuffer.h \
++                            byteorder.h \
++                            checks.h \
++                            common.h \
++                            constructormagic.h \
++                            criticalsection.h \
++                            cryptstring.h \
++                            diskcache.h \
++                            event.h \
++                            fileutils.h \
++                            firewallsocketserver.h \
++                            flags.h \
++                            helpers.h \
++                            host.h \
++                            httpbase.h \
++                            httpclient.h \
++                            httpcommon-inl.h \
++                            httpcommon.h \
++                            httprequest.h \
++                            linked_ptr.h \
++                            linux.h \
++                            logging.h \
++                            md5.h \
++                            messagehandler.h \
++                            messagequeue.h \
++                            nethelpers.h \
++                            network.h \
++                            openssladapter.h \       
++                            opensslidentity.h \      
++                            opensslstreamadapter.h \
++                            packetsocketfactory.h \
++                            pathutils.h \
++                            physicalsocketserver.h \
++                            proxydetect.h \
++                            proxyinfo.h \
++                            ratetracker.h \
++                            scoped_ptr.h \
++                            sec_buffer.h \
++                            signalthread.h \
++                            sigslot.h \
++                            sigslotrepeater.h \
++                            socket.h \
++                            socketadapters.h \
++                            socketaddress.h \
++                            socketaddresspair.h \
++                            socketfactory.h \
++                            socketpool.h \
++                            socketserver.h \
++                            socketstream.h \
++                            ssladapter.h \
++                            sslsocketfactory.h \
++                            sslstreamadapter.h \
++                            stream.h \
++                            stringdigest.h \
++                            stringencode.h \
++                            stringutils.h \
++                            task.h \
++                            taskparent.h \
++                            taskrunner.h \
++                            thread.h \
++                            time.h \
++                            unixfilesystem.h \
++                            urlencode.h
++
++AM_CXXFLAGS = -DPOSIX
+diff -up libjingle-0.5.8/talk/examples/call/Makefile.am.SANITY libjingle-0.5.8/talk/examples/call/Makefile.am
+--- libjingle-0.5.8/talk/examples/call/Makefile.am.SANITY	2011-07-26 16:23:18.234768350 -0400
++++ libjingle-0.5.8/talk/examples/call/Makefile.am	2011-07-26 16:23:18.234768350 -0400
+@@ -0,0 +1,23 @@
++bin_PROGRAMS = call
++call_CXXFLAGS = $(AM_CXXFLAGS)
++call_SOURCES = call_main.cc \
++               callclient.cc \
++               console.cc \
++               discoitemsquerytask.cc \
++               friendinvitesendtask.cc \
++               mucinviterecvtask.cc \
++               mucinvitesendtask.cc \
++               presenceouttask.cc \
++               presencepushtask.cc \
++               voicemailjidrequester.cc
++noinst_HEADERS = callclient.h  console.h
++call_LDADD = $(top_srcdir)/talk/examples/login/libxmpphelp.la \
++               $(top_srcdir)/talk/session/phone/libjinglesessionphone.la \
++               $(top_srcdir)/talk/p2p/client/libjinglep2pclient.la \
++               $(top_srcdir)/talk/p2p/base/libjinglep2pbase.la \
++               $(top_srcdir)/talk/xmpp/libjinglexmpp.la \
++               $(top_srcdir)/talk/xmllite/libjinglexmllite.la \
++               $(top_srcdir)/talk/base/libjinglebase.la \
++               $(EXPAT_LIBS) $(OPENSSL_LIBS) $(ALSA_LIBS) $(LIBSRTP_LIBS) -lpthread
++AM_CPPFLAGS  = -DPOSIX
++
+diff -up libjingle-0.5.8/talk/examples/login/Makefile.am.SANITY libjingle-0.5.8/talk/examples/login/Makefile.am
+--- libjingle-0.5.8/talk/examples/login/Makefile.am.SANITY	2011-07-26 16:23:18.234768350 -0400
++++ libjingle-0.5.8/talk/examples/login/Makefile.am	2011-07-26 16:23:18.234768350 -0400
+@@ -0,0 +1,24 @@
++noinst_LTLIBRARIES= libxmpphelp.la
++libxmpphelp_la_SOURCES = xmppsocket.cc \
++                         xmppauth.cc \
++                         xmpppump.cc
++
++noinst_HEADERS = xmppauth.h \
++                 xmpppump.h \
++                 xmppsocket.h \
++                 xmppthread.h \
++                 jingleinfotask.h \
++                 presenceouttask.h \
++                 presencepushtask.h \
++                 status.h
++
++bin_PROGRAMS = login
++login_CXXFLAGS = $(AM_CXXFLAGS)
++login_SOURCES = login_main.cc xmppthread.cc
++login_LDADD =  $(top_srcdir)/talk/xmpp/libjinglexmpp.la \
++               $(top_srcdir)/talk/xmllite/libjinglexmllite.la \
++               $(top_srcdir)/talk/base/libjinglebase.la \
++               $(top_srcdir)/talk/examples/login/libxmpphelp.la \
++               $(EXPAT_LIBS) $(OPENSSL_LIBS) -lpthread
++AM_CPPFLAGS  = -DPOSIX
++
+diff -up libjingle-0.5.8/talk/examples/Makefile.am.SANITY libjingle-0.5.8/talk/examples/Makefile.am
+--- libjingle-0.5.8/talk/examples/Makefile.am.SANITY	2011-07-26 16:23:18.234768350 -0400
++++ libjingle-0.5.8/talk/examples/Makefile.am	2011-07-26 16:23:18.234768350 -0400
+@@ -0,0 +1 @@
++SUBDIRS=login call
+diff -up libjingle-0.5.8/talk/Makefile.am.SANITY libjingle-0.5.8/talk/Makefile.am
+--- libjingle-0.5.8/talk/Makefile.am.SANITY	2011-07-26 16:23:18.235768339 -0400
++++ libjingle-0.5.8/talk/Makefile.am	2011-07-26 16:23:18.235768339 -0400
+@@ -0,0 +1 @@
++SUBDIRS=base xmllite xmpp p2p session
+diff -up libjingle-0.5.8/talk/p2p/base/Makefile.am.SANITY libjingle-0.5.8/talk/p2p/base/Makefile.am
+--- libjingle-0.5.8/talk/p2p/base/Makefile.am.SANITY	2011-07-26 16:23:18.235768339 -0400
++++ libjingle-0.5.8/talk/p2p/base/Makefile.am	2011-07-26 16:23:18.235768339 -0400
+@@ -0,0 +1,74 @@
++lib_LTLIBRARIES = libjinglep2pbase.la
++
++libjinglep2pbase_la_SOURCES = stun.cc \
++                               port.cc \
++                               udpport.cc \
++                               tcpport.cc \
++                               stunport.cc \
++                               relayport.cc \
++                               relayserver.cc \
++                               stunrequest.cc \
++                               stunserver.cc \
++                               sessionmanager.cc \
++                               sessionmessages.cc \
++                               session.cc \
++                               sessiondescription.cc \
++                               transport.cc \
++                               transportchannel.cc \
++                               transportchannelproxy.cc \
++                               p2ptransport.cc \
++                               p2ptransportchannel.cc \
++                               rawtransport.cc \
++                               rawtransportchannel.cc \
++                               constants.cc \
++                               pseudotcp.cc \
++                               parsing.cc
++
++libjinglep2pbase_includedir  = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/p2p/base
++libjinglep2pbase_include_HEADERS = candidate.h \
++                               portallocator.h \
++                               relayport.h \
++                               session.h \
++                               stunport.h \
++                               tcpport.h \
++                               port.h \
++                               sessionid.h \
++                               stunrequest.h \
++                               udpport.h \
++                               pseudotcp.h \
++                               sessiondescription.h \
++                               sessionmanager.h \
++                               stun.h  \
++                               relayserver.h \
++                               stunserver.h \
++                               sessionclient.h \
++                               transport.h \
++                               transportchannel.h \
++                               transportchannelproxy.h \
++                               transportchannelimpl.h \
++                               p2ptransport.h \
++                               p2ptransportchannel.h \
++                               rawtransport.h \
++                               rawtransportchannel.h \
++                               constants.h \
++                               common.h \
++                               parsing.h \
++                               sessionmessages.h
++
++libjinglep2pbase_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION)
++libjinglep2pbase_la_LIBADD = $(top_srcdir)/talk/xmllite/libjinglexmllite.la \
++                             $(top_srcdir)/talk/xmpp/libjinglexmpp.la
++
++AM_CPPFLAGS = -DPOSIX -DENABLE_DEBUG -D_DEBUG -g
++
++P2PLIBS = libjinglep2pbase.la ../../base/libjinglebase.la -lpthread
++XMLLIBS = ../../xmllite/libjinglexmllite.la ../../xmpp/libjinglexmpp.la $(EXPAT_LIBS)
++
++bin_PROGRAMS = relayserver stunserver
++relayserver_SOURCES = relayserver.cc relayserver_main.cc
++relayserver_LDADD = $(P2PLIBS)
++relayserver_CPPFLAGS = $(AM_CPPFLAGS)
++
++stunserver_SOURCES = stunserver.cc stunserver_main.cc
++stunserver_LDADD = $(P2PLIBS)
++stunserver_CPPFLAGS = $(AM_CPPFLAGS)
+diff -up libjingle-0.5.8/talk/p2p/client/Makefile.am.SANITY libjingle-0.5.8/talk/p2p/client/Makefile.am
+--- libjingle-0.5.8/talk/p2p/client/Makefile.am.SANITY	2011-07-26 16:23:18.235768339 -0400
++++ libjingle-0.5.8/talk/p2p/client/Makefile.am	2011-07-26 16:23:18.235768339 -0400
+@@ -0,0 +1,18 @@
++lib_LTLIBRARIES = libjinglep2pclient.la
++
++libjinglep2pclient_la_SOURCES =  basicportallocator.cc \
++                                  httpportallocator.cc \
++                                  socketmonitor.cc
++
++libjinglep2pclient_includedir =  $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/p2p/client
++
++libjinglep2pclient_include_HEADERS = basicportallocator.h \
++                                  socketmonitor.h \
++                                  sessionmanagertask.h \
++                                  sessionsendtask.h \
++                                  httpportallocator.h
++
++libjinglep2pclient_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION)
++
++AM_CPPFLAGS = -I../../.. -DLINUX -DPOSIX -DINTERNAL_BUILD
++
+diff -up libjingle-0.5.8/talk/p2p/Makefile.am.SANITY libjingle-0.5.8/talk/p2p/Makefile.am
+--- libjingle-0.5.8/talk/p2p/Makefile.am.SANITY	2011-07-26 16:23:18.236768327 -0400
++++ libjingle-0.5.8/talk/p2p/Makefile.am	2011-07-26 16:23:18.235768339 -0400
+@@ -0,0 +1 @@
++SUBDIRS=base client
+diff -up libjingle-0.5.8/talk/session/Makefile.am.SANITY libjingle-0.5.8/talk/session/Makefile.am
+--- libjingle-0.5.8/talk/session/Makefile.am.SANITY	2011-07-26 16:23:18.236768327 -0400
++++ libjingle-0.5.8/talk/session/Makefile.am	2011-07-26 16:23:18.236768327 -0400
+@@ -0,0 +1 @@
++SUBDIRS = tunnel phone
+diff -up libjingle-0.5.8/talk/session/phone/Makefile.am.SANITY libjingle-0.5.8/talk/session/phone/Makefile.am
+--- libjingle-0.5.8/talk/session/phone/Makefile.am.SANITY	2011-07-26 16:23:18.236768327 -0400
++++ libjingle-0.5.8/talk/session/phone/Makefile.am	2011-07-26 16:23:18.236768327 -0400
+@@ -0,0 +1,39 @@
++lib_LTLIBRARIES = libjinglesessionphone.la
++
++libjinglesessionphone_la_SOURCES = audiomonitor.cc \
++                                    channelmanager.cc \
++                                    call.cc \
++                                    channel.cc \
++                                    codec.cc \
++                                    devicemanager.cc \
++                                    filemediaengine.cc \
++                                    libudevsymboltable.cc \
++                                    mediaengine.cc \
++                                    mediamonitor.cc \
++                                    mediasessionclient.cc \
++                                    rtpdump.cc \
++                                    soundclip.cc \
++                                    srtpfilter.cc \
++                                    v4llookup.cc
++
++libjinglesessionphone_includedir = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/session/phone
++libjinglesessionphone_include_HEADERS = audiomonitor.h \
++                                    channelmanager.h \
++                                    mediaengine.h \
++                                    voicechannel.h \
++                                    call.h \
++                                    mediachannel.h  \
++                                    codec.h \
++                                    channel.h \
++                                    filemediaengine.h \
++                                    libudevsymboltable.h \
++                                    mediasessionclient.h \
++                                    rtpdump.h \
++                                    srtpfilter.h \
++                                    videocommon.h
++
++libjinglesessionphone_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION)
++
++libjinglesessionphone_la_LIBADD = $(LIBSRTP_LIBS)
++
++AM_CPPFLAGS := -DPOSIX $(LIBSRTP_CFLAGS)
+diff -up libjingle-0.5.8/talk/session/tunnel/Makefile.am.SANITY libjingle-0.5.8/talk/session/tunnel/Makefile.am
+--- libjingle-0.5.8/talk/session/tunnel/Makefile.am.SANITY	2011-07-26 16:23:18.236768327 -0400
++++ libjingle-0.5.8/talk/session/tunnel/Makefile.am	2011-07-26 16:23:18.236768327 -0400
+@@ -0,0 +1,16 @@
++lib_LTLIBRARIES = libjinglesessiontunnel.la
++
++libjinglesessiontunnel_la_SOURCES = tunnelsessionclient.cc \
++                                     securetunnelsessionclient.cc \
++                                     pseudotcpchannel.cc
++
++libjinglesessiontunnel_includedir = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/session/tunnel
++
++libjinglesessiontunnel_include_HEADERS = tunnelsessionclient.h \
++                                          pseudotcpchannel.h \
++                                          securetunnelsessionclient.h
++
++libjinglesessiontunnel_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION)
++
++AM_CXXFLAGS = -DPOSIX
++
+diff -up libjingle-0.5.8/talk/xmllite/Makefile.am.SANITY libjingle-0.5.8/talk/xmllite/Makefile.am
+--- libjingle-0.5.8/talk/xmllite/Makefile.am.SANITY	2011-07-26 16:23:18.237768315 -0400
++++ libjingle-0.5.8/talk/xmllite/Makefile.am	2011-07-26 16:23:18.236768327 -0400
+@@ -0,0 +1,21 @@
++lib_LTLIBRARIES = libjinglexmllite.la
++
++libjinglexmllite_la_SOURCES = qname.cc \
++                               xmlbuilder.cc \
++                               xmlconstants.cc \
++                               xmlelement.cc \
++                               xmlnsstack.cc \
++                               xmlparser.cc \
++                               xmlprinter.cc
++
++libjinglexmllite_includedir = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/xmllite
++libjinglexmllite_include_HEADERS = qname.h \
++                               xmlbuilder.h \
++                               xmlconstants.h \
++                               xmlelement.h \
++                               xmlnsstack.h \
++                               xmlparser.h \
++                               xmlprinter.h
++AM_CPPFLAGS = -DPOSIX
++
++libjinglexmllite_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION) $(EXPAT_LIBS)
+diff -up libjingle-0.5.8/talk/xmpp/Makefile.am.SANITY libjingle-0.5.8/talk/xmpp/Makefile.am
+--- libjingle-0.5.8/talk/xmpp/Makefile.am.SANITY	2011-07-26 16:23:18.237768315 -0400
++++ libjingle-0.5.8/talk/xmpp/Makefile.am	2011-07-26 16:23:18.237768315 -0400
+@@ -0,0 +1,35 @@
++lib_LTLIBRARIES = libjinglexmpp.la
++
++libjinglexmpp_la_SOURCES = constants.cc \
++                            jid.cc \
++                            saslmechanism.cc \
++                            xmppclient.cc \
++                            xmppengineimpl.cc \
++                            xmppengineimpl_iq.cc \
++                            xmpplogintask.cc \
++                            xmppstanzaparser.cc \
++                            xmpptask.cc \
++                            ratelimitmanager.cc
++
++libjinglexmpp_includedir = $(includedir)/libjingle- at LIBJINGLE_MAJORMINOR@/talk/xmpp
++libjinglexmpp_include_HEADERS = asyncsocket.h \
++                            prexmppauth.h \
++                            saslhandler.h \
++                            xmpplogintask.h \
++                            jid.h \
++                            saslmechanism.h \
++                            xmppclient.h \
++                            constants.h \
++                            saslplainmechanism.h \
++                            xmppclientsettings.h \
++                            xmppstanzaparser.h \
++                            xmppengine.h \
++                            xmpptask.h \
++                            plainsaslhandler.h \
++                            saslcookiemechanism.h \
++                            xmppengineimpl.h \
++                            ratelimitmanager.h
++
++libjinglexmpp_la_LDFLAGS = -version-info $(LIBJINGLE_LIBRARY_VERSION)
++
++AM_CPPFLAGS = -DPOSIX
diff --git a/libjingle-0.5.8-chromium14-changes.patch b/libjingle-0.5.8-chromium14-changes.patch
new file mode 100644
index 0000000..9754b30
--- /dev/null
+++ b/libjingle-0.5.8-chromium14-changes.patch
@@ -0,0 +1,1204 @@
+diff -uprN libjingle-0.5.8/talk/base/autodetectproxy.cc source/talk/base/autodetectproxy.cc
+--- libjingle-0.5.8/talk/base/autodetectproxy.cc	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/autodetectproxy.cc	2011-07-21 05:59:06.000000000 -0400
+@@ -38,6 +38,15 @@ static const ProxyType TEST_ORDER[] = {
+   PROXY_HTTPS, PROXY_SOCKS5, PROXY_UNKNOWN
+ };
+ 
++static const int kSavedStringLimit = 128;
++
++static void SaveStringToStack(char *dst,
++                              const std::string &src,
++                              size_t dst_size) {
++  strncpy(dst, src.c_str(), dst_size - 1);
++  dst[dst_size - 1] = '\0';
++}
++
+ AutoDetectProxy::AutoDetectProxy(const std::string& user_agent)
+     : agent_(user_agent), socket_(NULL), next_(0) {
+ }
+@@ -75,7 +84,54 @@ void AutoDetectProxy::OnMessage(Message 
+   if (MSG_TIMEOUT == msg->message_id) {
+     OnCloseEvent(socket_, ETIMEDOUT);
+   } else {
++    // This must be the ST_MSG_WORKER_DONE message that deletes the
++    // AutoDetectProxy object. We have observed crashes within this stack that
++    // seem to be highly reproducible for a small subset of users and thus are
++    // probably correlated with a specific proxy setting, so copy potentially
++    // relevant information onto the stack to make it available in Windows
++    // minidumps.
++
++    // Save the user agent and the number of auto-detection passes that we
++    // needed.
++    char agent[kSavedStringLimit];
++    SaveStringToStack(agent, agent_, sizeof agent);
++
++    int next = next_;
++
++    // Now the detected proxy config (minus the password field, which could be
++    // sensitive).
++    ProxyType type = proxy().type;
++
++    char address_hostname[kSavedStringLimit];
++    SaveStringToStack(address_hostname,
++                      proxy().address.hostname(),
++                      sizeof address_hostname);
++
++    uint32 address_ip = proxy().address.ip();
++
++    uint16 address_port = proxy().address.port();
++
++    char autoconfig_url[kSavedStringLimit];
++    SaveStringToStack(autoconfig_url,
++                      proxy().autoconfig_url,
++                      sizeof autoconfig_url);
++
++    bool autodetect = proxy().autodetect;
++
++    char bypass_list[kSavedStringLimit];
++    SaveStringToStack(bypass_list, proxy().bypass_list, sizeof bypass_list);
++
++    char username[kSavedStringLimit];
++    SaveStringToStack(username, proxy().username, sizeof username);
++
+     SignalThread::OnMessage(msg);
++
++    // Log the gathered data at a log level that will never actually be enabled
++    // so that the compiler is forced to retain the data on the stack.
++    LOG(LS_SENSITIVE) << agent << " " << next << " " << type << " "
++                      << address_hostname << " " << address_ip << " "
++                      << address_port << " " << autoconfig_url << " "
++                      << autodetect << " " << bypass_list << " " << username;
+   }
+ }
+ 
+diff -uprN libjingle-0.5.8/talk/base/autodetectproxy.h source/talk/base/autodetectproxy.h
+--- libjingle-0.5.8/talk/base/autodetectproxy.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/autodetectproxy.h	2011-07-21 05:59:06.000000000 -0400
+@@ -30,6 +30,7 @@
+ 
+ #include <string>
+ 
++#include "talk/base/constructormagic.h"
+ #include "talk/base/cryptstring.h"
+ #include "talk/base/proxyinfo.h"
+ #include "talk/base/signalthread.h"
+@@ -83,6 +84,8 @@ class AutoDetectProxy : public SignalThr
+   ProxyInfo proxy_;
+   AsyncSocket* socket_;
+   int next_;
++
++  DISALLOW_IMPLICIT_CONSTRUCTORS(AutoDetectProxy);
+ };
+ 
+ }  // namespace talk_base
+diff -uprN libjingle-0.5.8/talk/base/messagehandler.h source/talk/base/messagehandler.h
+--- libjingle-0.5.8/talk/base/messagehandler.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/messagehandler.h	2011-07-21 05:59:06.000000000 -0400
+@@ -25,8 +25,10 @@
+  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#ifndef TALK_BASE_MESSAGEHANDLER_H__
+-#define TALK_BASE_MESSAGEHANDLER_H__
++#ifndef TALK_BASE_MESSAGEHANDLER_H_
++#define TALK_BASE_MESSAGEHANDLER_H_
++
++#include "talk/base/constructormagic.h"
+ 
+ namespace talk_base {
+ 
+@@ -35,12 +37,18 @@ struct Message;
+ // Messages get dispatched to a MessageHandler
+ 
+ class MessageHandler {
+-public:
++ public:
+   virtual ~MessageHandler();
+ 
+   virtual void OnMessage(Message* msg) = 0;
++
++ protected:
++  MessageHandler() {}
++
++ private:
++  DISALLOW_COPY_AND_ASSIGN(MessageHandler);
+ };
+ 
+ } // namespace talk_base
+ 
+-#endif // TALK_BASE_MESSAGEHANDLER_H__
++#endif // TALK_BASE_MESSAGEHANDLER_H_
+diff -uprN libjingle-0.5.8/talk/base/messagequeue.h source/talk/base/messagequeue.h
+--- libjingle-0.5.8/talk/base/messagequeue.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/messagequeue.h	2011-07-21 05:59:06.000000000 -0400
+@@ -35,6 +35,7 @@
+ #include <vector>
+ 
+ #include "talk/base/basictypes.h"
++#include "talk/base/constructormagic.h"
+ #include "talk/base/criticalsection.h"
+ #include "talk/base/messagehandler.h"
+ #include "talk/base/scoped_ptr.h"
+@@ -238,6 +239,9 @@ class MessageQueue {
+   PriorityQueue dmsgq_;
+   uint32 dmsgq_next_num_;
+   CriticalSection crit_;
++
++ private:
++  DISALLOW_COPY_AND_ASSIGN(MessageQueue);
+ };
+ 
+ }  // namespace talk_base
+diff -uprN libjingle-0.5.8/talk/base/network.cc source/talk/base/network.cc
+--- libjingle-0.5.8/talk/base/network.cc	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/network.cc	2011-07-21 05:59:06.000000000 -0400
+@@ -30,7 +30,6 @@
+ #endif
+ 
+ #include "talk/base/network.h"
+-#include "talk/base/stream.h"
+ 
+ #ifdef POSIX
+ #include <sys/socket.h>
+@@ -47,193 +46,135 @@
+ #endif
+ 
+ #include <algorithm>
+-#include <cassert>
+-#include <cfloat>
+-#include <cmath>
+ #include <cstdio>
+-#include <cstring>
+-#include <sstream>
+ 
+ #include "talk/base/host.h"
+ #include "talk/base/logging.h"
+ #include "talk/base/scoped_ptr.h"
+ #include "talk/base/socket.h"  // includes something that makes windows happy
+-#include "talk/base/stringencode.h"
+-#include "talk/base/time.h"
++#include "talk/base/stream.h"
++#include "talk/base/thread.h"
+ 
+-namespace {
++namespace talk_base {
+ 
+-const double kAlpha = 0.5;  // weight for data infinitely far in the past
+-const double kHalfLife = 2000;  // half life of exponential decay (in ms)
+-const double kLog2 = 0.693147180559945309417;
+-const double kLambda = kLog2 / kHalfLife;
++namespace {
+ 
+-// assume so-so quality unless data says otherwise
+-const double kDefaultQuality = talk_base::QUALITY_FAIR;
++const uint32 kUpdateNetworksMessage = 1;
+ 
+-typedef std::map<std::string, std::string> StrMap;
++// Fetch list of networks every two seconds.
++const int kNetworksUpdateIntervalMs = 2000;
+ 
+-void BuildMap(const StrMap& map, std::string& str) {
+-  str.append("{");
+-  bool first = true;
+-  for (StrMap::const_iterator i = map.begin(); i != map.end(); ++i) {
+-    if (!first) str.append(",");
+-    str.append(i->first);
+-    str.append("=");
+-    str.append(i->second);
+-    first = false;
+-  }
+-  str.append("}");
+-}
++#ifdef POSIX
++// Gets the default gateway for the specified interface.
++uint32 GetDefaultGateway(const std::string& name) {
++#ifdef OSX
++  // TODO: /proc/net/route doesn't exist,
++  // Use ioctl to get the routing table
++  return 0xFFFFFFFF;
++#endif
+ 
+-void ParseCheck(std::istringstream& ist, char ch) {
+-  if (ist.get() != ch)
+-    LOG(LERROR) << "Expecting '" << ch << "'";
+-}
++  uint32 gateway_ip = 0;
+ 
+-std::string ParseString(std::istringstream& ist) {
+-  std::string str;
+-  int count = 0;
+-  while (ist) {
+-    char ch = ist.peek();
+-    if ((count == 0) && ((ch == '=') || (ch == ',') || (ch == '}'))) {
+-      break;
+-    } else if (ch == '{') {
+-      count += 1;
+-    } else if (ch == '}') {
+-      count -= 1;
+-      if (count < 0)
+-        LOG(LERROR) << "mismatched '{' and '}'";
++  talk_base::FileStream fs;
++  if (fs.Open("/proc/net/route", "r", NULL)) {
++    std::string line;
++    while (fs.ReadLine(&line) == talk_base::SR_SUCCESS && gateway_ip == 0) {
++      char iface[16];
++      unsigned int ip, gw;
++      if (sscanf(line.c_str(), "%7s %8X %8X", iface, &ip, &gw) == 3 &&
++          name == iface && ip == 0) {
++        gateway_ip = ntohl(gw);
++      }
+     }
+-    str.append(1, static_cast<char>(ist.get()));
+   }
+-  return str;
++
++  return gateway_ip;
+ }
++#endif  // POSIX
+ 
+-void ParseMap(const std::string& str, StrMap& map) {
+-  if (str.size() == 0)
+-    return;
+-  std::istringstream ist(str);
+-  ParseCheck(ist, '{');
+-  for (;;) {
+-    std::string key = ParseString(ist);
+-    ParseCheck(ist, '=');
+-    std::string val = ParseString(ist);
+-    map[key] = val;
+-    if (ist.peek() == ',')
+-      ist.get();
+-    else
+-      break;
+-  }
+-  ParseCheck(ist, '}');
+-  if (ist.rdbuf()->in_avail() != 0)
+-    LOG(LERROR) << "Unexpected characters at end";
++bool CompareNetworks(const Network* a, const Network* b) {
++  return a->name() < b->name();
+ }
+ 
+ }  // namespace
+ 
+-namespace talk_base {
++NetworkManager::NetworkManager() {
++}
+ 
+ NetworkManager::~NetworkManager() {
+-  for (NetworkMap::iterator i = networks_.begin(); i != networks_.end(); ++i)
+-    delete i->second;
+ }
+ 
+-bool NetworkManager::GetNetworks(std::vector<Network*>* result) {
+-  std::vector<Network*> list;
+-  if (!EnumNetworks(false, &list)) {
+-    return false;
++NetworkManagerBase::NetworkManagerBase() {
++}
++
++NetworkManagerBase::~NetworkManagerBase() {
++  for (NetworkMap::iterator i = networks_map_.begin();
++       i != networks_map_.end(); ++i) {
++    delete i->second;
+   }
++}
++
++void NetworkManagerBase::GetNetworks(NetworkList* result) const {
++  *result = networks_;
++}
++
++void NetworkManagerBase::MergeNetworkList(const NetworkList& new_networks,
++                                          bool force_notification) {
++  // Sort the list so that we can detect when it changes.
++  NetworkList list(new_networks);
++  std::sort(list.begin(), list.end(), CompareNetworks);
++
++  bool changed = false;
++
++  if (networks_.size() != list.size())
++    changed = true;
++
++  networks_.resize(list.size());
+ 
+   for (uint32 i = 0; i < list.size(); ++i) {
+-    NetworkMap::iterator iter = networks_.find(list[i]->name());
++    NetworkMap::iterator iter = networks_map_.find(list[i]->name());
+ 
+     Network* network;
+-    if (iter == networks_.end()) {
++    if (iter == networks_map_.end()) {
++      // That's a new network, add it to the map.
+       network = list[i];
++      networks_map_[network->name()] = network;
+     } else {
+       network = iter->second;
+-      network->set_ip(list[i]->ip());
+-      network->set_gateway_ip(list[i]->gateway_ip());
++      if (network->ip() != list[i]->ip()) {
++        changed = true;
++        network->set_ip(list[i]->ip());
++      }
++
++      if (network->gateway_ip() != list[i]->gateway_ip()) {
++        changed = true;
++        network->set_gateway_ip(list[i]->gateway_ip());
++      }
++
+       delete list[i];
+     }
+ 
+-    networks_[network->name()] = network;
+-    result->push_back(network);
+-  }
+-  return true;
+-}
++    if (!changed && networks_[i]->name() != network->name())
++      changed = true;
+ 
+-void NetworkManager::DumpNetworks(bool include_ignored) {
+-  std::vector<Network*> list;
+-  EnumNetworks(include_ignored, &list);
+-  LOG(LS_INFO) << "NetworkManager detected " << list.size() << " networks:";
+-  for (size_t i = 0; i < list.size(); ++i) {
+-    const Network* network = list[i];
+-    if (!network->ignored() || include_ignored) {
+-      LOG(LS_INFO) << network->ToString() << ": " << network->description()
+-                   << ", Gateway="
+-                   << SocketAddress::IPToString(network->gateway_ip())
+-                   << ((network->ignored()) ? ", Ignored" : "");
+-    }
++    networks_[i] = network;
+   }
+-}
+ 
+-std::string NetworkManager::GetState() const {
+-  StrMap map;
+-  for (NetworkMap::const_iterator i = networks_.begin();
+-       i != networks_.end(); ++i)
+-    map[i->first] = i->second->GetState();
+-
+-  std::string str;
+-  BuildMap(map, str);
+-  return str;
+-}
+-
+-void NetworkManager::SetState(const std::string& str) {
+-  StrMap map;
+-  ParseMap(str, map);
+-
+-  for (StrMap::iterator i = map.begin(); i != map.end(); ++i) {
+-    std::string name = i->first;
+-    std::string state = i->second;
+-
+-    Network* network = new Network(name, "", 0, 0);
+-    network->SetState(state);
+-    networks_[name] = network;
+-  }
++  if (changed || force_notification)
++    SignalNetworksChanged();
+ }
+ 
+-#ifdef POSIX
+-// Gets the default gateway for the specified interface.
+-uint32 GetDefaultGateway(const std::string& name) {
+-#ifdef OSX
+-  // TODO: /proc/net/route doesn't exist,
+-  // Use ioctl to get the routing table
+-  return 0xFFFFFFFF;
+-#endif
+-
+-  uint32 gateway_ip = 0;
+-
+-  FileStream fs;
+-  if (fs.Open("/proc/net/route", "r", NULL)) {
+-    std::string line;
+-    while (fs.ReadLine(&line) == SR_SUCCESS && gateway_ip == 0) {
+-      char iface[16];
+-      unsigned int ip, gw;
+-      if (sscanf(line.c_str(), "%7s %8X %8X", iface, &ip, &gw) == 3 &&
+-          name == iface && ip == 0) {
+-        gateway_ip = ntohl(gw);
+-      }
+-    }
+-  }
+-
+-  return gateway_ip;
++BasicNetworkManager::BasicNetworkManager()
++    : thread_(NULL),
++      started_(false) {
+ }
+ 
++BasicNetworkManager::~BasicNetworkManager() {
++}
+ 
+-bool NetworkManager::CreateNetworks(bool include_ignored,
+-                                    std::vector<Network*>* networks) {
++#ifdef POSIX
++bool BasicNetworkManager::CreateNetworks(bool include_ignored,
++                                         NetworkList* networks) {
+   int fd;
+   if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
+     LOG_ERR(LERROR) << "socket";
+@@ -248,7 +189,7 @@ bool NetworkManager::CreateNetworks(bool
+     LOG_ERR(LERROR) << "ioctl";
+     return false;
+   }
+-  assert(ifc.ifc_len < static_cast<int>(64 * sizeof(struct ifreq)));
++  ASSERT(ifc.ifc_len < static_cast<int>(64 * sizeof(struct ifreq)));
+ 
+   struct ifreq* ptr = reinterpret_cast<struct ifreq*>(ifc.ifc_buf);
+   struct ifreq* end =
+@@ -283,8 +224,8 @@ bool NetworkManager::CreateNetworks(bool
+ #endif  // POSIX
+ 
+ #ifdef WIN32
+-bool NetworkManager::CreateNetworks(bool include_ignored,
+-                                    std::vector<Network*>* networks) {
++bool BasicNetworkManager::CreateNetworks(bool include_ignored,
++                                         NetworkList* networks) {
+   IP_ADAPTER_INFO info_temp;
+   ULONG len = 0;
+ 
+@@ -332,7 +273,7 @@ bool NetworkManager::CreateNetworks(bool
+ }
+ #endif  // WIN32
+ 
+-bool NetworkManager::IsIgnoredNetwork(const Network& network) {
++bool BasicNetworkManager::IsIgnoredNetwork(const Network& network) {
+ #ifdef POSIX
+   // Ignore local networks (lo, lo0, etc)
+   // Also filter out VMware interfaces, typically named vmnet1 and vmnet8
+@@ -354,57 +295,65 @@ bool NetworkManager::IsIgnoredNetwork(co
+   return (network.ip() < 0x01000000);
+ }
+ 
+-bool NetworkManager::EnumNetworks(bool include_ignored,
+-                                  std::vector<Network*>* result) {
+-  return CreateNetworks(include_ignored, result);
+-}
+-
+-
+-Network::Network(const std::string& name, const std::string& desc,
+-                 uint32 ip, uint32 gateway_ip)
+-    : name_(name), description_(desc), ip_(ip), gateway_ip_(gateway_ip),
+-      ignored_(false), uniform_numerator_(0), uniform_denominator_(0),
+-      exponential_numerator_(0), exponential_denominator_(0),
+-      quality_(kDefaultQuality) {
+-  last_data_time_ = Time();
++void BasicNetworkManager::StartUpdating() {
++  if (started_) {
++    sent_first_update_ = false;
++    return;
++  }
+ 
+-  // TODO: seed the historical data with one data point based
+-  // on the link speed metric from XP (4.0 if < 50, 3.0 otherwise).
++  thread_ = Thread::Current();
++  started_ = true;
++  sent_first_update_ = false;
++  thread_->Post(this, kUpdateNetworksMessage);
+ }
+ 
+-void Network::StartSession(NetworkSession* session) {
+-  assert(std::find(sessions_.begin(), sessions_.end(), session) ==
+-         sessions_.end());
+-  sessions_.push_back(session);
++void BasicNetworkManager::StopUpdating() {
++  ASSERT(Thread::Current() == thread_);
++  started_ = false;
+ }
+ 
+-void Network::StopSession(NetworkSession* session) {
+-  SessionList::iterator iter =
+-      std::find(sessions_.begin(), sessions_.end(), session);
+-  if (iter != sessions_.end())
+-    sessions_.erase(iter);
++void BasicNetworkManager::OnMessage(Message* msg) {
++  ASSERT(msg->message_id == kUpdateNetworksMessage);
++  DoUpdateNetworks();
+ }
+ 
+-void Network::EstimateQuality() {
+-  uint32 now = Time();
++void BasicNetworkManager::DoUpdateNetworks() {
++  if (!started_)
++    return;
++
++  ASSERT(Thread::Current() == thread_);
+ 
+-  // Add new data points for the current time.
+-  for (uint32 i = 0; i < sessions_.size(); ++i) {
+-    if (sessions_[i]->HasQuality())
+-      AddDataPoint(now, sessions_[i]->GetCurrentQuality());
++  NetworkList list;
++  if (!CreateNetworks(false, &list)) {
++    SignalError();
++  } else {
++    MergeNetworkList(list, !sent_first_update_);
++    sent_first_update_ = true;
+   }
+ 
+-  // Construct the weighted average using both uniform and exponential weights.
++  thread_->PostDelayed(kNetworksUpdateIntervalMs, this, kUpdateNetworksMessage);
++}
+ 
+-  double exp_shift = exp(-kLambda * (now - last_data_time_));
+-  double numerator = uniform_numerator_ + exp_shift * exponential_numerator_;
+-  double denominator = uniform_denominator_ + exp_shift *
+-                       exponential_denominator_;
++void BasicNetworkManager::DumpNetworks(bool include_ignored) {
++  NetworkList list;
++  CreateNetworks(include_ignored, &list);
++  LOG(LS_INFO) << "NetworkManager detected " << list.size() << " networks:";
++  for (size_t i = 0; i < list.size(); ++i) {
++    const Network* network = list[i];
++    if (!network->ignored() || include_ignored) {
++      LOG(LS_INFO) << network->ToString() << ": " << network->description()
++                   << ", Gateway="
++                   << SocketAddress::IPToString(network->gateway_ip())
++                   << ((network->ignored()) ? ", Ignored" : "");
++    }
++  }
++}
+ 
+-  if (denominator < DBL_EPSILON)
+-    quality_ = kDefaultQuality;
+-  else
+-    quality_ = numerator / denominator;
++Network::Network(const std::string& name, const std::string& desc,
++                 uint32 ip, uint32 gateway_ip)
++    : name_(name), description_(desc), ip_(ip), gateway_ip_(gateway_ip),
++      ignored_(false), uniform_numerator_(0), uniform_denominator_(0),
++      exponential_numerator_(0), exponential_denominator_(0) {
+ }
+ 
+ std::string Network::ToString() const {
+@@ -416,41 +365,4 @@ std::string Network::ToString() const {
+   return ss.str();
+ }
+ 
+-void Network::AddDataPoint(uint32 time, double quality) {
+-  uniform_numerator_ += kAlpha * quality;
+-  uniform_denominator_ += kAlpha;
+-
+-  double exp_shift = exp(-kLambda * (time - last_data_time_));
+-  exponential_numerator_ = (1 - kAlpha) * quality + exp_shift *
+-                           exponential_numerator_;
+-  exponential_denominator_ = (1 - kAlpha) + exp_shift *
+-                             exponential_denominator_;
+-
+-  last_data_time_ = time;
+-}
+-
+-std::string Network::GetState() const {
+-  StrMap map;
+-  map["lt"] = talk_base::ToString<uint32>(last_data_time_);
+-  map["un"] = talk_base::ToString<double>(uniform_numerator_);
+-  map["ud"] = talk_base::ToString<double>(uniform_denominator_);
+-  map["en"] = talk_base::ToString<double>(exponential_numerator_);
+-  map["ed"] = talk_base::ToString<double>(exponential_denominator_);
+-
+-  std::string str;
+-  BuildMap(map, str);
+-  return str;
+-}
+-
+-void Network::SetState(const std::string& str) {
+-  StrMap map;
+-  ParseMap(str, map);
+-
+-  last_data_time_ = FromString<uint32>(map["lt"]);
+-  uniform_numerator_ = FromString<double>(map["un"]);
+-  uniform_denominator_ = FromString<double>(map["ud"]);
+-  exponential_numerator_ = FromString<double>(map["en"]);
+-  exponential_denominator_ = FromString<double>(map["ed"]);
+-}
+-
+ }  // namespace talk_base
+diff -uprN libjingle-0.5.8/talk/base/network.h source/talk/base/network.h
+--- libjingle-0.5.8/talk/base/network.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/network.h	2011-07-21 05:59:06.000000000 -0400
+@@ -34,50 +34,105 @@
+ #include <vector>
+ 
+ #include "talk/base/basictypes.h"
++#include "talk/base/messagehandler.h"
++#include "talk/base/sigslot.h"
+ 
+ namespace talk_base {
+ 
+ class Network;
+ class NetworkSession;
++class Thread;
+ 
+-// Keeps track of the available network interfaces over time so that quality
+-// information can be aggregated and recorded.
++// Generic network manager interface. It provides list of local
++// networks.
+ class NetworkManager {
+  public:
++  typedef std::vector<Network*> NetworkList;
++
++  NetworkManager();
+   virtual ~NetworkManager();
+ 
+-  // Updates and returns the current list of networks available on this machine.
+-  // This version will make sure that repeated calls return the same object for
+-  // a given network, so that quality is tracked appropriately.
+-  // Does not include ignored networks.
+-  bool GetNetworks(std::vector<Network*>* networks);
++  // Called when network list is updated.
++  sigslot::signal0<> SignalNetworksChanged;
++
++  // Indicates a failure when getting list of network interfaces.
++  sigslot::signal0<> SignalError;
++
++  // Start/Stop monitoring of network interfaces
++  // list. SignalNetworksChanged or SignalError is emitted immidiately
++  // after StartUpdating() is called. After that SignalNetworksChanged
++  // is emitted wheneven list of networks changes.
++  virtual void StartUpdating() = 0;
++  virtual void StopUpdating() = 0;
++
++  // Returns the current list of networks available on this machine.
++  // UpdateNetworks() must be called before this method is called.
++  // It makes sure that repeated calls return the same object for a
++  // given network, so that quality is tracked appropriately. Does not
++  // include ignored networks.
++  virtual void GetNetworks(NetworkList* networks) const = 0;
++};
++
++// Base class for NetworkManager implementations.
++class NetworkManagerBase : public NetworkManager {
++ public:
++  NetworkManagerBase();
++  virtual ~NetworkManagerBase();
++
++  virtual void GetNetworks(std::vector<Network*>* networks) const;
++
++ protected:
++  // Updates |networks_| with the networks listed in |list|. If
++  // |network_map_| already has a Network object for a network listed
++  // in the |list| then it is reused. Accept ownership of the Network
++  // objects in the |list|. SignalNetworkListUpdated is emitted if
++  // there is a change in network configuration or
++  // |force_notification| is set to true.
++  void MergeNetworkList(const NetworkList& list, bool force_notification);
++
++ private:
++  typedef std::map<std::string, Network*> NetworkMap;
++
++  void DoUpdateNetworks();
++
++  NetworkList networks_;
++  NetworkMap networks_map_;
++};
++
++// Basic implementation of the NetworkManager interface that gets list
++// of networks using OS APIs.
++class BasicNetworkManager : public NetworkManagerBase,
++                            public MessageHandler {
++ public:
++  BasicNetworkManager();
++  virtual ~BasicNetworkManager();
++
++  virtual void StartUpdating();
++  virtual void StopUpdating();
+ 
+   // Logs the available networks.
+-  void DumpNetworks(bool include_ignored);
++  static void DumpNetworks(bool include_ignored);
+ 
+-  // Reads and writes the state of the quality database in a string format.
+-  std::string GetState() const;
+-  void SetState(const std::string& str);
++  // MessageHandler interface.
++  virtual void OnMessage(Message* msg);
+ 
++ protected:
+   // Creates a network object for each network available on the machine.
+-  static bool CreateNetworks(bool include_ignored,
+-                             std::vector<Network*>* networks);
++  static bool CreateNetworks(bool include_ignored, NetworkList* networks);
+   // Determines if a network should be ignored.
+   static bool IsIgnoredNetwork(const Network& network);
+ 
+- protected:
+-  // Fills the supplied list with all usable networks. Overrideable.
+-  virtual bool EnumNetworks(bool include_ignored,
+-                            std::vector<Network*>* networks);
+-
+  private:
+-  typedef std::map<std::string, Network*> NetworkMap;
++  friend class NetworkTest;
+ 
+-  NetworkMap networks_;
++  void DoUpdateNetworks();
++
++  Thread* thread_;
++  bool started_;
++  bool sent_first_update_;
+ };
+ 
+ // Represents a Unix-type network interface, with a name and single address.
+-// It also includes the ability to track and estimate quality.
+ class Network {
+  public:
+   Network(const std::string& name, const std::string& description,
+@@ -104,18 +159,6 @@ class Network {
+   bool ignored() const { return ignored_; }
+   void set_ignored(bool ignored) { ignored_ = ignored; }
+ 
+-  // Updates the list of sessions that are ongoing.
+-  void StartSession(NetworkSession* session);
+-  void StopSession(NetworkSession* session);
+-
+-  // Re-computes the estimate of near-future quality based on the information
+-  // as of this exact moment.
+-  void EstimateQuality();
+-
+-  // Returns the current estimate of the near-future quality of connections
+-  // that use this local interface.
+-  double quality() { return quality_; }
+-
+   // Debugging description of this network
+   std::string ToString() const;
+ 
+@@ -132,39 +175,10 @@ class Network {
+   double uniform_denominator_;
+   double exponential_numerator_;
+   double exponential_denominator_;
+-  uint32 last_data_time_;
+-  double quality_;
+-
+-  // Updates the statistics maintained to include the given estimate.
+-  void AddDataPoint(uint32 time, double quality);
+-
+-  // Converts the internal state to and from a string.  This is used to record
+-  // quality information into a permanent store.
+-  void SetState(const std::string& str);
+-  std::string GetState() const;
+ 
+   friend class NetworkManager;
+ };
+ 
+-// Represents a session that is in progress using a particular network and can
+-// provide data about the quality of the network at any given moment.
+-class NetworkSession {
+- public:
+-  virtual ~NetworkSession() { }
+-
+-  // Determines whether this session has an estimate at this moment.  We will
+-  // only call GetCurrentQuality when this returns true.
+-  virtual bool HasQuality() = 0;
+-
+-  // Returns an estimate of the quality at this exact moment.  The result should
+-  // be a MOS (mean opinion score) value.
+-  virtual float GetCurrentQuality() = 0;
+-};
+-
+-const double QUALITY_BAD  = 3.0;
+-const double QUALITY_FAIR = 3.35;
+-const double QUALITY_GOOD = 3.7;
+-
+ }  // namespace talk_base
+ 
+ #endif  // TALK_BASE_NETWORK_H_
+diff -uprN libjingle-0.5.8/talk/base/signalthread.h source/talk/base/signalthread.h
+--- libjingle-0.5.8/talk/base/signalthread.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/signalthread.h	2011-07-21 05:59:06.000000000 -0400
+@@ -30,6 +30,7 @@
+ 
+ #include <string>
+ 
++#include "talk/base/constructormagic.h"
+ #include "talk/base/thread.h"
+ #include "talk/base/sigslot.h"
+ 
+@@ -117,16 +118,17 @@ class SignalThread : public sigslot::has
+     kStopping,        // Work is being interrupted
+   };
+ 
+-  friend class Worker;
+   class Worker : public Thread {
+    public:
+     explicit Worker(SignalThread* parent) : parent_(parent) {}
+     virtual void Run() { parent_->Run(); }
++
+    private:
+     SignalThread* parent_;
++
++    DISALLOW_IMPLICIT_CONSTRUCTORS(Worker);
+   };
+ 
+-  friend class EnterExit;
+   class EnterExit {
+    public:
+     explicit EnterExit(SignalThread* t) : t_(t) {
+@@ -142,8 +144,11 @@ class SignalThread : public sigslot::has
+       if (d)
+         delete t_;
+     }
++
+    private:
+     SignalThread* t_;
++
++    DISALLOW_IMPLICIT_CONSTRUCTORS(EnterExit);
+   };
+ 
+   void Run();
+@@ -154,6 +159,8 @@ class SignalThread : public sigslot::has
+   CriticalSection cs_;
+   State state_;
+   int refcount_;
++
++  DISALLOW_COPY_AND_ASSIGN(SignalThread);
+ };
+ 
+ ///////////////////////////////////////////////////////////////////////////////
+diff -uprN libjingle-0.5.8/talk/base/stringencode.cc source/talk/base/stringencode.cc
+--- libjingle-0.5.8/talk/base/stringencode.cc	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/stringencode.cc	2011-07-21 05:59:06.000000000 -0400
+@@ -530,6 +530,44 @@ size_t tokenize(const std::string& sourc
+   return fields->size();
+ }
+ 
++size_t tokenize_append(const std::string& source, char delimiter,
++                       std::vector<std::string>* fields) {
++  if (!fields) return 0;
++
++  std::vector<std::string> new_fields;
++  tokenize(source, delimiter, &new_fields);
++  fields->insert(fields->end(), new_fields.begin(), new_fields.end());
++  return fields->size();
++}
++
++size_t tokenize(const std::string& source, char delimiter, char start_mark,
++                char end_mark, std::vector<std::string>* fields) {
++  if (!fields) return 0;
++  fields->clear();
++
++  std::string remain_source = source;
++  while (!remain_source.empty()) {
++    size_t start_pos = remain_source.find(start_mark);
++    if (std::string::npos == start_pos) break;
++    std::string pre_mark;
++    if (start_pos > 0) {
++      pre_mark = remain_source.substr(0, start_pos - 1);
++    }
++
++    ++start_pos;
++    size_t end_pos = remain_source.find(end_mark, start_pos);
++    if (std::string::npos == end_pos) break;
++
++    // We have found the matching marks. First tokenize the pre-mask. Then add
++    // the marked part as a single field. Finally, loop back for the post-mark.
++    tokenize_append(pre_mark, delimiter, fields);
++    fields->push_back(remain_source.substr(start_pos, end_pos - start_pos));
++    remain_source = remain_source.substr(end_pos + 1);
++  }
++
++  return tokenize_append(remain_source, delimiter, fields);
++}
++
+ size_t split(const std::string& source, char delimiter,
+              std::vector<std::string>* fields) {
+   ASSERT(NULL != fields);
+diff -uprN libjingle-0.5.8/talk/base/stringencode.h source/talk/base/stringencode.h
+--- libjingle-0.5.8/talk/base/stringencode.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/stringencode.h	2011-07-21 05:59:06.000000000 -0400
+@@ -135,6 +135,20 @@ size_t split(const std::string& source, 
+ size_t tokenize(const std::string& source, char delimiter,
+                 std::vector<std::string>* fields);
+ 
++// Tokenize and append the tokens to fields. Return the new size of fields.
++size_t tokenize_append(const std::string& source, char delimiter,
++                       std::vector<std::string>* fields);
++
++// Splits the source string into multiple fields separated by delimiter, with
++// duplicates of delimiter ignored. Trailing delimiter ignored. A substring in
++// between the start_mark and the end_mark is treated as a single field. Return
++// the size of fields. For example, if source is "filename
++// \"/Library/Application Support/media content.txt\"", delimiter is ' ', and
++// the start_mark and end_mark are '"', this method returns two fields:
++// "filename" and "/Library/Application Support/media content.txt".
++size_t tokenize(const std::string& source, char delimiter, char start_mark,
++                char end_mark, std::vector<std::string>* fields);
++
+ // Safe sprintf to std::string
+ //void sprintf(std::string& value, size_t maxlen, const char * format, ...)
+ //     PRINTF_FORMAT(3);
+diff -uprN libjingle-0.5.8/talk/base/thread.h source/talk/base/thread.h
+--- libjingle-0.5.8/talk/base/thread.h	2011-07-01 18:57:06.000000000 -0400
++++ source/talk/base/thread.h	2011-07-21 05:59:06.000000000 -0400
+@@ -37,6 +37,7 @@
+ #include <pthread.h>
+ #endif
+ 
++#include "talk/base/constructormagic.h"
+ #include "talk/base/messagequeue.h"
+ 
+ #ifdef WIN32
+@@ -87,6 +88,8 @@ class ThreadManager {
+ #ifdef WIN32
+   static DWORD key_;
+ #endif
++
++  DISALLOW_COPY_AND_ASSIGN(ThreadManager);
+ };
+ 
+ class Thread;
+@@ -109,6 +112,12 @@ class Runnable {
+  public:
+   virtual ~Runnable() {}
+   virtual void Run(Thread* thread) = 0;
++
++ protected:
++  Runnable() {}
++
++ private:
++  DISALLOW_COPY_AND_ASSIGN(Runnable);
+ };
+ 
+ class Thread : public MessageQueue {
+@@ -208,6 +217,8 @@ class Thread : public MessageQueue {
+   bool owned_;
+ 
+   friend class ThreadManager;
++
++  DISALLOW_COPY_AND_ASSIGN(Thread);
+ };
+ 
+ // AutoThread automatically installs itself at construction
+@@ -215,16 +226,25 @@ class Thread : public MessageQueue {
+ // _not already_ associated with the current OS thread.
+ 
+ class AutoThread : public Thread {
+-public:
++ public:
+   AutoThread(SocketServer* ss = 0);
+   virtual ~AutoThread();
++
++ private:
++  DISALLOW_COPY_AND_ASSIGN(AutoThread);
+ };
+ 
+ // Win32 extension for threads that need to use COM
+ #ifdef WIN32
+ class ComThread : public Thread {
++ public:
++  ComThread() {}
++
+  protected:
+   virtual void Run();
++
++ private:
++  DISALLOW_COPY_AND_ASSIGN(ComThread);
+ };
+ #endif
+ 
+@@ -238,8 +258,11 @@ class SocketServerScope {
+   ~SocketServerScope() {
+     Thread::Current()->set_socketserver(old_ss_);
+   }
++
+  private:
+   SocketServer* old_ss_;
++
++  DISALLOW_IMPLICIT_CONSTRUCTORS(SocketServerScope);
+ };
+ 
+ }  // namespace talk_base
+diff -uprN libjingle-0.5.8/talk/examples/call/callclient.cc source/talk/examples/call/callclient.cc
+--- libjingle-0.5.8/talk/examples/call/callclient.cc	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/examples/call/callclient.cc	2011-07-21 05:59:07.000000000 -0400
+@@ -329,7 +329,7 @@ void CallClient::InitMedia() {
+   // TODO: It looks like we are leaking many objects. E.g.
+   // |network_manager_| is never deleted.
+ 
+-  network_manager_ = new talk_base::NetworkManager();
++  network_manager_ = new talk_base::BasicNetworkManager();
+ 
+   // TODO: Decide if the relay address should be specified here.
+   talk_base::SocketAddress stun_addr("stun.l.google.com", 19302);
+diff -uprN libjingle-0.5.8/talk/examples/call/callclient.h source/talk/examples/call/callclient.h
+--- libjingle-0.5.8/talk/examples/call/callclient.h	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/examples/call/callclient.h	2011-07-21 05:59:07.000000000 -0400
+@@ -66,11 +66,11 @@ namespace cricket {
+ class PortAllocator;
+ class MediaEngine;
+ class MediaSessionClient;
+-class NamedSource;
+ class Receiver;
+ class Call;
+-struct CallOptions;
+ class SessionManagerTask;
++struct CallOptions;
++struct NamedSource;
+ }
+ 
+ struct RosterItem {
+diff -uprN libjingle-0.5.8/talk/examples/call/call_main.cc source/talk/examples/call/call_main.cc
+--- libjingle-0.5.8/talk/examples/call/call_main.cc	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/examples/call/call_main.cc	2011-07-21 05:59:07.000000000 -0400
+@@ -46,6 +46,7 @@
+ #include "talk/examples/login/xmpppump.h"
+ #include "talk/examples/call/callclient.h"
+ #include "talk/examples/call/console.h"
++#include "talk/session/phone/fakemediaengine.h"
+ #include "talk/session/phone/filemediaengine.h"
+ #include "talk/session/phone/mediasessionclient.h"
+ #include "talk/session/phone/srtpfilter.h"
+@@ -216,6 +217,7 @@ cricket::MediaEngine* CreateFileMediaEng
+   return file_media_engine;
+ }
+ 
++
+ // TODO: Move this into Console.
+ void Print(const char* chars) {
+   printf("%s", chars);
+@@ -247,6 +249,7 @@ int main(int argc, char **argv) {
+   DEFINE_string(voiceinput, NULL, "RTP dump file for voice input.");
+   DEFINE_string(voiceoutput, NULL, "RTP dump file for voice output.");
+   DEFINE_string(videoinput, NULL, "RTP dump file for video input.");
++  DEFINE_string(yuvvideoinput, NULL, "YUV file for video input.");
+   DEFINE_string(videooutput, NULL, "RTP dump file for video output.");
+   DEFINE_bool(debugsrtp, false, "Enable debugging for srtp.");
+   DEFINE_bool(help, false, "Prints this message");
+@@ -389,7 +392,6 @@ int main(int argc, char **argv) {
+     // The engine will be released by the client later.
+     client->SetMediaEngine(engine);
+   }
+-
+   Console *console = new Console(main_thread, client);
+   client->SetConsole(console);
+   client->SetAutoAccept(auto_accept);
+diff -uprN libjingle-0.5.8/talk/p2p/client/basicportallocator.cc source/talk/p2p/client/basicportallocator.cc
+--- libjingle-0.5.8/talk/p2p/client/basicportallocator.cc	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/p2p/client/basicportallocator.cc	2011-07-21 05:59:04.000000000 -0400
+@@ -232,7 +232,11 @@ BasicPortAllocatorSession::BasicPortAllo
+     : PortAllocatorSession(allocator->flags()), allocator_(allocator),
+       name_(name), session_type_(session_type), network_thread_(NULL),
+       socket_factory_(allocator->socket_factory()), allocation_started_(false),
++      network_manager_started_(false),
+       running_(false) {
++  allocator_->network_manager()->SignalNetworksChanged.connect(
++      this, &BasicPortAllocatorSession::OnNetworksChanged);
++  allocator_->network_manager()->StartUpdating();
+ }
+ 
+ BasicPortAllocatorSession::~BasicPortAllocatorSession() {
+@@ -347,14 +351,21 @@ void BasicPortAllocatorSession::Allocate
+   network_thread_->Post(this, MSG_ALLOCATE);
+ }
+ 
++void BasicPortAllocatorSession::OnAllocate() {
++  if (network_manager_started_)
++    DoAllocate();
++
++  allocation_started_ = true;
++  if (running_)
++    network_thread_->PostDelayed(ALLOCATE_DELAY, this, MSG_ALLOCATE);
++}
++
+ // For each network, see if we have a sequence that covers it already.  If not,
+ // create a new sequence to create the appropriate ports.
+-void BasicPortAllocatorSession::OnAllocate() {
++void BasicPortAllocatorSession::DoAllocate() {
+   std::vector<talk_base::Network*> networks;
+-
+-  if (!allocator_->network_manager()->GetNetworks(&networks)) {
+-    LOG(LS_ERROR) << "Failed to enumerate networks";
+-  } else if (networks.empty()) {
++  allocator_->network_manager()->GetNetworks(&networks);
++  if (networks.empty()) {
+     LOG(LS_WARNING) << "Machine has no networks; no ports will be allocated";
+   } else {
+     for (uint32 i = 0; i < networks.size(); ++i) {
+@@ -374,8 +385,8 @@ void BasicPortAllocatorSession::OnAlloca
+         sequence_flags |= PORTALLOCATOR_DISABLE_RELAY;
+       }
+ 
+-      // Disable phases that would only create ports equivalent to ones that we
+-      // have already made.
++      // Disable phases that would only create ports equivalent to
++      // ones that we have already made.
+       DisableEquivalentPhases(networks[i], config, &sequence_flags);
+ 
+       if ((sequence_flags & DISABLE_ALL_PHASES) == DISABLE_ALL_PHASES) {
+@@ -391,10 +402,12 @@ void BasicPortAllocatorSession::OnAlloca
+       sequences_.push_back(sequence);
+     }
+   }
++}
+ 
+-  allocation_started_ = true;
+-  if (running_)
+-    network_thread_->PostDelayed(ALLOCATE_DELAY, this, MSG_ALLOCATE);
++void BasicPortAllocatorSession::OnNetworksChanged() {
++  network_manager_started_ = true;
++  if (allocation_started_)
++    DoAllocate();
+ }
+ 
+ void BasicPortAllocatorSession::DisableEquivalentPhases(
+diff -uprN libjingle-0.5.8/talk/p2p/client/basicportallocator.h source/talk/p2p/client/basicportallocator.h
+--- libjingle-0.5.8/talk/p2p/client/basicportallocator.h	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/p2p/client/basicportallocator.h	2011-07-21 05:59:04.000000000 -0400
+@@ -140,6 +140,8 @@ class BasicPortAllocatorSession : public
+   void OnConfigTimeout();
+   void AllocatePorts();
+   void OnAllocate();
++  void DoAllocate();
++  void OnNetworksChanged();
+   void DisableEquivalentPhases(talk_base::Network* network,
+       PortConfiguration* config, uint32* flags);
+   void AddAllocatedPort(Port* port, AllocationSequence* seq, float pref,
+@@ -159,6 +161,7 @@ class BasicPortAllocatorSession : public
+   talk_base::PacketSocketFactory* socket_factory_;
+   bool configuration_done_;
+   bool allocation_started_;
++  bool network_manager_started_;
+   bool running_;  // set when StartGetAllPorts is called
+   std::vector<PortConfiguration*> configs_;
+   std::vector<AllocationSequence*> sequences_;
+diff -uprN libjingle-0.5.8/talk/p2p/client/socketmonitor.cc source/talk/p2p/client/socketmonitor.cc
+--- libjingle-0.5.8/talk/p2p/client/socketmonitor.cc	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/p2p/client/socketmonitor.cc	2011-07-21 05:59:04.000000000 -0400
+@@ -138,7 +138,6 @@ void SocketMonitor::PollSocket(bool poll
+       info.recv_bytes_second = connection->recv_bytes_second();
+       info.local_candidate = connection->local_candidate();
+       info.remote_candidate = connection->remote_candidate();
+-      info.est_quality = connection->port()->network()->quality();
+       info.key = connection;
+       connection_infos_.push_back(info);
+     }
+diff -uprN libjingle-0.5.8/talk/p2p/client/socketmonitor.h source/talk/p2p/client/socketmonitor.h
+--- libjingle-0.5.8/talk/p2p/client/socketmonitor.h	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/p2p/client/socketmonitor.h	2011-07-21 05:59:04.000000000 -0400
+@@ -51,7 +51,6 @@ struct ConnectionInfo {
+   size_t recv_bytes_second;
+   Candidate local_candidate;
+   Candidate remote_candidate;
+-  double est_quality;
+   void *key;
+ };
+ 
+diff -uprN libjingle-0.5.8/talk/session/phone/currentspeakermonitor.h source/talk/session/phone/currentspeakermonitor.h
+--- libjingle-0.5.8/talk/session/phone/currentspeakermonitor.h	2011-07-01 18:57:07.000000000 -0400
++++ source/talk/session/phone/currentspeakermonitor.h	2011-07-21 05:59:05.000000000 -0400
+@@ -38,11 +38,11 @@
+ 
+ namespace cricket {
+ 
+-class AudioInfo;
+ class BaseSession;
+ class Call;
+-class MediaSources;
+ class Session;
++struct AudioInfo;
++struct MediaSources;
+ 
+ // Note that the call's audio monitor must be started before this is started.
+ // It's recommended that the audio monitor be started with a 100 ms period.
diff --git a/libjingle-0.5.8-config-linux.patch b/libjingle-0.5.8-config-linux.patch
new file mode 100644
index 0000000..820d519
--- /dev/null
+++ b/libjingle-0.5.8-config-linux.patch
@@ -0,0 +1,26 @@
+diff -up libjingle-0.5.8/talk/base/linux.cc.config libjingle-0.5.8/talk/base/linux.cc
+--- libjingle-0.5.8/talk/base/linux.cc.config	2011-07-01 18:57:06.000000000 -0400
++++ libjingle-0.5.8/talk/base/linux.cc	2011-07-25 12:05:40.084014155 -0400
+@@ -25,9 +25,9 @@
+  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#if defined(LINUX) || defined(ANDROID)
+ #include "talk/base/linux.h"
+ 
++#if defined(LINUX) || defined(ANDROID)
+ #include <ctype.h>
+ 
+ #include <errno.h>
+diff -up libjingle-0.5.8/talk/base/linux.h.config libjingle-0.5.8/talk/base/linux.h
+--- libjingle-0.5.8/talk/base/linux.h.config	2011-07-01 18:57:06.000000000 -0400
++++ libjingle-0.5.8/talk/base/linux.h	2011-07-25 12:05:53.314954072 -0400
+@@ -28,6 +28,8 @@
+ #ifndef TALK_BASE_LINUX_H_
+ #define TALK_BASE_LINUX_H_
+ 
++#include "config.h"
++
+ #if defined(LINUX) || defined(ANDROID)
+ #include <string>
+ #include <map>
diff --git a/libjingle-0.5.8-devicemanager-fix.patch b/libjingle-0.5.8-devicemanager-fix.patch
new file mode 100644
index 0000000..e46de94
--- /dev/null
+++ b/libjingle-0.5.8-devicemanager-fix.patch
@@ -0,0 +1,20 @@
+diff -up libjingle-0.5.8/talk/session/phone/devicemanager.cc.BAD libjingle-0.5.8/talk/session/phone/devicemanager.cc
+--- libjingle-0.5.8/talk/session/phone/devicemanager.cc.BAD	2011-07-25 11:57:17.646309358 -0400
++++ libjingle-0.5.8/talk/session/phone/devicemanager.cc	2011-07-25 11:58:05.604403378 -0400
+@@ -25,7 +25,7 @@
+  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+  */
+ 
+-#include "talk/session/phone/devicemanager.h"
++#include "config.h"
+ 
+ #if WIN32
+ #include <atlbase.h>
+@@ -58,6 +58,7 @@
+ #include "talk/sound/soundsysteminterface.h"
+ #endif
+ 
++#include "talk/session/phone/devicemanager.h"
+ #include "talk/base/logging.h"
+ #include "talk/base/stringutils.h"
+ #include "talk/session/phone/mediaengine.h"
diff --git a/libjingle-0.5.8-fixmacro.patch b/libjingle-0.5.8-fixmacro.patch
new file mode 100644
index 0000000..b164071
--- /dev/null
+++ b/libjingle-0.5.8-fixmacro.patch
@@ -0,0 +1,12 @@
+diff -up libjingle-0.5.8/talk/sound/sounddevicelocator.h.fix-macro libjingle-0.5.8/talk/sound/sounddevicelocator.h
+--- libjingle-0.5.8/talk/sound/sounddevicelocator.h.fix-macro	2011-07-01 18:57:06.000000000 -0400
++++ libjingle-0.5.8/talk/sound/sounddevicelocator.h	2011-07-25 12:50:24.066773540 -0400
+@@ -63,7 +63,7 @@ class SoundDeviceLocator {
+   std::string device_name_;
+ 
+  private:
+-  DISALLOW_ASSIGN(SoundDeviceLocator);
++  void operator=(const SoundDeviceLocator&);
+ };
+ 
+ }  // namespace cricket
diff --git a/libjingle-0.5.8-statfix.patch b/libjingle-0.5.8-statfix.patch
new file mode 100644
index 0000000..3f5036f
--- /dev/null
+++ b/libjingle-0.5.8-statfix.patch
@@ -0,0 +1,22 @@
+diff -up libjingle-0.5.8/talk/base/physicalsocketserver.cc.statfix libjingle-0.5.8/talk/base/physicalsocketserver.cc
+--- libjingle-0.5.8/talk/base/physicalsocketserver.cc.statfix	2011-07-25 11:39:12.301403847 -0400
++++ libjingle-0.5.8/talk/base/physicalsocketserver.cc	2011-07-25 11:39:25.723411866 -0400
+@@ -34,6 +34,7 @@
+ #ifdef POSIX
+ #include <string.h>
+ #include <errno.h>
++#include <time.h>
+ #include <fcntl.h>
+ #include <sys/time.h>
+ #include <unistd.h>
+diff -up libjingle-0.5.8/talk/base/stream.cc.statfix libjingle-0.5.8/talk/base/stream.cc
+--- libjingle-0.5.8/talk/base/stream.cc.statfix	2011-07-25 11:39:48.101311105 -0400
++++ libjingle-0.5.8/talk/base/stream.cc	2011-07-25 11:39:55.260452171 -0400
+@@ -26,6 +26,7 @@
+  */
+ 
+ #if defined(POSIX)
++#include <time.h>
+ #include <sys/file.h>
+ #endif  // POSIX
+ #include <sys/types.h>
diff --git a/libjingle-0.5.8-system-expat.patch b/libjingle-0.5.8-system-expat.patch
new file mode 100644
index 0000000..75ca4f1
--- /dev/null
+++ b/libjingle-0.5.8-system-expat.patch
@@ -0,0 +1,36 @@
+diff -up libjingle-0.5.8/talk/xmllite/xmlbuilder.h.system-expat libjingle-0.5.8/talk/xmllite/xmlbuilder.h
+--- libjingle-0.5.8/talk/xmllite/xmlbuilder.h.system-expat	2011-07-25 11:45:52.604310202 -0400
++++ libjingle-0.5.8/talk/xmllite/xmlbuilder.h	2011-07-25 11:46:04.055287491 -0400
+@@ -36,7 +36,7 @@
+ #ifdef EXPAT_RELATIVE_PATH
+ #include "expat.h"
+ #else
+-#include "third_party/expat/v2_0_1/Source/lib/expat.h"
++#include <expat.h>
+ #endif  // EXPAT_RELATIVE_PATH
+ 
+ namespace buzz {
+diff -up libjingle-0.5.8/talk/xmllite/xmlparser.h.system-expat libjingle-0.5.8/talk/xmllite/xmlparser.h
+--- libjingle-0.5.8/talk/xmllite/xmlparser.h.system-expat	2011-07-25 11:47:21.209287907 -0400
++++ libjingle-0.5.8/talk/xmllite/xmlparser.h	2011-07-25 11:47:32.917530191 -0400
+@@ -34,7 +34,7 @@
+ #ifdef EXPAT_RELATIVE_PATH
+ #include "expat.h"
+ #else
+-#include "third_party/expat/v2_0_1/Source/lib/expat.h"
++#include <expat.h>
+ #endif  // EXPAT_RELATIVE_PATH
+ 
+ struct XML_ParserStruct;
+diff -up libjingle-0.5.8/talk/xmpp/xmppstanzaparser.cc.system-expat libjingle-0.5.8/talk/xmpp/xmppstanzaparser.cc
+--- libjingle-0.5.8/talk/xmpp/xmppstanzaparser.cc.system-expat	2011-07-25 11:45:19.013287946 -0400
++++ libjingle-0.5.8/talk/xmpp/xmppstanzaparser.cc	2011-07-25 11:45:30.391424695 -0400
+@@ -33,7 +33,7 @@
+ #ifdef EXPAT_RELATIVE_PATH
+ #include "expat.h"
+ #else
+-#include "third_party/expat/v2_0_1/Source/lib/expat.h"
++#include <expat.h>
+ #endif
+ 
+ namespace buzz {
diff --git a/libjingle-0.5.8-system-srtp.patch b/libjingle-0.5.8-system-srtp.patch
new file mode 100644
index 0000000..4274551
--- /dev/null
+++ b/libjingle-0.5.8-system-srtp.patch
@@ -0,0 +1,12 @@
+diff -up libjingle-0.5.8/talk/session/phone/srtpfilter.cc.system-srtp libjingle-0.5.8/talk/session/phone/srtpfilter.cc
+--- libjingle-0.5.8/talk/session/phone/srtpfilter.cc.system-srtp	2011-07-25 11:56:10.950441446 -0400
++++ libjingle-0.5.8/talk/session/phone/srtpfilter.cc	2011-07-25 11:56:21.599308183 -0400
+@@ -58,7 +58,7 @@
+ #ifdef SRTP_RELATIVE_PATH
+ #include "srtp.h"  // NOLINT
+ #else
+-#include "third_party/libsrtp/include/srtp.h"
++#include <srtp.h>
+ #endif  // SRTP_RELATIVE_PATH
+ #ifdef _DEBUG
+ extern "C" debug_module_t mod_srtp;
diff --git a/libjingle-0.5.8-v4llookup-fix.patch b/libjingle-0.5.8-v4llookup-fix.patch
new file mode 100644
index 0000000..8dbdf2e
--- /dev/null
+++ b/libjingle-0.5.8-v4llookup-fix.patch
@@ -0,0 +1,20 @@
+diff -up libjingle-0.5.8/talk/session/phone/v4llookup.cc.v4lfix libjingle-0.5.8/talk/session/phone/v4llookup.cc
+--- libjingle-0.5.8/talk/session/phone/v4llookup.cc.v4lfix	2011-07-25 11:59:39.205287888 -0400
++++ libjingle-0.5.8/talk/session/phone/v4llookup.cc	2011-07-25 11:59:56.120536871 -0400
+@@ -6,7 +6,7 @@
+  * The functionality is implemented as a class with virtual methods for
+  * the purpose of unit testing.
+  */
+-#include "talk/session/phone/v4llookup.h"
++#include "config.h"
+ 
+ #include <errno.h>
+ #include <fcntl.h>
+@@ -18,6 +18,7 @@
+ 
+ #include <cstring>
+ 
++#include "talk/session/phone/v4llookup.h"
+ #include "talk/base/logging.h"
+ 
+ namespace cricket {
diff --git a/libjingle.spec b/libjingle.spec
index dd76a1e..515a060 100644
--- a/libjingle.spec
+++ b/libjingle.spec
@@ -1,24 +1,24 @@
 Name:           libjingle
-Version:        0.5.2
+Version:        0.5.8
 Release:        1%{?dist}
 Summary:        GoogleTalk implementation of Jingle
 Group:          System Environment/Libraries
 License:        BSD
 URL:            http://code.google.com/apis/talk/libjingle/
 Source0:        http://libjingle.googlecode.com/files/%{name}-%{version}.zip
-Patch0:		libjingle-0.5.1-build-sanity.patch
+Patch0:		libjingle-0.5.8-build-sanity.patch
 # talk/base/basictypes.h and talk/base/logging.h must be included 
 # before any header with __BEGIN_DECLS, notably, sys/types.h
 Patch1:		libjingle-0.5.1-C-linkage-fix.patch
 # We need <cstdlib> for NULL.
-Patch2:		libjingle-0.5.2-NULL-fix.patch
+Patch2:		libjingle-0.5.8-NULL-fix.patch
 # In file included from /usr/include/fcntl.h:41:0,
 #                 from physicalsocketserver.cc:37:
 #/usr/include/bits/stat.h:91:21: error: field 'st_atim' has incomplete type
 #/usr/include/bits/stat.h:92:21: error: field 'st_mtim' has incomplete type
 #/usr/include/bits/stat.h:93:21: error: field 'st_ctim' has incomplete type
 # FIX: Include <time.h> first.
-Patch3:		libjingle-0.5.1-statfix.patch
+Patch3:		libjingle-0.5.8-statfix.patch
 # md5.h had a typedef for uint32 that did not match the one in basictypes.h
 Patch4:		libjingle-0.5.1-uint32-fix.patch
 # thread.cc: In static member function ‘static bool talk_base::Thread::SleepMs(int)’:
@@ -31,12 +31,12 @@ Patch6:		libjingle-0.5.1-unixfilesystemfix.patch
 # Google seems to love to be stupid with headers.
 # Especially when they're in "third_party" code.
 # Hardcoding paths in include files is dumb.
-Patch7:		libjingle-0.5.1-system-expat.patch
-Patch8:		libjingle-0.5.1-system-srtp.patch
-# Fix devicemanager.cc to compile, alsa as linux default
-Patch9:		libjingle-0.5.2-devicemanager-alsafix.patch
+Patch7:		libjingle-0.5.8-system-expat.patch
+Patch8:		libjingle-0.5.8-system-srtp.patch
+# Fix devicemanager.cc to compile
+Patch9:		libjingle-0.5.8-devicemanager-fix.patch
 # Fix v4llookup.cc to compile
-Patch10:	libjingle-0.5.1-v4llookup-fix.patch
+Patch10:	libjingle-0.5.8-v4llookup-fix.patch
 # Fix type and definition conflicts with Chromium
 Patch11:        libjingle-0.5.1-fixconflict.patch
 # Fix 64bit typedefs to not conflict with Chromium, nspr
@@ -44,13 +44,15 @@ Patch12:        libjingle-0.5.1-64bittypes.patch
 # From Chromium, make qname threadsafe
 Patch13:	libjingle-0.5.1-qname-threadsafe.patch
 # Make sure linux.h/linux.cc pulls in config.h for LINUX define
-Patch14:	libjingle-0.5.1-config-linux.patch
+Patch14:	libjingle-0.5.8-config-linux.patch
 # Chromium 12 forks libjingle. Again. :P
-Patch15:	libjingle-0.5.2-chromium12-changes.patch
+Patch15:	libjingle-0.5.8-chromium14-changes.patch
 # Fix 0.5.2 compilation
 Patch16:	libjingle-0.5.2-compilefix.patch
 # Fix missing cstdlib for size_t
 Patch17:	libjingle-0.5.2-size_t.patch
+# Fix obsolete macro usage
+Patch18:	libjingle-0.5.8-fixmacro.patch
 
 BuildRequires:	libtool, autoconf, automake
 BuildRequires:	openssl-devel
@@ -60,6 +62,7 @@ BuildRequires:  alsa-lib-devel
 BuildRequires:	pkgconfig 
 BuildRequires:	kernel-headers
 BuildRequires:	libudev-devel
+Requires:	libudev
 
 %description
 Libjingle is Google Talk's implementation of Jingle and Jingle-Audio
@@ -101,9 +104,10 @@ developing applications that use %{name}.
 %patch12 -p1 -b .64bit
 %patch13 -p1 -b .threadsafe
 %patch14 -p1 -b .config
-%patch15 -p1 -b .chromium12
+%patch15 -p1 -b .chromium14
 %patch16 -p1 -b .compilefix
 %patch17 -p1 -b .size_t
+%patch18 -p1 -b .fixmacro
 
 touch NEWS ChangeLog
 autoreconf -i
@@ -148,6 +152,10 @@ rm -rf $RPM_BUILD_ROOT
 
 
 %changelog
+* Tue Jul 26 2011 Tom Callaway <spot at fedoraproject.org> - 0.5.8-1
+- update to 0.5.8
+- merge Google's unpublished Chromium 14 changes
+
 * Wed Mar 30 2011 Tom Callaway <spot at fedoraproject.org> - 0.5.2-1
 - update to 0.5.2
 - merge Google's unpublished Chromium 12 changes
diff --git a/sources b/sources
index d908674..8d27f4c 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-b5b7e91adb38aa2d79920ad27cec7759  libjingle-0.5.2.zip
+59a03002c94984379e692e50d58edb91  libjingle-0.5.8.zip


More information about the scm-commits mailing list