File tree Expand file tree Collapse file tree 3 files changed +7
-10
lines changed
include/OpenGraphCxx/DebugServer
Tests/OpenGraphCompatibilityTests/Debug Expand file tree Collapse file tree 3 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 8181 uint32_t ip_data = ntohl (ifa_addr->sin_addr .s_addr );
8282 if (ip_data != INADDR_LOOPBACK) {
8383 ip = ip_data;
84+ break ; // Take first non-loopback interface
8485 }
8586 }
8687 current_iaddrs = current_iaddrs->ifa_next ;
Original file line number Diff line number Diff line change @@ -29,7 +29,7 @@ struct OGDebugServerMessageHeader {
2929
3030class DebugServer {
3131public:
32- DebugServer (unsigned int port );
32+ DebugServer (OGDebugServerMode mode );
3333 ~DebugServer ();
3434
3535 CFURLRef _Nullable copy_url () const ;
Original file line number Diff line number Diff line change @@ -27,7 +27,8 @@ struct DebugServerTests {
2727 let _ = try #require( DebugServer . start ( mode: [ . valid] ) )
2828 let url = try #require( DebugServer . copyURL ( ) ) as URL
2929 #expect( url. scheme == " graph " )
30- #expect( url. host ( ) == " 127.0.0.1 " )
30+ let host = try #require( url. host ( ) )
31+ #expect( host == " 127.0.0.1 " )
3132 DebugServer . run ( timeout: 1 )
3233 DebugServer . stop ( )
3334 }
@@ -39,14 +40,9 @@ struct DebugServerTests {
3940 let _ = try #require( DebugServer . start ( mode: [ . valid, . networkInterface] ) )
4041 let url = try #require( DebugServer . copyURL ( ) ) as URL
4142 #expect( url. scheme == " graph " )
42- #expect( url. host ( ) != " 127.0.0.1 " )
43- // FIXME
44- // OG:
45- // print: graph://198.19.249.3:58088/?token=1502822185
46- // url: graph://198.19.249.3:58088/?token=1502822185
47- // AG:
48- // print: debug server graph://192.168.8.211:49691/?token=3662216201
49- // url: graph://192.168.8.211:49694/?token=1022379324
43+ let host = try #require( url. host ( ) )
44+ #expect( host != " 127.0.0.1 " )
45+ #expect( host. hasPrefix ( " 192.168 " ) )
5046 DebugServer . run ( timeout: 1 )
5147 DebugServer . stop ( )
5248 }
You can’t perform that action at this time.
0 commit comments