Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
auto-tx
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
vamp
auto-tx
Commits
ae9b9a27
Commit
ae9b9a27
authored
7 years ago
by
Niko Ehrenfeuchter
Browse files
Options
Downloads
Patches
Plain Diff
Make ServiceSuspended part of the status class.
parent
7e671c4d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AutoTx/AutoTx.cs
+4
-4
4 additions, 4 deletions
AutoTx/AutoTx.cs
AutoTx/SystemChecks.cs
+0
-5
0 additions, 5 deletions
AutoTx/SystemChecks.cs
AutoTx/XmlConfiguration.cs
+10
-0
10 additions, 0 deletions
AutoTx/XmlConfiguration.cs
with
14 additions
and
9 deletions
AutoTx/AutoTx.cs
+
4
−
4
View file @
ae9b9a27
...
...
@@ -418,7 +418,7 @@ namespace AutoTx
// all parameters within valid ranges, so set the state to "Running":
if
(
string
.
IsNullOrEmpty
(
limitReason
))
{
_serviceSuspended
=
false
;
_s
tatus
.
S
erviceSuspended
=
false
;
if
(!
string
.
IsNullOrEmpty
(
_status
.
LimitReason
))
{
_status
.
LimitReason
=
""
;
// reset to force a message on next service suspend
writeLog
(
"Service resuming operation (all parameters in valid ranges)."
);
...
...
@@ -428,7 +428,7 @@ namespace AutoTx
// set state to "Running" if no-one is logged on:
if
(
NoUserIsLoggedOn
())
{
_serviceSuspended
=
false
;
_s
tatus
.
S
erviceSuspended
=
false
;
if
(!
string
.
IsNullOrEmpty
(
_status
.
LimitReason
))
{
_status
.
LimitReason
=
""
;
// reset to force a message on next service suspend
writeLog
(
"Service resuming operation (no user logged on)."
);
...
...
@@ -437,7 +437,7 @@ namespace AutoTx
}
// by reaching this point we know the service should be suspended:
_serviceSuspended
=
true
;
_s
tatus
.
S
erviceSuspended
=
true
;
if
(
limitReason
==
_status
.
LimitReason
)
return
;
writeLog
(
"Service suspended due to limitiations ["
+
limitReason
+
"]."
);
...
...
@@ -458,7 +458,7 @@ namespace AutoTx
CreateIncomingDirectories
();
// tasks depending on the service state:
if
(
_serviceSuspended
)
{
if
(
_s
tatus
.
S
erviceSuspended
)
{
// make sure to pause any running transfer:
PauseTransfer
();
}
else
{
...
...
This diff is collapsed.
Click to expand it.
AutoTx/SystemChecks.cs
+
0
−
5
View file @
ae9b9a27
...
...
@@ -7,11 +7,6 @@ namespace AutoTx
{
public
partial
class
AutoTx
{
#
region
global
variables
private
bool
_serviceSuspended
;
// TODO: this should be part of _status!
#
endregion
/// <summary>
/// Get the available physical memory in MB.
...
...
This diff is collapsed.
Click to expand it.
AutoTx/XmlConfiguration.cs
+
10
−
0
View file @
ae9b9a27
...
...
@@ -127,6 +127,7 @@ namespace AutoTx
string
_currentTargetTmp
;
bool
_filecopyFinished
;
private
bool
_serviceSuspended
;
private
bool
_cleanShutdown
;
private
long
_currentTransferSize
;
...
...
@@ -182,6 +183,15 @@ namespace AutoTx
}
}
public
bool
ServiceSuspended
{
get
{
return
_serviceSuspended
;
}
set
{
_serviceSuspended
=
value
;
log
(
"ServiceSuspended was updated ("
+
value
+
"), calling Serialize()..."
);
Serialize
();
}
}
public
bool
FilecopyFinished
{
get
{
return
_filecopyFinished
;
}
set
{
...
...
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