1
0
mirror of https://github.com/solemnwarning/ipxwrapper synced 2024-12-30 16:45:37 +01:00

Tweaked some code and updated changelog.

This commit is contained in:
Daniel Collins 2011-09-21 21:57:28 +00:00
parent 8820b7d478
commit 7c822c97b6
3 changed files with 11 additions and 21 deletions

View File

@ -1,4 +1,4 @@
Version ???:
Version 0.3:
Cleanup: Moved certain library functions out of ipxwrapper.c and tidied up.
Cleanup: Removed winstuff.h, added wsnwlink.h from Wine.
@ -23,7 +23,7 @@ Version ???:
Bugfix: Correctly initialise common controls in ipxconfig.
Update: Load interfaces on each bind/getsockopt call to allow configuration
Feature: Load interfaces on each bind/getsockopt call to allow configuration
changes without restarting.
Bugfix: Load EnumProtocolsA/EnumProtocolsW directly from mswsock.dll to avoid
@ -31,13 +31,13 @@ Version ???:
Bugfix: Correctly store protocol names at end of EnumProtocols buffer.
Update: Implemented windows 95/98 WSHEnumProtocols function.
Feature: Implemented windows 95/98 WSHEnumProtocols function.
Update: Implemented connect, send and getpeername functions.
Feature: Implemented connect, send and getpeername functions.
Update: Max packet (data) size reduced to 8KiB.
Update: Implemented IPX_RECEIVE_BROADCAST option.
Feature: Implemented IPX_RECEIVE_BROADCAST option.
Update: Added ipxconfig icon.

View File

@ -66,21 +66,8 @@ void reg_close(void) {
}
char reg_get_char(const char *val_name, char default_val) {
if(!regkey) {
return default_val;
}
char buf;
DWORD size = 1;
int err = RegQueryValueEx(regkey, val_name, NULL, NULL, (BYTE*)&buf, &size);
if(err != ERROR_SUCCESS) {
log_printf("Error reading registry value: %s", w32_error(err));
return default_val;
}
return size == 1 ? buf : default_val;
return reg_get_bin(val_name, &buf, 1) == 1 ? buf : default_val;
}
DWORD reg_get_bin(const char *val_name, void *buf, DWORD size) {
@ -91,7 +78,10 @@ DWORD reg_get_bin(const char *val_name, void *buf, DWORD size) {
int err = RegQueryValueEx(regkey, val_name, NULL, NULL, (BYTE*)buf, &size);
if(err != ERROR_SUCCESS) {
log_printf("Error reading registry value: %s", w32_error(err));
if(err != ERROR_FILE_NOT_FOUND) {
log_printf("Error reading registry value: %s", w32_error(err));
}
return 0;
}

View File

@ -667,7 +667,7 @@ BOOL rclient_start(struct rclient *rclient) {
struct sockaddr_in addr;
addr.sin_family = AF_INET;
addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
addr.sin_port = htons(global_conf.udp_port);
addr.sin_port = htons(reg_get_dword("control_port", DEFAULT_CONTROL_PORT));
if(connect(rclient->sock, (struct sockaddr*)&addr, sizeof(addr)) == 0) {
return TRUE;