diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/common/malloc.c | 1 | ||||
-rw-r--r-- | src/common/socket.c | 15 | ||||
-rw-r--r-- | src/map/atcommand.c | 4 | ||||
-rw-r--r-- | src/map/script.c | 1 | ||||
-rw-r--r-- | src/plugins/console.c | 4 |
5 files changed, 10 insertions, 15 deletions
diff --git a/src/common/malloc.c b/src/common/malloc.c index fe73057ad..1417bfbec 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -651,6 +651,7 @@ static void memmgr_init (void) } #endif + /*====================================== * Initialise *-------------------------------------- diff --git a/src/common/socket.c b/src/common/socket.c index 3c8396961..6589978bb 100644 --- a/src/common/socket.c +++ b/src/common/socket.c @@ -35,6 +35,10 @@ #define S_ENOTSOCK WSAENOTSOCK #define S_EWOULDBLOCK WSAEWOULDBLOCK #define S_ECONNABORTED WSAECONNABORTED + + #define SHUT_RD SD_RECEIVE + #define SHUT_WR SD_SEND + #define SHUT_RDWR SD_BOTH #else #define SOCKET_ERROR -1 #define INVALID_SOCKET -1 @@ -56,17 +60,6 @@ #include "../common/malloc.h" #include "../common/showmsg.h" -/// shutdown() constants -#ifndef SHUT_RD -#ifdef SD_RECEIVE - #define SHUT_RD SD_RECEIVE - #define SHUT_WR SD_SEND - #define SHUT_RDWR SD_BOTH -#else - #error "Unknown socket constants, please report this to a developer" -#endif -#endif - fd_set readfds; int fd_max; time_t last_tick; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index b4ccf5b79..e1c622462 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -4962,7 +4962,7 @@ int atcommand_raisemap( nullpo_retr(-1, sd); pl_allsd = map_getallusers(&users); - + for (i = 0; i < users; i++) { if (sd->bl.m == pl_allsd[i]->bl.m) atcommand_raise_sub(pl_allsd[i]); @@ -6898,7 +6898,7 @@ int atcommand_undisguiseall( nullpo_retr(-1, sd); pl_allsd = map_getallusers(&users); - + for(i=0; i < users; i++) { if((pl_sd = pl_allsd[i]) && pl_sd->disguise) pc_disguise(pl_sd, 0); diff --git a/src/map/script.c b/src/map/script.c index 3efa8dbc0..005e471c6 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -8954,6 +8954,7 @@ int buildin_agitend(struct script_state *st) guild_agit_end(); return 0; } + /*========================================== * Returns whether woe is on or off. // choice script *------------------------------------------ diff --git a/src/plugins/console.c b/src/plugins/console.c index fca087618..e9fceecbf 100644 --- a/src/plugins/console.c +++ b/src/plugins/console.c @@ -120,7 +120,7 @@ int console_parsebuf(int tid, unsigned int tick, int id, int data_) //printf("console_parsebuf pipe_hasdata\n"); // receive string pipe_read(data, &len, sizeof(size_t)); - pipe_read(data, &buf, len); + pipe_read(data, buf, len); buf[len] = '\0'; //printf("console_parsebuf buf='%s'\n", buf); // parse it @@ -128,7 +128,7 @@ int console_parsebuf(int tid, unsigned int tick, int id, int data_) //printf("console_parsebuf writing next\n"); // send next state buf[0] = 'R'; - pipe_write(next, &buf, 1); + pipe_write(next, buf, 1); //printf("console_parsebuf done with next\n"); } return 0; |