]> de.git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
now uses getsockname to find out what address/port a newly opened socket is at, so...
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 1 Apr 2004 22:07:23 +0000 (22:07 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Thu, 1 Apr 2004 22:07:23 +0000 (22:07 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@4072 d7cf8633-e32d-0410-b094-e92efae38249

lhnet.c

diff --git a/lhnet.c b/lhnet.c
index 58033bac8fe18646028a5621af32c318a558a675..267dc462ee8a497b766fb1f3f7edbbeccf7d90d9 100644 (file)
--- a/lhnet.c
+++ b/lhnet.c
@@ -459,6 +459,7 @@ lhnetsocket_t *LHNET_OpenSocket_Connectionless(lhnetaddress_t *address)
                                        {
                                                if (bind(lhnetsocket->inetsocket, (void *)&lhnetsocket->address.addressdata, address->addresstype == LHNETADDRESSTYPE_INET6 ? sizeof(lhnetsocket->address.addressdata.inet6) : sizeof(lhnetsocket->address.addressdata.inet4)) != -1)
                                                {
+                                                       getsockname(lhnetsocket->inetsocket, (void *)&lhnetsocket->address.addressdata, address->addresstype == LHNETADDRESSTYPE_INET6 ? sizeof(lhnetsocket->address.addressdata.inet6) : sizeof(lhnetsocket->address.addressdata.inet4));
                                                        lhnetsocket->next = &lhnet_socketlist;
                                                        lhnetsocket->prev = lhnetsocket->next->prev;
                                                        lhnetsocket->next->prev = lhnetsocket;