Skip to content

Commit 2043c5a

Browse files
authored
CodeQL: rename HydraLabVpnLogger file (#669)
<!-- Please provide brief information about the PR, what it contains & its purpose, new behaviors after the change. And let us know here if you need any help: https://github.com/microsoft/HydraLab/issues/new --> ## Description <!-- A few words to explain your changes --> ### Linked GitHub issue ID: # ## Pull Request Checklist <!-- Put an x in the boxes that apply. This is simply a reminder of what we are going to look for before merging your code. --> - [ ] Tests for the changes have been added (for bug fixes / features) - [x] Code compiles correctly with all tests are passed. - [ ] I've read the [contributing guide](https://github.com/microsoft/HydraLab/blob/main/CONTRIBUTING.md#making-changes-to-the-code) and followed the recommended practices. - [ ] [Wikis](https://github.com/microsoft/HydraLab/wiki) or [README](https://github.com/microsoft/HydraLab/blob/main/README.md) have been reviewed and added / updated if needed (for bug fixes / features) ### Does this introduce a breaking change? *If this introduces a breaking change for Hydra Lab users, please describe the impact and migration path.* - [ ] Yes - [ ] No ## How you tested it *Please make sure the change is tested, you can test it by adding UTs, do local test and share the screenshots, etc.* Please check the type of change your PR introduces: - [x] Bugfix - [ ] Feature - [ ] Technical design - [ ] Build related changes - [ ] Refactoring (no functional changes, no api changes) - [ ] Code style update (formatting, renaming) or Documentation content changes - [ ] Other (please describe): ### Feature UI screenshots or Technical design diagrams *If this is a relatively large or complex change, kick it off by drawing the tech design with PlantUML and explaining why you chose the solution you did and what alternatives you considered, etc...*
1 parent e950a25 commit 2043c5a

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnLogger.kt renamed to android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnLoggerTemp.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import java.io.FileWriter
1010
import java.io.IOException
1111
import kotlin.io.path.Path
1212

13-
class HydraLabVpnLogger(private var filePath: String?) {
13+
class HydraLabVpnLoggerTemp(private var filePath: String?) {
1414
private var lines = mutableListOf<String>()
1515
private var linesStaging = listOf<String>()
1616

android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnQueue.kt

+4-4
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ object ToNetworkQueueWorker : Runnable {
3838

3939
private lateinit var vpnInput: FileChannel
4040

41-
private lateinit var vpnLogger: HydraLabVpnLogger
41+
private lateinit var vpnLogger: HydraLabVpnLoggerTemp
4242

4343
var totalInputCount = 0L
4444

45-
fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLogger) {
45+
fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLoggerTemp) {
4646
if (this::thread.isInitialized && thread.isAlive) throw IllegalStateException("Running already")
4747
vpnInput = FileInputStream(vpnFileDescriptor).channel
4848
vpnLogger = logger
@@ -107,9 +107,9 @@ object ToDeviceQueueWorker : Runnable {
107107

108108
private lateinit var vpnOutput: FileChannel
109109

110-
private lateinit var vpnLogger: HydraLabVpnLogger
110+
private lateinit var vpnLogger: HydraLabVpnLoggerTemp
111111

112-
fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLogger) {
112+
fun start(vpnFileDescriptor: FileDescriptor, logger: HydraLabVpnLoggerTemp) {
113113
if (this::thread.isInitialized && thread.isAlive) throw IllegalStateException("Is already running")
114114
vpnOutput = FileOutputStream(vpnFileDescriptor).channel
115115
vpnLogger = logger

android_client/app/src/main/java/com/microsoft/hydralab/android/client/vpn/HydraLabVpnService.kt

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ class HydraLabVpnService : VpnService() {
2727

2828
private lateinit var vpnInterface: ParcelFileDescriptor
2929

30-
private lateinit var vpnLogger: HydraLabVpnLogger
30+
private lateinit var vpnLogger: HydraLabVpnLoggerTemp
3131

3232
override fun onCreate() {
3333
UdpSendWorker.start(this)
@@ -62,7 +62,7 @@ class HydraLabVpnService : VpnService() {
6262

6363
private fun connect(config: VpnUserConfig) {
6464
vpnInterface = createVpnInterface(config)
65-
vpnLogger = HydraLabVpnLogger(config.dumpPath)
65+
vpnLogger = HydraLabVpnLoggerTemp(config.dumpPath)
6666
val fileDescriptor = vpnInterface.fileDescriptor
6767
ToNetworkQueueWorker.start(fileDescriptor, vpnLogger)
6868
ToDeviceQueueWorker.start(fileDescriptor, vpnLogger)

0 commit comments

Comments
 (0)