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
ff6ad0df
Kaydet (Commit)
ff6ad0df
authored
Şub 03, 2015
tarafından
Tor Lillqvist
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Let's use log tags starting with "sal" here in sal
üst
d6dd2093
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
19 deletions
+19
-19
pipe.cxx
sal/osl/unx/pipe.cxx
+19
-19
No files found.
sal/osl/unx/pipe.cxx
Dosyayı görüntüle @
ff6ad0df
...
@@ -209,7 +209,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -209,7 +209,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
if
(
bNameTooLong
)
if
(
bNameTooLong
)
{
{
SAL_WARN
(
"osl.pipe"
,
"osl_createPipe: pipe name too long"
);
SAL_WARN
(
"
sal.
osl.pipe"
,
"osl_createPipe: pipe name too long"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -223,7 +223,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -223,7 +223,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
pPipe
->
m_Socket
=
socket
(
AF_UNIX
,
SOCK_STREAM
,
0
);
pPipe
->
m_Socket
=
socket
(
AF_UNIX
,
SOCK_STREAM
,
0
);
if
(
pPipe
->
m_Socket
<
0
)
if
(
pPipe
->
m_Socket
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"socket() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"socket() failed: "
<<
strerror
(
errno
));
__osl_destroyPipeImpl
(
pPipe
);
__osl_destroyPipeImpl
(
pPipe
);
return
NULL
;
return
NULL
;
}
}
...
@@ -234,13 +234,13 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -234,13 +234,13 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
Flags
|=
FD_CLOEXEC
;
Flags
|=
FD_CLOEXEC
;
if
(
fcntl
(
pPipe
->
m_Socket
,
F_SETFD
,
Flags
)
==
-
1
)
if
(
fcntl
(
pPipe
->
m_Socket
,
F_SETFD
,
Flags
)
==
-
1
)
{
{
SAL_WARN
(
"osl.pipe"
,
"fcntl() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"fcntl() failed: "
<<
strerror
(
errno
));
}
}
}
}
memset
(
&
addr
,
0
,
sizeof
(
addr
));
memset
(
&
addr
,
0
,
sizeof
(
addr
));
SAL_INFO
(
"osl.pipe"
,
"new pipe on fd "
<<
pPipe
->
m_Socket
<<
" '"
<<
name
<<
"'"
);
SAL_INFO
(
"
sal.
osl.pipe"
,
"new pipe on fd "
<<
pPipe
->
m_Socket
<<
" '"
<<
name
<<
"'"
);
addr
.
sun_family
=
AF_UNIX
;
addr
.
sun_family
=
AF_UNIX
;
strncpy
(
addr
.
sun_path
,
name
,
sizeof
(
addr
.
sun_path
)
-
1
);
strncpy
(
addr
.
sun_path
,
name
,
sizeof
(
addr
.
sun_path
)
-
1
);
...
@@ -260,7 +260,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -260,7 +260,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
{
{
if
(
connect
(
pPipe
->
m_Socket
,
reinterpret_cast
<
sockaddr
*>
(
&
addr
),
len
)
>=
0
)
if
(
connect
(
pPipe
->
m_Socket
,
reinterpret_cast
<
sockaddr
*>
(
&
addr
),
len
)
>=
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"connect() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"connect() failed: "
<<
strerror
(
errno
));
close
(
pPipe
->
m_Socket
);
close
(
pPipe
->
m_Socket
);
__osl_destroyPipeImpl
(
pPipe
);
__osl_destroyPipeImpl
(
pPipe
);
return
NULL
;
return
NULL
;
...
@@ -272,7 +272,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -272,7 +272,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
/* ok, fs clean */
/* ok, fs clean */
if
(
bind
(
pPipe
->
m_Socket
,
reinterpret_cast
<
sockaddr
*>
(
&
addr
),
len
)
<
0
)
if
(
bind
(
pPipe
->
m_Socket
,
reinterpret_cast
<
sockaddr
*>
(
&
addr
),
len
)
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"bind() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"bind() failed: "
<<
strerror
(
errno
));
close
(
pPipe
->
m_Socket
);
close
(
pPipe
->
m_Socket
);
__osl_destroyPipeImpl
(
pPipe
);
__osl_destroyPipeImpl
(
pPipe
);
return
NULL
;
return
NULL
;
...
@@ -288,7 +288,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -288,7 +288,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
if
(
listen
(
pPipe
->
m_Socket
,
5
)
<
0
)
if
(
listen
(
pPipe
->
m_Socket
,
5
)
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"listen() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"listen() failed: "
<<
strerror
(
errno
));
// coverity[toctou] cid#1255391 warns about unlink(name) after
// coverity[toctou] cid#1255391 warns about unlink(name) after
// stat(name, &status) above, but the intervening call to bind makes
// stat(name, &status) above, but the intervening call to bind makes
// those two clearly unrelated, as it would fail if name existed at
// those two clearly unrelated, as it would fail if name existed at
...
@@ -310,7 +310,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
...
@@ -310,7 +310,7 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions
return
(
pPipe
);
return
(
pPipe
);
}
}
SAL_WARN
(
"osl.pipe"
,
"connect() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"connect() failed: "
<<
strerror
(
errno
));
}
}
close
(
pPipe
->
m_Socket
);
close
(
pPipe
->
m_Socket
);
...
@@ -370,12 +370,12 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
...
@@ -370,12 +370,12 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
int
fd
=
socket
(
AF_UNIX
,
SOCK_STREAM
,
0
);
int
fd
=
socket
(
AF_UNIX
,
SOCK_STREAM
,
0
);
if
(
fd
<
0
)
if
(
fd
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"socket() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"socket() failed: "
<<
strerror
(
errno
));
return
;
return
;
}
}
memset
(
&
addr
,
0
,
sizeof
(
addr
));
memset
(
&
addr
,
0
,
sizeof
(
addr
));
SAL_INFO
(
"osl.pipe"
,
"osl_destroyPipe : Pipe Name '"
<<
pPipe
->
m_Name
<<
"'"
);
SAL_INFO
(
"
sal.
osl.pipe"
,
"osl_destroyPipe : Pipe Name '"
<<
pPipe
->
m_Name
<<
"'"
);
addr
.
sun_family
=
AF_UNIX
;
addr
.
sun_family
=
AF_UNIX
;
strncpy
(
addr
.
sun_path
,
pPipe
->
m_Name
,
sizeof
(
addr
.
sun_path
)
-
1
);
strncpy
(
addr
.
sun_path
,
pPipe
->
m_Name
,
sizeof
(
addr
.
sun_path
)
-
1
);
...
@@ -384,7 +384,7 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
...
@@ -384,7 +384,7 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
nRet
=
connect
(
fd
,
reinterpret_cast
<
sockaddr
*>
(
&
addr
),
len
);
nRet
=
connect
(
fd
,
reinterpret_cast
<
sockaddr
*>
(
&
addr
),
len
);
if
(
nRet
<
0
)
if
(
nRet
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"connect() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"connect() failed: "
<<
strerror
(
errno
));
}
}
close
(
fd
);
close
(
fd
);
}
}
...
@@ -393,13 +393,13 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
...
@@ -393,13 +393,13 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
nRet
=
shutdown
(
ConnFD
,
2
);
nRet
=
shutdown
(
ConnFD
,
2
);
if
(
nRet
<
0
)
if
(
nRet
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"shutdown() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"shutdown() failed: "
<<
strerror
(
errno
));
}
}
nRet
=
close
(
ConnFD
);
nRet
=
close
(
ConnFD
);
if
(
nRet
<
0
)
if
(
nRet
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"close() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"close() failed: "
<<
strerror
(
errno
));
}
}
/* remove filesystem entry */
/* remove filesystem entry */
if
(
strlen
(
pPipe
->
m_Name
)
>
0
)
if
(
strlen
(
pPipe
->
m_Name
)
>
0
)
...
@@ -434,7 +434,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
...
@@ -434,7 +434,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
if
(
s
<
0
)
if
(
s
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"accept() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"accept() failed: "
<<
strerror
(
errno
));
return
NULL
;
return
NULL
;
}
}
...
@@ -464,7 +464,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
...
@@ -464,7 +464,7 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
flags
|=
FD_CLOEXEC
;
flags
|=
FD_CLOEXEC
;
if
(
fcntl
(
s
,
F_SETFD
,
flags
)
<
0
)
if
(
fcntl
(
s
,
F_SETFD
,
flags
)
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"fcntl() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"fcntl() failed: "
<<
strerror
(
errno
));
}
}
}
}
...
@@ -484,7 +484,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
...
@@ -484,7 +484,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
if
(
pPipe
==
0
)
if
(
pPipe
==
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"osl_receivePipe: Invalid socket"
);
SAL_WARN
(
"
sal.
osl.pipe"
,
"osl_receivePipe: Invalid socket"
);
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
...
@@ -495,7 +495,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
...
@@ -495,7 +495,7 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
if
(
nRet
<
0
)
if
(
nRet
<
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"recv() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"recv() failed: "
<<
strerror
(
errno
));
}
}
return
nRet
;
return
nRet
;
...
@@ -511,7 +511,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
...
@@ -511,7 +511,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
if
(
pPipe
==
0
)
if
(
pPipe
==
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"osl_sendPipe: Invalid socket"
);
SAL_WARN
(
"
sal.
osl.pipe"
,
"osl_sendPipe: Invalid socket"
);
errno
=
EINVAL
;
errno
=
EINVAL
;
return
-
1
;
return
-
1
;
}
}
...
@@ -522,7 +522,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
...
@@ -522,7 +522,7 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
if
(
nRet
<=
0
)
if
(
nRet
<=
0
)
{
{
SAL_WARN
(
"osl.pipe"
,
"send() failed: "
<<
strerror
(
errno
));
SAL_WARN
(
"
sal.
osl.pipe"
,
"send() failed: "
<<
strerror
(
errno
));
}
}
return
nRet
;
return
nRet
;
...
...
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