Preventing sleep in roaming profiles.

Status
Not open for further replies.

pwood

Customer
Joined
Apr 5, 2020
Messages
6
Reaction score
2
Hi,

If you have roaming profiles set up with folder redirection, the 3cx desktop app keeps a file open in app data which prevents sleep:

PS C:\WINDOWS\system32> powercfg /requests DISPLAY: None. SYSTEM: [DRIVER] \FileSystem\rdbss A file has been opened across the network. File name: [\dc.ninjateaparty.local\Users$\penny\Application Data\3CXPhone for Windows\Logs\3CXPhoneForWindows.log] Process ID: [9496] AWAYMODE: None. EXECUTION: None. PERFBOOST: None. ACTIVELOCKSCREEN: None.

The solution would be to write the log to %localappdata%, where really it should be because logs shouldn't be open on multiple desktops at once.
 
  • Like
Reactions: FridayIT
Hi @pwood,

This is intended behaviour, you can have this posted to the Ideas Forum by a 3CX Partner.
 
Ahh... no sorry. It's definitely a coding error.

%appdata% is intended for user specific config that may roam between different computers and is overall shared. In this case since it's a log file, if the intent is really to have shared logging per user then the file should be locked for each individual log entry, written, and then closed to flush it to disk. The app would also need to queue log file data since there's a chance another computer would write to the file at the same time.

%localappdata% is files local to a particular computer, and is intended for such data as log files. Please check the Microsoft coding guidelines if you really must, but it's definitely a bug.

Heck there's even the system event log, you can register your own event log context if you want and write to that and keep all the 3cx logging separate from everything else. That's actually the right place for log data.

If the 'intended behaviour' is to keep the computer awake and prevent sleep, then the way to do that would be to register to prevent sleep and to allow users the option to turn it off so they don't waste power.

Keeping a log file open over the network is definitely not 'intended behaviour'. Please don't just blow me off. If you're not going to fix it, then be honest about it, but it's definitely not intended behaviour, it's a bug.
 
  • Like
Reactions: autohaus
Hi @pwood,

Thank you for the detailed feedback, in that case we'll pass this on. It would also benefit the community if you had a partner add this to the Ideas forum as a new Windows Client may be coming soon ;)
 
  • Like
Reactions: autohaus
Status
Not open for further replies.

Forum statistics

Threads
112,349
Messages
592,027
Members
165,512
Latest member
gmacinit