mirror of
https://github.com/ldmud/ldmud
synced 2026-08-12 14:26:05 -04:00
The replacement simul-efun implementations for set_buffer_size, set_combine_charset, get_combine_charset, set_connection_charset and get_connection_charset threw errors when there was no current interactive object. The original efun implementation ignored that quietly. So correcting the simul-efun implementations. (Fixes #855)
25 lines
504 B
C
25 lines
504 B
C
/* This sefun is to provide a replacement for the efun set_buffer_size().
|
|
* Feel free to add it to your mudlibs, if you have much code relying on that.
|
|
*/
|
|
|
|
#if ! __EFUN_DEFINED__(set_buffer_size)
|
|
|
|
#include <configuration.h>
|
|
|
|
int set_buffer_size(int size)
|
|
{
|
|
object ob = efun::this_interactive();
|
|
|
|
if (!ob)
|
|
return -1;
|
|
|
|
int oldsize = efun::interactive_info(ob, IC_SOCKET_BUFFER_SIZE);
|
|
|
|
efun::configure_interactive(ob, IC_SOCKET_BUFFER_SIZE, size);
|
|
|
|
return oldsize;
|
|
}
|
|
|
|
#endif
|
|
|
|
|