~ubuntu-branches/ubuntu/utopic/linphone/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/always_ipv4_for_ipv4_hosts.dpatch

  • Committer: Bazaar Package Importer
  • Author(s): Mark Purcell
  • Date: 2010-05-23 10:04:07 UTC
  • mfrom: (1.3.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20100523100407-wev5qrmhwwbs0whh
Tags: 3.3.0-1
* New upstream release

* debian/control: s/is a is an/is an/ (Closes: #582661)
* debian/control s/It main/Its main/ (Closes: #582665) 
* configure --disable-strict (Closes: 561708)
* Cleanup arches libv4l-dev libasound2-dev (Closes: #542595)
* Cleanup debian/watch
* Drop fix_desktop_section.dpatch - included upstream
* Drop desktop-icon.dpatch - included upstream
* Drop always_ipv4_for_ipv4_hosts.dpatch - included upstream
* Drop dpatch
* Upstream dropped /usr/bin/sipomatic

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh /usr/share/dpatch/dpatch-run
2
 
## always_ipv4_for_ipv4 hosts.dpatch by Lionel Elie Mamane <lionel@mamane.lu>
3
 
##
4
 
## All lines beginning with `## DP:' are a description of the patch.
5
 
## DP: Identify with IPv4 address to IPv4 host even if it has an AAAA DNS RR
6
 
 
7
 
@DPATCH@
8
 
--- linphone-3.2.1.orig/coreapi/linphonecore.c
9
 
+++ linphone-3.2.1/coreapi/linphonecore.c
10
 
@@ -788,7 +788,7 @@
11
 
                return;
12
 
        }
13
 
        if (dest==NULL) dest="87.98.157.38"; /*a public IP address*/
14
 
-       if (linphone_core_get_local_ip_for(dest,result)==0)
15
 
+       if (linphone_core_get_local_ip_for(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET, dest,result)==0)
16
 
                return;
17
 
        /*else fallback to exosip routine that will attempt to find the most realistic interface */
18
 
        if (eXosip_guess_localip(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET,result,LINPHONE_IPADDR_SIZE)<0){
19
 
only in patch2:
20
 
unchanged:
21
 
--- linphone-3.2.1.orig/coreapi/misc.c
22
 
+++ linphone-3.2.1/coreapi/misc.c
23
 
@@ -746,7 +746,7 @@
24
 
        return -1;
25
 
 }
26
 
 
27
 
-int linphone_core_get_local_ip_for(const char *dest, char *result){
28
 
+int linphone_core_get_local_ip_for(int family, const char *dest, char *result){
29
 
        int err,tmp;
30
 
        struct addrinfo hints;
31
 
        struct addrinfo *res=NULL;
32
 
@@ -755,7 +755,7 @@
33
 
        socklen_t s;
34
 
 
35
 
        memset(&hints,0,sizeof(hints));
36
 
-       hints.ai_family=PF_UNSPEC;
37
 
+       hints.ai_family=family;
38
 
        hints.ai_socktype=SOCK_DGRAM;
39
 
        /*hints.ai_flags=AI_NUMERICHOST|AI_CANONNAME;*/
40
 
        err=getaddrinfo(dest,"5060",&hints,&res);
41
 
only in patch2:
42
 
unchanged:
43
 
--- linphone-3.2.1.orig/coreapi/private.h
44
 
+++ linphone-3.2.1/coreapi/private.h
45
 
@@ -188,6 +188,6 @@
46
 
 void linphone_proxy_config_update(LinphoneProxyConfig *cfg);
47
 
 void linphone_proxy_config_get_contact(LinphoneProxyConfig *cfg, const char **ip, int *port);
48
 
 LinphoneProxyConfig * linphone_core_lookup_known_proxy(LinphoneCore *lc, const char *uri);
49
 
-int linphone_core_get_local_ip_for(const char *dest, char *result);
50
 
+int linphone_core_get_local_ip_for(int family, const char *dest, char *result);
51
 
 
52
 
 #endif /* _PRIVATE_H */