Changeset 951
- Timestamp:
- 06/17/07 17:44:06 (1 year ago)
- Files:
-
- 1.8.2/branches/devel/CHANGES.182 (modified) (1 diff)
- 1.8.2/branches/devel/game/mushcnf.dst (modified) (1 diff)
- 1.8.2/branches/devel/game/txt/hlp/pennflag.hlp (modified) (2 diffs)
- 1.8.2/branches/devel/src/bsd.c (modified) (4 diffs)
- 1.8.2/branches/devel/src/flags.c (modified) (2 diffs)
- 1.8.2/branches/devel/src/utils.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
1.8.2/branches/devel/CHANGES.182
r932 r951 17 17 Version 1.8.2 patchevel 6 ??? ??, 2007 18 18 19 Minor changes: 20 * KEEPALIVE flag makes the server send a telnet NOP after 21 a short period of inactivity; helps prevent timeouts from 22 NAT/router devices with a short timeout. [MUX] 23 19 24 Fixes: 20 25 * Fixed assorted small memory leaks. [SW] 26 * Fixed handling of telnet NOPs sent by clients. [SW] 21 27 22 28 Version 1.8.2 patchlevel 5 June 13, 2007 1.8.2/branches/devel/game/mushcnf.dst
r527 r951 214 214 # the internet, and don't deal well with persistant connections like 215 215 # mushes use. This option will make the server automatically send a 216 # 'Are you still there?' query every few minutes to keep the216 # TCP-level 'Are you still there?' query every few minutes to keep the 217 217 # connection active. 218 # NOTE: This doesn't work on all OSes, but does on the most popular 219 # ones for mush hosting such as linux. 218 # NOTE: This doesn't work on all OSes, but does some of the most popular 219 # ones for mush hosting such as linux. Other options include the KEEPALIVE 220 # flag and the IDLE command. 220 221 keepalive_timeout 5m 221 222 1.8.2/branches/devel/game/txt/hlp/pennflag.hlp
r801 r951 51 51 d - Destroy_Ok e - Enter_Ok g - Gagged 52 52 h - Halt i - Orphan j - Jury_Ok 53 l - Light m - Myopic, Mistrust n - No_Command54 o - On-Vacation p - Puppet, Paranoid r - Royalty55 s - Suspect t - Transparent u - Uninspected56 v - Verbose w - No_Warn x - Terse, Cloudy57 ? - Unregistered ^ - Listen_Parent ~ - Noaccents58 " - NoSpoof53 k - Keepalive l - Light m - Myopic, Mistrust 54 n - No_Command o - On-Vacation p - Puppet, Paranoid 55 r - Royalty s - Suspect t - Transparent 56 u - Uninspected v - Verbose w - No_Warn 57 x - Terse, Cloudy ? - Unregistered ^ - Listen_Parent 58 ~ - Noaccents " - NoSpoof 59 59 ----------------------------------------------------------------------- 60 60 Some flags may not be enabled on some MUSHes. @flag/list will show 61 61 which are available. 62 63 62 & ABODE 64 63 Flag: ABODE (rooms) … … 402 401 When a room is set JUMP_OK, then that room can be teleported into 403 402 by anyone. See @teleport. 403 & KEEPALIVE 404 Flag: KEEPALIVE (players) 405 406 When this flag is set on a player with a telnet-capable connection, 407 a telnet NOP (no-operation) is sent after there's been no activity 408 on the connection for a minute, to generate socket activity without 409 generating any output. In a way, it's the opposite of the IDLE 410 command. IDLE is sent by clients to keep a connection open, while 411 KEEPALIVE tells the server to send a message. Both are intended for 412 use by people going through home router/NAT appliances with short 413 inactivity timeouts. 414 415 See also: IDLE, terminfo() 404 416 & LIGHT 405 417 Flag: LIGHT (all types) 1.8.2/branches/devel/src/bsd.c
r940 r951 2143 2143 fprintf(stderr, "Got IAC NOP\n"); 2144 2144 #endif 2145 *q++; 2145 2146 break; 2146 2147 case AYT: /* Are you there? */ … … 2974 2975 if (d->player == player) { 2975 2976 numd++; 2976 if ( now - d->last_time > 60)2977 if (difftime(now, d->last_time) > 60.0) 2977 2978 in = d; 2978 2979 } … … 4413 4414 { 4414 4415 DESC *d, *nextd; 4415 time_t now , idle, idle_for, unconnected_idle;4416 i f (!INACTIVITY_LIMIT && !UNCONNECTED_LIMIT)4417 return; 4416 time_t now; 4417 int idle, idle_for, unconnected_idle; 4418 4418 4419 now = mudtime; 4419 4420 idle = INACTIVITY_LIMIT ? INACTIVITY_LIMIT : INT_MAX; … … 4421 4422 for (d = descriptor_list; d; d = nextd) { 4422 4423 nextd = d->next; 4423 idle_for = now - d->last_time;4424 idle_for = (int) difftime(now, d->last_time); 4424 4425 /* If they've been connected for 60 seconds without getting a telnet-option 4425 4426 back, the client probably doesn't understand them */ 4426 if ((d->conn_flags & CONN_TELNET_QUERY) && idle_for > 60) 4427 if (d->conn_flags & CONN_TELNET_QUERY && 4428 difftime(now, d->connected_at) > 60.0) 4427 4429 d->conn_flags &= ~CONN_TELNET_QUERY; 4430 4431 /* If they've been idle for 60 seconds and are set KEEPALIVE and using 4432 a telnet-aware client, send a NOP */ 4433 if (d->conn_flags & CONN_TELNET && idle_for >= 60 4434 && IS(d->player, TYPE_PLAYER, "KEEPALIVE")) { 4435 const unsigned char nopmsg[2] = { IAC, NOP }; 4436 queue_newwrite(d, nopmsg, 2); 4437 process_output(d); 4438 } 4439 4428 4440 if ((d->connected) ? (idle_for > idle) : (idle_for > unconnected_idle)) { 4429 4441 1.8.2/branches/devel/src/flags.c
r932 r951 141 141 {"GOING_TWICE", '\0', NOTYPE, GOING_TWICE, F_INTERNAL | F_DARK, 142 142 F_INTERNAL | F_DARK}, 143 {"KEEPALIVE", 'k', TYPE_PLAYER, 0, F_ANY, F_ANY}, 143 144 {NULL, '\0', 0, 0, 0, 0} 144 145 }; … … 855 856 856 857 if (n->tab == &ptab_flag) { 858 add_flag("KEEPALIVE", 'k', TYPE_PLAYER, F_ANY, F_ANY); 857 859 add_flag("MISTRUST", 'm', TYPE_THING | TYPE_EXIT | TYPE_ROOM, F_INHERIT, 858 860 F_INHERIT); 1.8.2/branches/devel/src/utils.c
r932 r951 161 161 { 162 162 if (attrib && (AL_FLAGS(attrib) & AF_ANON)) { 163 mush_free((void *) AL_NAME(attrib), "anon_attr.lambda");163 mush_free((void *) AL_NAME(attrib), "anon_attr.lambda"); 164 164 chunk_delete(attrib->data); 165 165 mush_free(attrib, "anon_attr");
