Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
Nall-chan committed Nov 13, 2024
1 parent b765de4 commit 0c64798
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/style.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 7.4
php-version: 8.2
- name: Checkout module
uses: actions/checkout@master
- name: Check style
uses: Nall-chan/action-style@master
uses: Nall-chan/action-style@strict
4 changes: 2 additions & 2 deletions OnkyoAVRDiscovery/module.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private function DiscoverDevices(): array
socket_set_option($socket, SOL_SOCKET, SO_BROADCAST, 1);
socket_set_option($socket, SOL_SOCKET, SO_REUSEADDR, 1);
socket_set_option($socket, SOL_SOCKET, SO_RCVTIMEO, ['sec' => 1, 'usec' => 100000]);
socket_bind($socket, '0.0.0.0', 0);
socket_bind($socket, '0.0.0.0', 60128);
$message = hex2bin('49534350000000100000000b01000000217845434e5153544e0d0a');
if (@socket_sendto($socket, $message, strlen($message), 0, '255.255.255.255', 60128) === false) {
return [];
Expand All @@ -173,7 +173,7 @@ private function DiscoverDevices(): array
if ($start === false) {
continue;
}
$this->SendDebug('Receive', $buf, 0);
$this->SendDebug('Receive Port:'.$Port, $buf, 0);
$end = strpos($buf, "\x19", $start);
$DeviceData[$IPAddress] = explode('/', substr($buf, $start + 5, $end - $start - 5));
$DeviceData[$IPAddress][] = gethostbyaddr($IPAddress);
Expand Down

0 comments on commit 0c64798

Please sign in to comment.