Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
flatpak-qt-creator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Bubke
flatpak-qt-creator
Commits
d8bdafd4
Commit
d8bdafd4
authored
14 years ago
by
qt-info@nokia.com
Committed by
ck
14 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Maemo: Fix race condition in remote mounter.
Wait until UTFS client has detached before starting the server.
parent
76561b92
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
+6
-27
6 additions, 27 deletions
...plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h
+0
-1
0 additions, 1 deletion
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h
with
6 additions
and
28 deletions
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.cpp
+
6
−
27
View file @
d8bdafd4
...
...
@@ -229,7 +229,7 @@ void MaemoRemoteMounter::startUtfsClients()
const
QString
chmod
=
QString
::
fromLocal8Bit
(
"%1 chmod a+r+w+x %2"
)
.
arg
(
MaemoGlobal
::
remoteSudo
(),
mountSpec
.
remoteMountPoint
);
QString
utfsClient
=
QString
::
fromLocal8Bit
(
"%1 -l %2 -r %2 -b %2 %4"
)
=
QString
::
fromLocal8Bit
(
"%1
--detach
-l %2 -r %2 -b %2 %4"
)
.
arg
(
utfsClientOnDevice
()).
arg
(
mountSpec
.
remotePort
)
.
arg
(
mountSpec
.
remoteMountPoint
);
if
(
m_mountSpecs
.
at
(
i
).
mountAsRoot
)
...
...
@@ -240,8 +240,6 @@ void MaemoRemoteMounter::startUtfsClients()
emit
reportProgress
(
tr
(
"Starting remote UTFS clients..."
));
m_utfsClientStderr
.
clear
();
m_mountProcess
=
m_connection
->
createRemoteProcess
(
remoteCall
.
toUtf8
());
connect
(
m_mountProcess
.
data
(),
SIGNAL
(
started
()),
this
,
SLOT
(
handleUtfsClientsStarted
()));
connect
(
m_mountProcess
.
data
(),
SIGNAL
(
closed
(
int
)),
this
,
SLOT
(
handleUtfsClientsFinished
(
int
)));
connect
(
m_mountProcess
.
data
(),
SIGNAL
(
errorOutputAvailable
(
QByteArray
)),
...
...
@@ -249,36 +247,17 @@ void MaemoRemoteMounter::startUtfsClients()
m_mountProcess
->
start
();
}
void
MaemoRemoteMounter
::
handleUtfsClientsStarted
()
{
if
(
!
m_stop
)
startUtfsServers
();
}
void
MaemoRemoteMounter
::
handleUtfsClientsFinished
(
int
exitStatus
)
{
if
(
m_stop
)
return
;
QString
errMsg
;
switch
(
exitStatus
)
{
case
SshRemoteProcess
::
FailedToStart
:
errMsg
=
tr
(
"Could not execute mount request."
);
break
;
case
SshRemoteProcess
::
KilledBySignal
:
errMsg
=
tr
(
"Failure running UTFS client: %1"
)
if
(
exitStatus
==
SshRemoteProcess
::
ExitedNormally
&&
m_mountProcess
->
exitCode
()
==
0
)
{
startUtfsServers
();
}
else
{
QString
errMsg
=
tr
(
"Failure running UTFS client: %1"
)
.
arg
(
m_mountProcess
->
errorString
());
break
;
case
SshRemoteProcess
::
ExitedNormally
:
if
(
m_mountProcess
->
exitCode
()
!=
0
)
errMsg
=
tr
(
"Could not execute mount request."
);
break
;
default:
Q_ASSERT_X
(
false
,
Q_FUNC_INFO
,
"Impossible SshRemoteProcess exit status."
);
}
if
(
!
errMsg
.
isEmpty
())
{
if
(
!
m_utfsClientStderr
.
isEmpty
())
errMsg
+=
tr
(
"
\n
stderr was: '%1'"
)
.
arg
(
QString
::
fromUtf8
(
m_utfsClientStderr
));
...
...
This diff is collapsed.
Click to expand it.
src/plugins/qt4projectmanager/qt-maemo/maemoremotemounter.h
+
0
−
1
View file @
d8bdafd4
...
...
@@ -76,7 +76,6 @@ private slots:
void
handleUploaderInitialized
();
void
handleUploaderInitializationFailed
(
const
QString
&
reason
);
void
handleUploadFinished
(
Core
::
SftpJobId
jobId
,
const
QString
&
error
);
void
handleUtfsClientsStarted
();
void
handleUtfsClientsFinished
(
int
exitStatus
);
void
handleUnmountProcessFinished
(
int
exitStatus
);
void
handleUtfsClientStderr
(
const
QByteArray
&
output
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment