Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
3c9047f6
Commit
3c9047f6
authored
Mar 30, 2012
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only save required information
parent
4b59ea39
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
Subscription.pm
PVE/API2/Subscription.pm
+14
-1
No files found.
PVE/API2/Subscription.pm
View file @
3c9047f6
...
...
@@ -62,6 +62,16 @@ sub parse_key {
return
undef
;
}
my
$saved_fields
=
{
key
=>
1
,
checktime
=>
1
,
status
=>
1
,
validdirectory
=>
1
,
productname
=>
1
,
regdate
=>
1
,
nextduedate
=>
1
,
};
sub
check_fields
{
my
(
$info
,
$server_id
,
$req_sockets
)
=
@_
;
...
...
@@ -85,7 +95,7 @@ sub check_fields {
return
undef
if
$info
->
{
status
}
ne
'
Active
';
foreach
my
$f
(
qw(validdirectory productname regdate nextduedate)
)
{
foreach
my
$f
(
keys
%
$saved_fields
)
{
if
(
!
$info
->
{
$f
})
{
die
"
Missing field '
$f
'
\n
";
}
...
...
@@ -233,6 +243,7 @@ sub check_subscription {
my
$subinfo
=
{};
while
(
$raw
=~
m/<(.*?)>([^<]+)<\/\1>/g
)
{
my
(
$k
,
$v
)
=
(
$1
,
$2
);
next
if
!
(
$k
eq
'
md5hash
'
||
$saved_fields
->
{
$k
});
$subinfo
->
{
$k
}
=
$v
;
}
$subinfo
->
{
checktime
}
=
time
();
...
...
@@ -245,6 +256,8 @@ sub check_subscription {
}
}
delete
$subinfo
->
{
md5hash
};
check_fields
(
$subinfo
,
$server_id
,
$req_sockets
);
return
$subinfo
;
...
...
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