Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
708b42b3
Kaydet (Commit)
708b42b3
authored
Mar 09, 2016
tarafından
Stephan Bergmann
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Avoid reserved identifiers
Change-Id: I309985d65752c4aa041cdb7c060c32d4312d442d
üst
8c3b3339
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
socket.cxx
sal/osl/unx/socket.cxx
+10
-10
No files found.
sal/osl/unx/socket.cxx
Dosyayı görüntüle @
708b42b3
...
...
@@ -704,7 +704,7 @@ oslSocketResult SAL_CALL osl_getAddrOfSocketAddr( oslSocketAddr pAddr, sal_Seque
*/
/* wrap around different interfaces to reentrant gethostbyname */
static
struct
hostent
*
_
osl_gethostbyname_r
(
static
struct
hostent
*
osl_gethostbyname_r
(
const
char
*
name
,
struct
hostent
*
result
,
char
*
buffer
,
int
buflen
,
int
*
h_errnop
)
{
...
...
@@ -723,7 +723,7 @@ static struct hostent* _osl_gethostbyname_r (
#endif
}
static
sal_Char
*
_osl_
getFullQualifiedDomainName
(
const
sal_Char
*
pHostName
)
static
sal_Char
*
getFullQualifiedDomainName
(
const
sal_Char
*
pHostName
)
{
struct
hostent
aHostByName
;
struct
hostent
*
pHostByName
;
...
...
@@ -731,7 +731,7 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
sal_Char
*
pFullQualifiedName
=
nullptr
;
int
nErrorNo
;
pHostByName
=
_
osl_gethostbyname_r
(
pHostByName
=
osl_gethostbyname_r
(
pHostName
,
&
aHostByName
,
pQualifiedHostBuffer
,
sizeof
(
pQualifiedHostBuffer
),
&
nErrorNo
);
...
...
@@ -742,7 +742,7 @@ static sal_Char* _osl_getFullQualifiedDomainName (const sal_Char *pHostName)
return
pFullQualifiedName
;
}
static
bool
_osl_
isFullQualifiedDomainName
(
const
sal_Char
*
pHostName
)
static
bool
isFullQualifiedDomainName
(
const
sal_Char
*
pHostName
)
{
/* a FQDN (aka 'hostname.domain.top_level_domain' )
* is a name which contains a dot '.' in it ( would
...
...
@@ -757,7 +757,7 @@ struct oslHostAddrImpl
oslSocketAddr
pSockAddr
;
};
static
oslHostAddr
_osl_
hostentToHostAddr
(
const
struct
hostent
*
he
)
static
oslHostAddr
hostentToHostAddr
(
const
struct
hostent
*
he
)
{
oslHostAddr
pAddr
=
nullptr
;
oslSocketAddr
pSockAddr
=
nullptr
;
...
...
@@ -767,7 +767,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he)
if
((
he
==
nullptr
)
||
(
he
->
h_name
==
nullptr
)
||
(
he
->
h_addr_list
[
0
]
==
nullptr
))
return
nullptr
;
if
(
_osl_
isFullQualifiedDomainName
(
he
->
h_name
))
if
(
isFullQualifiedDomainName
(
he
->
h_name
))
{
cn
=
strdup
(
he
->
h_name
);
SAL_WARN_IF
(
!
cn
,
"sal.osl"
,
"insufficient memory"
);
...
...
@@ -776,7 +776,7 @@ static oslHostAddr _osl_hostentToHostAddr (const struct hostent *he)
}
else
{
cn
=
_osl_
getFullQualifiedDomainName
(
he
->
h_name
);
cn
=
getFullQualifiedDomainName
(
he
->
h_name
);
SAL_WARN_IF
(
!
cn
,
"sal.osl"
,
"couldn't get full qualified domain name"
);
if
(
cn
==
nullptr
)
return
nullptr
;
...
...
@@ -918,12 +918,12 @@ oslHostAddr SAL_CALL osl_psz_createHostAddrByName (const sal_Char *pszHostname)
sal_Char
heBuffer
[
MAX_HOSTBUFFER_SIZE
];
int
nErrorNo
;
pHe
=
_
osl_gethostbyname_r
(
pHe
=
osl_gethostbyname_r
(
pszHostname
,
&
aHe
,
heBuffer
,
sizeof
(
heBuffer
),
&
nErrorNo
);
return
_osl_
hostentToHostAddr
(
pHe
);
return
hostentToHostAddr
(
pHe
);
}
oslHostAddr
SAL_CALL
osl_createHostAddrByAddr
(
const
oslSocketAddr
pAddr
)
...
...
@@ -947,7 +947,7 @@ oslHostAddr SAL_CALL osl_createHostAddrByAddr (const oslSocketAddr pAddr)
he
=
gethostbyaddr
(
addr
,
sizeof
(
sin
->
sin_addr
),
sin
->
sin_family
);
return
_osl_
hostentToHostAddr
(
he
);
return
hostentToHostAddr
(
he
);
}
return
nullptr
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment