Changeset 182:f526c16d302a in mediastreamer2


Ignore:
Timestamp:
Nov 30, 2008 10:08:26 AM (5 years ago)
Author:
smorlat <smorlat@…>
Branch:
default
Message:
  • added russian translation
  • ui improvements (closes call upon window destroy)
  • detection of symmetric firewalls.

git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@185 3f6dc0c8-ddfe-455d-9043-3cd528dc4637

Location:
linphone
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • linphone/configure.in

    r72 r182  
    3939dnl Add the languages which your application supports here. 
    4040PKG_PROG_PKG_CONFIG 
    41 ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu" 
     41ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru" 
    4242GETTEXT_PACKAGE=linphone 
    4343AM_GNU_GETTEXT([external]) 
  • linphone/coreapi/misc.c

    r157 r182  
    502502} 
    503503 
    504 static int sendStunRequest(int sock, const struct sockaddr *server, socklen_t addrlen, int id){ 
     504static int sendStunRequest(int sock, const struct sockaddr *server, socklen_t addrlen, int id, bool_t changeAddr){ 
    505505        char buf[STUN_MAX_MESSAGE_SIZE]; 
    506506        int len = STUN_MAX_MESSAGE_SIZE; 
     
    512512        memset(&username,0,sizeof(username)); 
    513513        memset(&password,0,sizeof(password)); 
    514         stunBuildReqSimple( &req, &username, FALSE , FALSE , id); 
     514        stunBuildReqSimple( &req, &username, changeAddr , changeAddr , id); 
    515515        len = stunEncodeMessage( &req, buf, len, &password, FALSE); 
    516516        if (len<=0){ 
     
    555555} 
    556556 
    557 static int recvStunResponse(ortp_socket_t sock, char *ipaddr, int *port){ 
     557static int recvStunResponse(ortp_socket_t sock, char *ipaddr, int *port, int *id){ 
    558558        char buf[STUN_MAX_MESSAGE_SIZE]; 
    559559        int len = STUN_MAX_MESSAGE_SIZE; 
     
    563563                struct in_addr ia; 
    564564                stunParseMessage(buf,len, &resp,FALSE ); 
     565                *id=resp.msgHdr.id.octet[0]; 
    565566                *port = resp.mappedAddress.ipv4.port; 
    566567                ia.s_addr=htonl(resp.mappedAddress.ipv4.addr); 
     
    583584                bool_t video_enabled=linphone_core_video_enabled(lc); 
    584585                bool_t got_audio,got_video; 
     586                bool_t cone_audio=FALSE,cone_video=FALSE; 
    585587                struct timeval init,cur; 
    586588                if (parse_stun_server_addr(server,&ss,&ss_len)<0){ 
     
    598600                        if (sock2<0) return ; 
    599601                } 
    600                 sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,1); 
    601                 if (sock2>=0) 
    602                         sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,2); 
    603                  
     602                sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,11,TRUE); 
     603                sendStunRequest(sock1,(struct sockaddr*)&ss,ss_len,1,FALSE); 
     604                if (sock2>=0){ 
     605                        sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,22,TRUE); 
     606                        sendStunRequest(sock2,(struct sockaddr*)&ss,ss_len,2,FALSE); 
     607                } 
    604608                got_audio=FALSE; 
    605609                got_video=FALSE; 
     
    607611                do{ 
    608612                        double elapsed; 
     613                        int id; 
    609614#ifdef WIN32 
    610615                        Sleep(10); 
     
    614619 
    615620                        if (recvStunResponse(sock1,call->audio_params.natd_addr, 
    616                                                 &call->audio_params.natd_port)>0){ 
     621                                                &call->audio_params.natd_port,&id)>0){ 
    617622                                ms_message("STUN test result: local audio port maps to %s:%i", 
    618623                                                call->audio_params.natd_addr, 
    619624                                                call->audio_params.natd_port); 
     625                                if (id==11) 
     626                                        cone_audio=TRUE; 
    620627                                got_audio=TRUE; 
    621628                        } 
    622629                        if (recvStunResponse(sock2,call->video_params.natd_addr, 
    623                                                         &call->video_params.natd_port)>0){ 
     630                                                        &call->video_params.natd_port,&id)>0){ 
    624631                                ms_message("STUN test result: local video port maps to %s:%i", 
    625632                                        call->video_params.natd_addr, 
    626633                                        call->video_params.natd_port); 
     634                                if (id==22) 
     635                                        cone_video=TRUE; 
    627636                                got_video=TRUE; 
    628637                        } 
     
    633642                if (!got_audio){ 
    634643                        ms_error("No stun server response for audio port."); 
    635                 } 
    636                 if (!got_video && sock2>=0){ 
    637                         ms_error("No stun server response for video port."); 
     644                }else{ 
     645                        if (!cone_audio) { 
     646                                ms_warning("NAT is symmetric for audio port"); 
     647                                call->audio_params.natd_port=0; 
     648                        } 
     649                } 
     650                if (sock2>=0){ 
     651                        if (!got_video){ 
     652                                ms_error("No stun server response for video port."); 
     653                        }else{ 
     654                                if (!cone_video) { 
     655                                        ms_warning("NAT is symmetric for video port."); 
     656                                        call->video_params.natd_port=0; 
     657                                } 
     658                        } 
    638659                } 
    639660                close_socket(sock1); 
  • linphone/gtk-glade/main.c

    r174 r182  
    667667void linphone_gtk_close(){ 
    668668        /* couldn't find a way to prevent closing to destroy the main window*/ 
    669         linphone_core_enable_video_preview(linphone_gtk_get_core(),FALSE); 
     669        LinphoneCore *lc=linphone_gtk_get_core(); 
     670        /*shutdown call if any*/ 
     671        if (linphone_core_in_call(lc)) 
     672                linphone_core_terminate_call(lc,NULL); 
     673        linphone_core_enable_video_preview(lc,FALSE); 
    670674        the_ui=NULL; 
    671675        the_ui=linphone_gtk_create_window("main"); 
  • linphone/m4/exosip.m4

    r0 r182  
    99 
    1010CPPFLAGS_save=$CPPFLAGS 
    11 CPPFLAGS=$OSIP_CFLAGS 
     11CPPFLAGS="$OSIP_CFLAGS $CPPFLAGS" 
    1212AC_CHECK_HEADER([eXosip2/eXosip.h], ,AC_MSG_ERROR([Could not find eXosip2 headers !])) 
    1313CPPFLAGS=$CPPFLAGS_save 
Note: See TracChangeset for help on using the changeset viewer.