Revision eba6bc129722d75a6ff3126b9c9834aadf296a63

evands at pidgin.im evands at pidgin.im
Tue Mar 27 00:39:40 EDT 2007


o   -----------------------------------------------------------------
|   Revision: eba6bc129722d75a6ff3126b9c9834aadf296a63
|   Ancestor: 8977225fd5865020bc47afb7012cf60d2b21e6ae
|   Author: evands at pidgin.im
|   Date: 2007-03-27T04:33:51
|   Branch: im.pidgin.pidgin
|   
|   Modified files:
|           libpurple/nat-pmp.c
|   
|   ChangeLog: 
|   
|   Using rt_msghdr instead of rt_msghdr2 compiles on a greater number of systems -- specifically Mac OS X 10.3.x, in addition to the previous compilation on OS X 10.4.x and above -- and seems to work just as well. If anyone knows how the use of these seemingly very similar structs differs, enlightenment would be appreciated.
|   
|   ============================================================
|   --- libpurple/nat-pmp.c	1b6d5102afaebd88f9a17983cdc37b21c36ac1e2
|   +++ libpurple/nat-pmp.c	0cc6b65d22e43ee71a150d303771e55a580a794a
|   @@ -49,7 +49,7 @@
|    #include <sys/types.h>
|    #include <net/if.h>
|    
|   -#ifdef NET_RT_DUMP2
|   +#ifdef NET_RT_DUMP
|    
|    #define PMP_DEBUG	1
|    
|   @@ -148,7 +148,7 @@ default_gw()
|    	int mib[6];
|        size_t needed;
|        char *buf, *next, *lim;
|   -    struct rt_msghdr2 *rtm;
|   +    struct rt_msghdr *rtm;
|        struct sockaddr *sa;
|    	struct sockaddr_in *sin = NULL;
|    	gboolean found = FALSE;
|   @@ -157,7 +157,7 @@ default_gw()
|        mib[1] = PF_ROUTE; /* entire routing table or a subset of it */
|        mib[2] = 0; /* protocol number - always 0 */
|        mib[3] = 0; /* address family - 0 for all addres families */
|   -    mib[4] = NET_RT_DUMP2;
|   +    mib[4] = NET_RT_DUMP;
|        mib[5] = 0;
|    
|    	/* Determine the buffer side needed to get the full routing table */
|   @@ -184,7 +184,7 @@ default_gw()
|    
|        for (next = buf; next < lim; next += rtm->rtm_msglen) 
|    	{
|   -		rtm = (struct rt_msghdr2 *)next;
|   +		rtm = (struct rt_msghdr *)next;
|    		sa = (struct sockaddr *)(rtm + 1);
|    		
|    		if (sa->sa_family == AF_INET) 
|   @@ -458,7 +458,7 @@ purple_pmp_destroy_map(PurplePmpType typ
|    
|    	return success;
|    }
|   -#else /* #ifdef NET_RT_DUMP2 */
|   +#else /* #ifdef NET_RT_DUMP */
|    char *
|    purple_pmp_get_public_ip()
|    {
|   @@ -476,4 +476,4 @@ purple_pmp_destroy_map(PurplePmpType typ
|    {
|    	return FALSE;
|    }
|   +#endif /* #ifndef NET_RT_DUMP */
|   -#endif /* #ifndef NET_RT_DUMP2 */

To get the patch for this revision, please do this:
mtn log --last 1 --diffs --from eba6bc129722d75a6ff3126b9c9834aadf296a63


More information about the Commits mailing list