|
@@ 97-99 (lines=3) @@
|
| 94 |
|
} |
| 95 |
|
} |
| 96 |
|
|
| 97 |
|
if (false == $this->connectionLog->connect($profileId, $commonName, $ip4, $ip6, $connectedAt)) { |
| 98 |
|
return new ApiResponse('connect', ['ok' => false, 'error' => 'unable to write connect event to log, dropping client']); |
| 99 |
|
} |
| 100 |
|
|
| 101 |
|
return new ApiResponse('connect', ['ok' => true]); |
| 102 |
|
} |
|
@@ 127-129 (lines=3) @@
|
| 124 |
|
$bytesTransferred = $request->getPostParameter('bytes_transferred'); |
| 125 |
|
InputValidation::bytesTransferred($bytesTransferred); |
| 126 |
|
|
| 127 |
|
if (false === $this->connectionLog->disconnect($profileId, $commonName, $ip4, $ip6, $connectedAt, $disconnectedAt, $bytesTransferred)) { |
| 128 |
|
return new ApiResponse('disconnect', ['ok' => false, 'error' => 'unable to write disconnect event to log, nothing we can do']); |
| 129 |
|
} |
| 130 |
|
|
| 131 |
|
return new ApiResponse('disconnect', ['ok' => true]); |
| 132 |
|
} |