]> sjero.net Git - linphone/commitdiff
fix macos build and crash at exit from dock.
authorSimon Morlat <simon.morlat@linphone.org>
Mon, 9 Jan 2012 11:07:11 +0000 (12:07 +0100)
committerSimon Morlat <simon.morlat@linphone.org>
Mon, 9 Jan 2012 11:07:11 +0000 (12:07 +0100)
README.macos
coreapi/sal_eXosip2.c
gtk/main.c
m4/exosip.m4
mediastreamer2

index 98b5b9fb60adf78a30ae815e577d859bf7b38878..d8c07159056b4c6d8b3a7a46b72ae3294f52fee7 100644 (file)
@@ -15,26 +15,18 @@ You need:
  $ port install libosip2
  $ port install libeXosip2
  $ port install ffmpeg-devel
-
-- Install SDL (for video display)
-Unfortunately the current (august 2011) version of sdl in macports crashes all the time. Fortunately these bugs are fixed in the development branch of SDL.
-So we recommend to download SDL 1.3 with mercurial (hg) and compile it by yourself, like this:
-First, make sure you have mercurial:
- $ sudo port install mercurial
-Fetch SDL:
- $ hg clone http://hg.libsdl.org/SDL
-Compile:
- $ cd SDL 
- $ ./autogen.sh
- $ ./configure --prefix=/opt/local && make -j4
+- Install srtp (optional) for call encryption
+ $ port install srtp
+ If that fails, get from source:
+ $ git clone git://git.linphone.org/srtp.git
+ $ cd srtp && autoconf && ./configure --prefix=/opt/local && make libsrtp.a
  $ sudo make install
 
 When this version will be integrated into macports, only this will be necessary:
  $ port install libsdl-devel
 
 - Install gtk. It is recommended to use the quartz backend for better integration.
- $ port install cairo +quartz +no_x11
- $ port install pango +quartz +no_x11
  $ port install gtk2 +quartz +no_x11
  $ port install ige-mac-integration
  $ port install hicolor-icon-theme
@@ -45,7 +37,7 @@ If you got the source code from git, run ./autogen.sh first.
 
 Then or otherwise, do:
        
- $ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 && make
+ $ ./configure --prefix=/opt/local --with-readline=/opt/local --disable-strict --disable-x11 --with-srtp=/opt/local && make
 
 Install to /opt/local
 
@@ -58,6 +50,8 @@ Use git:
  $ git clone https://github.com/jralls/gtk-mac-bundler.git 
  $ cd gtk-mac-bundler && make install
  $ export PATH=$PATH:~/.local/bin
+ #make this dummy charset.alias file for the bundler to be happy:
+ $ sudo touch touch /opt/local/lib/charset.alias
 
 Then run, inside linphone source tree:
  1. Run configure as told before but with "--enable-relativeprefix" appended.
index 533fa860abd0cc53111ed1f892948ffe12fcbfcf..7a2f3e051b37fc795429aa136577a264f4c9677f 100644 (file)
@@ -374,17 +374,14 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
                        memset(&tlsCtx, 0, sizeof(tlsCtx));
                        snprintf(tlsCtx.root_ca_cert, sizeof(tlsCtx.client.cert), "%s", ctx->rootCa);
                        eXosip_set_tls_ctx(&tlsCtx);
-               }
+               }                       
+#ifdef HAVE_EXOSIP_TLS_VERIFY_CERTIFICATE
                eXosip_tls_verify_certificate(ctx->verify_server_certs);
+#endif
                break;
        default:
                ms_warning("unexpected proto, using datagram");
        }
-#if 0
-       /* it does not work, exosip does not implement this option correctly*/
-       err=0;
-       eXosip_set_option(EXOSIP_OPT_DNS_CAPABILITIES,&err); /*0=no NAPTR */
-#endif
        /*see if it looks like an IPv6 address*/
        int use_rports = ctx->use_rports; // Copy char to int to avoid bad alignment
        eXosip_set_option(EXOSIP_OPT_USE_RPORT,&use_rports);
@@ -399,10 +396,6 @@ int sal_listen_port(Sal *ctx, const char *addr, int port, SalTransport tr, int i
                return -1;
        }
        err=eXosip_listen_addr(proto, addr, port, ipv6 ?  PF_INET6 : PF_INET, is_secure);
-#ifdef HAVE_EXOSIP_GET_SOCKET
-       ms_message("Exosip has socket number %i",eXosip_get_socket(proto));
-#endif
-       
        ctx->running=TRUE;
        return err;
 }
@@ -451,7 +444,9 @@ void sal_set_root_ca(Sal* ctx, const char* rootCa) {
 
 void sal_verify_server_certificates(Sal *ctx, bool_t verify){
        ctx->verify_server_certs=verify;
+#ifdef HAVE_EXOSIP_TLS_VERIFY_CERTIFICATE
        eXosip_tls_verify_certificate(verify);
+#endif
 }
 
 static int extract_received_rport(osip_message_t *msg, const char **received, int *rportval,SalTransport* transport){
index 73e99cc964cf9fbc72239a0d559fdefb23ffa5a9..d577b3315f2ceefff52766de1fd58d1f3a1f8745 100644 (file)
@@ -1583,14 +1583,19 @@ static void linphone_gtk_check_soundcards(){
 }
 
 static void linphone_gtk_quit(void){
-       linphone_gtk_uninit_instance();
-       linphone_gtk_destroy_log_window();
-       linphone_core_destroy(the_core);
-       linphone_gtk_log_uninit();
+       static gboolean quit_done=FALSE;
+       if (!quit_done){
+               quit_done=TRUE;
+               g_source_remove_by_user_data(linphone_gtk_get_core());
+               linphone_gtk_uninit_instance();
+               linphone_gtk_destroy_log_window();
+               linphone_core_destroy(the_core);
+               linphone_gtk_log_uninit();
 #ifdef HAVE_NOTIFY
-       notify_uninit();
+               notify_uninit();
 #endif
-       gdk_threads_leave();
+               gdk_threads_leave();
+       }
 }
 
 #ifdef HAVE_GTK_OSX
index 921e3353b38bbf1b5d288b8f04a76a66d3216b82..9be357f71a27e5b5e625803d5959b75e4120a212 100644 (file)
@@ -42,6 +42,10 @@ AC_CHECK_LIB([eXosip2],[eXosip_get_version],
        [AC_DEFINE([HAVE_EXOSIP_GET_VERSION],[1],[Defined when eXosip_get_version is available])],
        [],
        [-losipparser2 -losip2 ])
+AC_CHECK_LIB([eXosip2],[eXosip_tls_verify_certificate],
+       [AC_DEFINE([HAVE_EXOSIP_TLS_VERIFY_CERTIFICATE],[1],[Defined when eXosip_tls_verify_certificate is available])],
+       [AC_MSG_WARN([Could not find eXosip_tls_verify_certificate in eXosip2 !])],
+       [-losipparser2 -losip2 ])
 AC_CHECK_LIB([eXosip2],[eXosip_get_socket],
        [AC_DEFINE([HAVE_EXOSIP_GET_SOCKET],[1],[Defined when eXosip_get_socket is available])],
        [AC_MSG_WARN([Could not find eXosip_get_socket in eXosip2 !])],
index 0d7553a33aba3237f76b742a42af1802c3b74ec3..668bdcc2c04a487fb94f31b7790ef301908c47b5 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 0d7553a33aba3237f76b742a42af1802c3b74ec3
+Subproject commit 668bdcc2c04a487fb94f31b7790ef301908c47b5