| Anonymous | Login |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| 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 |
||||||
|
||||||
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 [^] |
| Mantis 1.1.8[^] Copyright © 2000 - 2009 Mantis Group |