Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c843fe0
Fluffos 2.26
thefallentree Mar 4, 2013
5b1972a
Release 2.26.1
thefallentree Mar 9, 2013
b914486
IPV6 compile fix on unbuntu.
thefallentree Mar 4, 2013
1c87c5a
Added POSIX_TIMERS alternative for eval timer
Voltara Mar 8, 2013
3daad9e
Add LPC MIN_INT, MAX_FLOAT, MIN_FLOAT predefines.
thefallentree Mar 8, 2013
9a7a9f9
Test: Update testsuite config to correctly launch.
thefallentree Feb 9, 2013
4480a4f
Test: LPC int/float correctness verification.
thefallentree Feb 10, 2013
df06b13
Test: add command "crasher" for auto crash testing
thefallentree Feb 13, 2013
8b61bf2
Test: unbreak DEBUGMALLOC.
thefallentree Feb 18, 2013
05e75b4
create LPC_INT, LPC_FLOAT in lpc.h.
thefallentree Mar 9, 2013
6710cb4
Fix old craft in packages/debug.c
thefallentree Mar 9, 2013
fb09b10
Fixup LPC_INT, LPC_FLOAT change.
thefallentree Mar 10, 2013
45d06cd
Crypto package multiple fixes and enhancements
Voltara Mar 12, 2013
da8af01
Add missing gcmalloc.c
thefallentree Mar 16, 2013
9502c16
Fix compile warning, and use LPC_INT instead.
thefallentree Mar 16, 2013
7a5b4ba
Untrack local generated files.
thefallentree Mar 4, 2013
33c53d4
Fixup various previous broken commit.
thefallentree Mar 17, 2013
161e742
Unbreak DEBUG_MALLOC & CHECK_MEMORY, now everything is accounted for.
thefallentree Mar 17, 2013
89e57fd
Replace all defined(linux) to defined(__linux__).
thefallentree Mar 20, 2013
44d2e7f
Adding a check to avoid an potential crash.
thefallentree Mar 25, 2013
266bb29
Make make test actually fail the build.
thefallentree Mar 30, 2013
bab48e4
Fix one clang compile warning.
thefallentree Mar 30, 2013
3ef532d
Include LPC optimize routine in test.
thefallentree Mar 30, 2013
63eea57
Fix a valgrind complain in posix_timer.c
thefallentree Mar 30, 2013
8e375cd
fix call_other type errors as warnings and some timezone leaking bugs…
dwwodan Apr 1, 2013
3fd4dd5
added extra file:linenumber result for call_stack()
dwwodan Apr 13, 2013
8d5b411
changed linux to __linux__ for adding async_getdir
dwwodan Apr 13, 2013
1e368d5
allow floating point for heart beat interval
dwwodan Apr 14, 2013
0cef8da
Fix db.c with PACKAGE_ASYNC. ([email protected])
thefallentree Apr 4, 2013
b5f5eff
Rewrite apply_low(), fix cache poison issue.
thefallentree Mar 30, 2013
6741988
picked wrong commit
dwwodan Apr 14, 2013
281a8e1
Issue #54 - fix incorrect sha1() hashes
Voltara Apr 3, 2013
d9cc6eb
Include #ifndef routine in auto generated header.
thefallentree Apr 7, 2013
bbda87c
fix compiling after merge
dwwodan Apr 14, 2013
9732b60
Remove the obsolete qsort implementation.
thefallentree Apr 14, 2013
0589a0e
fix compile
dwwodan Apr 14, 2013
1fb6f11
Revert "Remove the obsolete qsort implementation."
dwwodan Apr 14, 2013
9b8b610
set version
dwwodan Apr 14, 2013
ccb3b34
update changelog
dwwodan Apr 28, 2013
def765c
Merge pull request #75 from dwwodan/master
dwwodan Apr 28, 2013
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/64bitmalloc.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void *malloc64(int size){
if(size < blocksize){
if(!freelist){
res = (unsigned long *)mmap(where, size+sizeof(long),MAP_FIXED|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
if(res != where){
if((char *)res != where){
perror("mmap failed! (55)");
printf("where = %lx\n", where);
res = (unsigned long *)malloc(size+sizeof(long));
Expand All @@ -77,7 +77,7 @@ void *malloc64(int size){
int thissize = size / 4096;
thissize++;
res = (unsigned long *)mmap(where, size+sizeof(long),MAP_FIXED|PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANONYMOUS,-1,0);
if(res != where)
if((char *)res != where)
perror("mmap failed! (72)");
where += (thissize*4096);
}
Expand Down
66 changes: 66 additions & 0 deletions src/ChangeLog.fluffos-2.x
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,72 @@ As MudOS is moving too slow to keep our driver hacks apart, we now call our own
FluffOS :), note: where it says Cratylus, I got it from his version, usually
someone else did the work, but I don't know how to find who did what there.

FluffOS 2.27
Fixed Changelog name for 2.26
fix incorrect sha1() hashes (Voltara <[email protected]>)
Fix db.c with PACKAGE_ASYNC. ([email protected])
allow floating point for heart beat interval
added extra file:linenumber result for call_stack(4)
fix call_other type errors as warnings and some timezone leaking bugs (driver timezone would be changed after efun/error in efun)
Fix a valgrind complain in posix_timer.c (Yucong Sun <[email protected]>)
Testsuit fixes. (Yucong Sun <[email protected]>)
compile with C99 (Yucong Sun <[email protected]>)
Unbreak DEBUG_MALLOC & CHECK_MEMORY, now everything is accounted for. (Yucong Sun <[email protected]>)
Crypto package multiple fixes and enhancements (Voltara <[email protected]>)
Code cleanup/fixes (Yucong Sun <[email protected]>)
LPC MIN_INT, MAX_FLOAT, MIN_FLOAT predefines. (Yucong Sun <[email protected]>)
Added POSIX_TIMERS alternative for eval timer (Voltara <[email protected]>)
IPV6 compile fix on unbuntu. (Yucong Sun <[email protected]>)

FluffOS 2.26
Compile warning fixes ([email protected])
add_action moved objects fix ([email protected])
Properly report 64 bit linux when starting ([email protected])
heart_beat() now sets current_interactive
Changes for C99 ([email protected])
GMCP telnet negotiation now following the correct protocol, probably
Websocket support, add a port in the config file with type websocket, when it
gets a connection on that it will ask the master object for a
connection as usual, this object will need to do the websocket
handshake, incoming data will go to process_input(), after finishing
the handshake call websocket_handshake_done(), after calling that it
will act like a normal user connection on the mud side, the other side
is a binary websocket. I suggest you change to the normal login object
after the handshake.
Added a break at the end of mssp activation to stop it from turning on mccp as
well
Stop skipping next user input when we get user input (no idea why that was
there)
([email protected])
Several LPC stack fixes ([email protected])
Added several missing type checks ([email protected])
Fixed wrong int/long variable types, this includes fixing sha1, so if you used
that for passwords on 64bit, you'll need to figure out how to get
around sha1 results changing.([email protected], me (with suggestions from
([email protected])))
sizeof now returns an actual number (reported by [email protected])
Fixed crasher in local_time() ([email protected])
Overflow improvement on eval_cost calculation ([email protected])
Stop reading past the end of the read data in read_file()
Fixed possible crasher in using floats
Fixed crasher in call_other type warnings ([email protected])
Several testsuite improvements ([email protected])
Added GCmalloc ([email protected])
Mapping fix for 32bit
Fixed crasher in f_unique_mapping (reported by [email protected])
options.h fixes ([email protected], me)
Added placeholder for now missing old binary config ([email protected])
File closing fix for compressed files ([email protected])
Fixed zonetime crasher ([email protected])
Fixed is_daylight_savings_time crasher ([email protected])
Fixed remove_get_char crasher (reported by [email protected])

FluffOS 2.25
Fixed the defer() fix
Added new test_load() efun which will try to load a file, it will return 0 when
it failed, 1 when the file can load, and error if there was a compilation
error

FluffOS 2.24
LPC floats are now C doubles
number of structs (or classes) allowed is now 127
Expand Down
3 changes: 2 additions & 1 deletion src/GNUmakefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ SRC=grammar.tab.c lex.c main.c rc.c interpret.c simulate.c file.c object.c \
socket_efuns.c socket_ctrl.c qsort.c eoperators.c socket_err.c md.c \
disassembler.c uvalarm.c $(STRFUNCS) \
replace_program.c master.c function.c \
debug.c crypt.c applies_table.c add_action.c eval.c fliconv.c console.c
debug.c crypt.c applies_table.c add_action.c eval.c fliconv.c console.c \
posix_timers.c

all: $(OBJDIR) cc.h main_build
main_build2: $(DRIVER_BIN) addr_server portbind
Expand Down
6 changes: 4 additions & 2 deletions src/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ SRC=grammar.tab.c lex.c main.c rc.c interpret.c simulate.c file.c object.c \
socket_efuns.c socket_ctrl.c qsort.c eoperators.c socket_err.c md.c \
disassembler.c uvalarm.c $(STRFUNCS) \
replace_program.c master.c function.c \
debug.c crypt.c add_action.c eval.c fliconv.c console.c applies_table.c
debug.c crypt.c add_action.c eval.c fliconv.c console.c applies_table.c \
posix_timers.c

all: cc.h files main_build
main_build2: $(DRIVER_BIN) addr_server portbind
Expand All @@ -82,7 +83,8 @@ OBJ=grammar.tab.o lex.o main.o rc.o interpret.o simulate.o file.o object.o \
socket_efuns.o socket_ctrl.o qsort.o eoperators.o socket_err.o md.o \
disassembler.o uvalarm.o $(STRFUNCS) \
replace_program.o master.o function.o \
debug.o crypt.o add_action.o eval.o fliconv.o console.o applies_table.o
debug.o crypt.o add_action.o eval.o fliconv.o console.o applies_table.o \
posix_timers.o

.c.o:
$(CC) $(CFLAGS) $(OPTIMIZE) -c $*.c
Expand Down
16 changes: 11 additions & 5 deletions src/add_action.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,8 @@ void setup_new_commands (object_t * dest, object_t * item)
continue;
if (ob->flags & O_DESTRUCTED)
error("An object was destructed at call of " APPLY_INIT "()\n");
if (dest != ob->super)
error("An object was moved at call of " APPLY_INIT "()\n");
if (ob->flags & O_ENABLE_COMMANDS) {
save_command_giver(ob);
(void) apply(APPLY_INIT, item, 0, ORIGIN_DRIVER);
Expand Down Expand Up @@ -396,7 +398,7 @@ static int user_parser (char * buff)
&& !(command_giver->flags & O_IS_WIZARD)
#endif
)
add_moves(&command_object->stats, 1);
add_moves(&s->ob->stats, 1);
#endif
if (!illegal_sentence_action)
illegal_sentence_action = save_illegal_sentence_action;
Expand Down Expand Up @@ -572,7 +574,7 @@ void remove_sent (object_t * ob, object_t * user)
void
f_add_action (void)
{
long flag;
LPC_INT flag;

if (st_num_arg == 3) {
flag = (sp--)->u.number;
Expand Down Expand Up @@ -608,12 +610,12 @@ f_add_action (void)
*/
void f_command (void)
{
long rc = 0;
LPC_INT rc = 0;

if (current_object && !(current_object->flags & O_DESTRUCTED))
{
char buff[1000];
int save_eval_cost = get_eval();
LPC_INT save_eval_cost = get_eval();

if (SVALUE_STRLEN(sp) > sizeof(buff) - 1)
error("Too long command.\n");
Expand All @@ -627,6 +629,10 @@ void f_command (void)
#else
rc = 1;
#endif
// Make sure we at least return 1 eval cost.
if (rc <= 0) {
rc = 1;
}
}

free_string_svalue(sp);
Expand Down Expand Up @@ -738,7 +744,7 @@ void f_query_verb (void)
#ifdef F_REMOVE_ACTION
void f_remove_action (void)
{
long success;
LPC_INT success;

success = remove_action((sp - 1)->u.string, sp->u.string);
free_string_svalue(sp--);
Expand Down
3 changes: 1 addition & 2 deletions src/addr_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,6 @@ void new_conn_handler()
struct sockaddr_in client;
#endif
socklen_t client_len;
struct hostent *c_hostent;
int new_fd;
int conn_index;

Expand Down Expand Up @@ -561,7 +560,7 @@ int name_by_ip (int conn_index, char * buf)
return 0;
}
char tmpbuf[80], tmpp[80];
if(ret = getnameinfo(res->ai_addr, res->ai_addrlen, tmpbuf, 79, tmpp, 79, NI_NAMEREQD|NI_NUMERICSERV)){
if((ret = getnameinfo(res->ai_addr, res->ai_addrlen, tmpbuf, 79, tmpp, 79, NI_NAMEREQD|NI_NUMERICSERV))){
sprintf(out_buf, "%s 0\n", &buf[sizeof(int)]);
DBG(("%s", out_buf));
OS_socket_write(all_conns[conn_index].fd, out_buf, strlen(out_buf));
Expand Down
45 changes: 0 additions & 45 deletions src/applies_table.c

This file was deleted.

4 changes: 3 additions & 1 deletion src/arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@
#define ARCH "A/UX"
#endif

#ifdef linux
#if defined(__linux__)
# ifdef __mc68000
# define ARCH "Linux/m68k"
# elif defined(__x86_64)
# define ARCH "Linux/x86-64"
# else
# ifdef __alpha
# define ARCH "Linux/alpha"
Expand Down
36 changes: 16 additions & 20 deletions src/array.c
Original file line number Diff line number Diff line change
Expand Up @@ -1250,13 +1250,9 @@ int sort_array_cmp (void *vp1, void *vp2) {
if (!d || d->type != T_NUMBER) {
return 0;
} else {
long n = d->u.number;
//the sort functions all use int, so sometimes the numbers don't fit!
if(n)
if(n>0)
n=1;
else
n=-1;
LPC_INT n = d->u.number;
// sanitize the result.
if(n) { n = n > 0 ? 1 : -1; }
return n;
}
}
Expand Down Expand Up @@ -1370,28 +1366,28 @@ static void deep_inventory_collect (object_t * ob, array_t * inv, int * i, int m
return;
}
}
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number>0 && !(cur->flags & O_DESTRUCTED)) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number>0 && !(cur->flags & O_DESTRUCTED))) {
#ifdef F_SET_HIDE
if (cur->flags & O_HIDDEN) {
if (valid_hide_flag & 2) {
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number!=3) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number!=3)) {
inv->item[*i].type = T_OBJECT;
inv->item[*i].u.ob = cur;
(*i)++;
add_ref(cur, "deep_inventory_collect");
}
if(!fp || fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3))
if(!fp || (fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3)))
deep_inventory_collect(cur, inv, i, max, fp);
}
} else {
#endif
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number!=3) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number!=3)) {
inv->item[*i].type = T_OBJECT;
inv->item[*i].u.ob = cur;
(*i)++;
add_ref(cur, "deep_inventory_collect");
}
if(!fp || fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3))
if(!fp || (fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3)))
deep_inventory_collect(cur, inv, i, max, fp);
#ifdef F_SET_HIDE
}
Expand Down Expand Up @@ -1439,15 +1435,15 @@ array_t *deep_inventory (object_t * ob, int take_top, funptr_t *fp)
return &the_null_array;
}
}
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number>0 &&
!(ob->flags & O_DESTRUCTED)) {
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number!=3) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number>0 &&
!(ob->flags & O_DESTRUCTED))) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number!=3)) {
dinv->item[0].type = T_OBJECT;
dinv->item[0].u.ob = ob;
add_ref(ob, "deep_inventory");
i=1;
}
if(!fp || fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3))
if(!fp || (fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3)))
deep_inventory_collect(ob, dinv, &i, o, fp);
}
}
Expand Down Expand Up @@ -1510,15 +1506,15 @@ array_t *deep_inventory_array (array_t *arr, int take_top, funptr_t *fp)
return &the_null_array;
}
}
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number>0 &&
!(arr->item[c].u.ob->flags & O_DESTRUCTED)) {
if(!fp || fp && fp_result->type==T_NUMBER && fp_result->u.number!=3) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number>0 &&
!(arr->item[c].u.ob->flags & O_DESTRUCTED))) {
if(!fp || (fp && fp_result->type==T_NUMBER && fp_result->u.number!=3)) {
dinv->item[i].type = T_OBJECT;
dinv->item[i].u.ob = arr->item[c].u.ob;
add_ref(arr->item[c].u.ob, "deep_inventory");
i++;
}
if(!fp || fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3))
if(!fp || (fp && fp_result->type==T_NUMBER && (fp_result->u.number==1 || fp_result->u.number==3)))
deep_inventory_collect(arr->item[c].u.ob, dinv, &i, o, fp);
}
}
Expand Down
4 changes: 4 additions & 0 deletions src/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@ static int max_heart_beats = 0;
static int heart_beat_index = 0;
static int num_hb_objs = 0;
static int num_hb_to_do = 0;
int time_for_hb = 0;

static int num_hb_calls = 0; /* starts */
static float perc_hb_probes = 100.0; /* decaying avge of how many complete */
Expand Down Expand Up @@ -377,8 +378,11 @@ void call_heart_beat()
restore_context(&econ);
} else {
save_command_giver(new_command_giver);
if(ob->interactive) //note, NOT same as new_command_giver
current_interactive = ob;
call_direct(ob, ob->prog->heart_beat - 1,
ORIGIN_DRIVER, 0);
current_interactive = 0;
pop_stack(); /* pop the return value */
restore_command_giver();
}
Expand Down
1 change: 1 addition & 0 deletions src/backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
extern long current_time;
extern object_t *current_heart_beat;
extern error_context_t *current_error_context;
extern int time_for_hb;

void backend (void);
void clear_state (void);
Expand Down
Loading