summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt1
-rw-r--r--src/common/socket.c3
2 files changed, 3 insertions, 1 deletions
diff --git a/Changelog.txt b/Changelog.txt
index e62911227..edd6787b6 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
11/21
+ * Display IP when wdata is expanded [Wizputer]
* Added bClassChange,%; Has random chance to turn monster into another monster. [Valaris]
* Re-Fixed Trade/Vending exploit [Lupus]
* Fixed @whozeny. [Valaris]
diff --git a/src/common/socket.c b/src/common/socket.c
index cdf05e52a..4afcf50d4 100644
--- a/src/common/socket.c
+++ b/src/common/socket.c
@@ -417,8 +417,9 @@ int WFIFOSET(int fd,int len)
return 0;
#endif /* NSOCKET */
if( s->wdata_size+len+16384 > s->max_wdata ){
+ unsigned char *sin_addr = (unsigned char *)&s->client_addr.sin_addr;
realloc_fifo(fd,s->max_rdata, s->max_wdata <<1 );
- printf("socket: %d wdata expanded to %d bytes.\n",fd, s->max_wdata);
+ printf("socket: %d (%d.%d.%d.%d) wdata expanded to %d bytes.\n",fd, sin_addr[0], sin_addr[1], sin_addr[2], sin_addr[3], s->max_wdata);
}
s->wdata_size=(s->wdata_size+(len)+2048 < s->max_wdata) ?
s->wdata_size+len : (printf("socket: %d wdata lost !!\n",fd),s->wdata_size);