Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
z-push
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
Björn Fischer
z-push
Commits
64e2a2fc
Commit
64e2a2fc
authored
May 19, 2016
by
Sebastian Kummer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZP-837 Fixed tpo!.
Released under the Affero GNU General Public License (AGPL) version 3.
parent
9a8de89c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
config.php
src/config.php
+2
-2
request.php
src/lib/request/request.php
+2
-2
sync.php
src/lib/request/sync.php
+4
-3
No files found.
src/config.php
View file @
64e2a2fc
...
@@ -269,8 +269,8 @@
...
@@ -269,8 +269,8 @@
// If a timeout is almost reached the server will break and sent the results it has until this
// If a timeout is almost reached the server will break and sent the results it has until this
// point. You can add DeviceType strings to the categories.
// point. You can add DeviceType strings to the categories.
// In general longer timeouts are better, because more data can be streamed at once.
// In general longer timeouts are better, because more data can be streamed at once.
define
(
'SYNC_TIMOUT_MEDIUM_DEVICETYPES'
,
"SAMSUNGGTI"
);
define
(
'SYNC_TIM
E
OUT_MEDIUM_DEVICETYPES'
,
"SAMSUNGGTI"
);
define
(
'SYNC_TIMOUT_LONG_DEVICETYPES'
,
"iPod, iPad, iPhone, WP, WindowsOutlook"
);
define
(
'SYNC_TIM
E
OUT_LONG_DEVICETYPES'
,
"iPod, iPad, iPhone, WP, WindowsOutlook"
);
/**********************************************************************************
/**********************************************************************************
* Backend settings
* Backend settings
...
...
src/lib/request/request.php
View file @
64e2a2fc
...
@@ -628,11 +628,11 @@ class Request {
...
@@ -628,11 +628,11 @@ class Request {
if
(
!
isset
(
self
::
$expectedConnectionTimeout
))
{
if
(
!
isset
(
self
::
$expectedConnectionTimeout
))
{
// Apple and Windows Phone have higher timeouts (4min = 240sec)
// Apple and Windows Phone have higher timeouts (4min = 240sec)
if
(
stripos
(
SYNC_TIMOUT_LONG_DEVICETYPES
,
self
::
GetDeviceType
())
!==
false
)
{
if
(
stripos
(
SYNC_TIM
E
OUT_LONG_DEVICETYPES
,
self
::
GetDeviceType
())
!==
false
)
{
self
::
$expectedConnectionTimeout
=
210
;
self
::
$expectedConnectionTimeout
=
210
;
}
}
// Samsung devices have a intermediate timeout (90sec)
// Samsung devices have a intermediate timeout (90sec)
else
if
(
stripos
(
SYNC_TIMOUT_MEDIUM_DEVICETYPES
,
self
::
GetDeviceType
())
!==
false
)
{
else
if
(
stripos
(
SYNC_TIM
E
OUT_MEDIUM_DEVICETYPES
,
self
::
GetDeviceType
())
!==
false
)
{
self
::
$expectedConnectionTimeout
=
85
;
self
::
$expectedConnectionTimeout
=
85
;
}
}
else
{
else
{
...
...
src/lib/request/sync.php
View file @
64e2a2fc
...
@@ -1089,7 +1089,7 @@ class Sync extends RequestProcessor {
...
@@ -1089,7 +1089,7 @@ class Sync extends RequestProcessor {
}
}
if
(
$sc
->
GetParameter
(
$spa
,
"getchanges"
)
&&
$spa
->
HasFolderId
()
&&
$spa
->
HasContentClass
()
&&
$spa
->
HasSyncKey
())
{
if
(
$sc
->
GetParameter
(
$spa
,
"getchanges"
)
&&
$spa
->
HasFolderId
()
&&
$spa
->
HasContentClass
()
&&
$spa
->
HasSyncKey
())
{
$moreAvailbleSent
=
false
;
$moreAvail
a
bleSent
=
false
;
$windowSize
=
self
::
$deviceManager
->
GetWindowSize
(
$spa
->
GetFolderId
(),
$spa
->
GetUuid
(),
$spa
->
GetUuidCounter
(),
$changecount
);
$windowSize
=
self
::
$deviceManager
->
GetWindowSize
(
$spa
->
GetFolderId
(),
$spa
->
GetUuid
(),
$spa
->
GetUuidCounter
(),
$changecount
);
// limit windowSize to the max available limit of the global window size left
// limit windowSize to the max available limit of the global window size left
...
@@ -1102,7 +1102,7 @@ class Sync extends RequestProcessor {
...
@@ -1102,7 +1102,7 @@ class Sync extends RequestProcessor {
// or there is a move state (another sync should be done afterwards)
// or there is a move state (another sync should be done afterwards)
if
(
$changecount
>
$windowSize
||
$spa
->
GetMoveState
()
!==
false
)
{
if
(
$changecount
>
$windowSize
||
$spa
->
GetMoveState
()
!==
false
)
{
self
::
$encoder
->
startTag
(
SYNC_MOREAVAILABLE
,
false
,
true
);
self
::
$encoder
->
startTag
(
SYNC_MOREAVAILABLE
,
false
,
true
);
$moreAvailbleSent
=
true
;
$moreAvail
a
bleSent
=
true
;
$spa
->
DelFolderStat
();
$spa
->
DelFolderStat
();
}
}
}
}
...
@@ -1166,9 +1166,10 @@ class Sync extends RequestProcessor {
...
@@ -1166,9 +1166,10 @@ class Sync extends RequestProcessor {
if
(
Request
::
IsRequestTimeoutReached
())
{
if
(
Request
::
IsRequestTimeoutReached
())
{
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
"HandleSync(): Stopping export as maximum request timeout is almost reached!"
);
ZLog
::
Write
(
LOGLEVEL_DEBUG
,
"HandleSync(): Stopping export as maximum request timeout is almost reached!"
);
// Send a <MoreAvailable/> tag if we reached the request timout, there are more changes and a moreavailable was not already send
// Send a <MoreAvailable/> tag if we reached the request timout, there are more changes and a moreavailable was not already send
if
(
!
$moreAvailbleSent
&&
(
$n
>
$windowSize
))
{
if
(
!
$moreAvail
a
bleSent
&&
(
$n
>
$windowSize
))
{
self
::
$encoder
->
startTag
(
SYNC_MOREAVAILABLE
,
false
,
true
);
self
::
$encoder
->
startTag
(
SYNC_MOREAVAILABLE
,
false
,
true
);
$spa
->
DelFolderStat
();
$spa
->
DelFolderStat
();
$moreAvailableSent
=
true
;
}
}
}
}
...
...
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