ObjFW  Check-in [5c172869c8]

Overview
Comment:exceptions: Nicer format for IPX nodes
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5c172869c84e2ad61ffee4496ad4e96228a370121e4a1518db1a72f689a72ee5
User & Date: js on 2023-01-12 23:56:33
Other Links: manifest | tags
Context
2023-01-13
01:23
OFHostAddressResolver: Handle no search domains check-in: 9c10d30eb6 user: js tags: trunk
2023-01-12
23:56
exceptions: Nicer format for IPX nodes check-in: 5c172869c8 user: js tags: trunk
2023-01-10
14:09
configure: Remove unnecessary AC_PROG_EGREP check-in: 3bc5fc9461 user: js tags: trunk
Changes

Modified src/exceptions/OFBindIPXSocketFailedException.m from [a8d0b0b0c2] to [9e31f1ffcc].

76
77
78
79
80
81
82
83
84
85
86

87
88
89
90
91
- (void)getNode: (unsigned char [IPX_NODE_LEN])node
{
	memcpy(node, _node, sizeof(_node));
}

- (OFString *)description
{
	OFData *node = [OFData dataWithItems: _node count: sizeof(_node)];

	return [OFString stringWithFormat:
	    @"Binding to network %" @PRIx16 " on node %@ with port %" @PRIx16

	    @" failed for packet type %" @PRIx8 " in socket of type %@: %@",
	    _network, node, _port, _packetType, [_socket class],
	    OFStrError(_errNo)];
}
@end







<
<

|
>
|
|
|


76
77
78
79
80
81
82


83
84
85
86
87
88
89
90
- (void)getNode: (unsigned char [IPX_NODE_LEN])node
{
	memcpy(node, _node, sizeof(_node));
}

- (OFString *)description
{


	return [OFString stringWithFormat:
	    @"Binding to network %" @PRIx16 " on node "
	    @"%02X:%02X:%02X:%02X:%02X:%02X with port %" @PRIx16 @" failed for "
	    @"packet type %" @PRIx8 " in socket of type %@: %@",
	    _network, _node[0], _node[1], _node[2], _node[3], _node[4],
	    _node[5], _port, _packetType, [_socket class], OFStrError(_errNo)];
}
@end

Modified src/exceptions/OFConnectSPXSocketFailedException.m from [6ff0f7f0de] to [afd4b15484].

70
71
72
73
74
75
76
77
78
79
80
81


82
83
84
- (void)getNode: (unsigned char [IPX_NODE_LEN])node
{
	memcpy(node, _node, sizeof(_node));
}

- (OFString *)description
{
	OFData *node = [OFData dataWithItems: _node count: sizeof(_node)];

	return [OFString stringWithFormat:
	    @"A connection to %@ port %" @PRIu16 @" on network %" @PRIX32
	    " could not be established in socket of type %@: %@",


	    node, _port, _network, [_socket class], OFStrError(_errNo)];
}
@end







<
<

|
|
>
>
|


70
71
72
73
74
75
76


77
78
79
80
81
82
83
84
- (void)getNode: (unsigned char [IPX_NODE_LEN])node
{
	memcpy(node, _node, sizeof(_node));
}

- (OFString *)description
{


	return [OFString stringWithFormat:
	    @"A connection to %02X:%02X:%02X:%02X:%02X:%02X port %" @PRIu16
	    @" on network %" @PRIX32 " could not be established in socket of "
	    @"type %@: %@",
	    _node[0], _node[1], _node[2], _node[3], _node[4], _node[5], _port,
	    _network, [_socket class], OFStrError(_errNo)];
}
@end