Project: RSS

Viewing Issue Advanced Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003160 [Multi Theft Auto : San Andreas] General feature N/A 2008-01-14 17:22 2012-02-07 10:27
Reporter ChrML View Status public  
Assigned To kevuwk
Priority normal Resolution fixed Platform
Status resolved   OS
Projection none   OS Version
ETA none Fixed in Version 1.3.1 Product Version
  Target Version 1.3.1 Product Build
Summary 0003160: Add a way to load and unload modules without restarting the server
Description You might not want to restart it to load new modules or update a module. The server should be fully maintainable without restarting.
Steps To Reproduce
Additional Information
Tags No tags attached.
Attached Files

- Relationships
child of 0003344acknowledged Requested features tracker 

-  Notes
(0007255)
kevuwk (administrator)
2008-02-13 16:20

added loadModule ( module name ) gave it a quick test and it seems fine, will look at reloadModule and unloadModule when I get time
(0007258)
ChrML (administrator)
2008-02-14 14:29

Not sure it's a good idea to have as lua scripts. It's a potential security risk, ie someone could download a script containing a dll file or even camuflaged as .lua and load it as a dll and thus virus/trojan infect the server.

I think module loading/unloading should be a command only.
(0007264)
kevuwk (administrator)
2008-02-15 03:10

can easily be changed although we may have a problem when unloading the modules due to the functions that are registered within it, will see what happens when i get to that
(0007309)
kevuwk (administrator)
2008-02-23 03:43

changed loadmodule to a console command
(0007314)
ChrML (administrator)
2008-02-24 11:16

Good point at 0007264. The modules will have to unregister their functions explicitly. Like:

lua_pushnil ( vm );
lua_setglobal ( vm, "myRegisteredFunction" );

This will require an additional callback by MTA for every virtual machine, like RegisterFunctions. Maybe like UnregisterFunctions?
(0007315)
ChrML (administrator)
2008-02-24 11:17
edited on: 2008-02-24 11:18

Failure to unregister will cause crash next time LUA calls that registered function. When trying to call the unloaded DLL code.

Maybe we should provide a simple interface for registering functions and do this for the module? Or write an opensource function registering interface automatically doing this on unload in the module without requiring the additional callback.

But then again, the modules don't know when lua vm's are destroyed, so we'll need a callback for that.

(0007316)
kevuwk (administrator)
2008-02-24 11:25

another way would be to change the register functions for the module so it tells the server which module it came from, then we don't rely on the module creator to do this, eliminating the potential for crashes from a poorly made module
(0007323)
Oli (administrator)
2008-02-27 07:43

might need to add some stuff to the way the ACL adds'removed functions aswell.. if i recall i wrote a hook into lua itself for this, but not sure how ud go about removing funcs.. not looked at it in a while :P
(0015950)
TreN (viewer)
2012-02-06 07:30

Fixed? http://code.google.com/p/mtasa-blue/source/detail?r=3808 [^]

- Issue History
Date Modified Username Field Change
2008-01-14 17:22 ChrML New Issue
2008-01-24 11:02 kevuwk Status new => assigned
2008-01-24 11:02 kevuwk Assigned To => kevuwk
2008-02-13 16:20 kevuwk Note Added: 0007255
2008-02-14 14:29 ChrML Note Added: 0007258
2008-02-15 03:10 kevuwk Note Added: 0007264
2008-02-23 03:43 kevuwk Note Added: 0007309
2008-02-24 11:16 ChrML Note Added: 0007314
2008-02-24 11:17 ChrML Note Added: 0007315
2008-02-24 11:18 ChrML Note Edited: 0007315
2008-02-24 11:18 ChrML Note Edited: 0007315
2008-02-24 11:25 kevuwk Note Added: 0007316
2008-02-27 07:43 Oli Note Added: 0007323
2008-11-21 18:45 kevuwk Assigned To kevuwk =>
2008-11-21 18:46 Talidan Status assigned => new
2008-11-21 20:25 jhxp View Status public => private
2008-11-21 20:44 Talidan View Status private => public
2008-11-22 23:25 jhxp Project Multi Theft Auto : Server => Multi Theft Auto : San Andreas
2008-11-30 21:20 jhxp Target Version => 1.0.1
2009-09-12 09:11 ccw Target Version 1.0.1 => 1.0.2
2009-09-12 18:51 IJs Target Version 1.0.2 => 1.1
2010-02-02 02:20 Talidan Target Version 1.1 => 1.4x
2010-06-20 22:02 mekorea Relationship added child of 0003344
2011-06-16 15:52 x86 Assigned To => x86
2011-06-16 15:52 x86 Status new => assigned
2012-02-06 07:30 TreN Note Added: 0015950
2012-02-07 10:27 x86 Assigned To x86 => kevuwk
2012-02-07 10:27 x86 Status assigned => resolved
2012-02-07 10:27 x86 Resolution open => fixed
2012-02-07 10:27 x86 Fixed in Version => 1.3.1
2012-02-07 10:27 x86 Target Version 1.4 => 1.3.1


Mantis 1.1.8[^]
Copyright © 2000 - 2009 Mantis Group
Powered by Mantis Bugtracker