From: SourceForge.net <no...@so...> - 2005-06-23 20:28:33
|
Patches item #1226022, was opened at 2005-06-23 11:06 Message generated for change (Comment added) made by sadrul You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1226022&group_id=235 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Sadrul H C (sadrul) Assigned to: Nobody/Anonymous (nobody) Summary: Reload modified plugins at runtime Initial Comment: Hello. When gaim is running, an updated .so-plugin is not reloaded (I am told script-plugins are reloaded though). So if anyone has re-installed a `native-plugin', he has to restart gaim to get that modified plugin to work. This patch allows a plugin to be reloaded at runtime. However, it reloads only when the plugin is not being used (ie, not loaded) and about to be used (ie, the user has checked the box at the preference-dialog) to make sure things don't go crazy. It makes life easier especially for people who create plugins. And makes thing somewhat consistent in the sense that plugins written in any language can be reloaded at runtime. This patch is against oldstatus. I took a look at HEAD, and I think little modifications will allow for this patch to go with HEAD as well. So if this way of doing things is OK, then I can create a patch against HEAD. -- Adil ---------------------------------------------------------------------- >Comment By: Sadrul H C (sadrul) Date: 2005-06-24 02:28 Message: Logged In: YES user_id=1132702 Do you suggest I just remove the existing _reload() and rename the hard_reload() to _reload() ? Should I also get a patch for HEAD, and add a line in plugins/ChangeLog.API? I took a close look (as per my standards) at _plugin_destroy() and didn't notice anything that might go wrong. But I am probably not the best person to say anything on this, and I don't know the details of the probs/issues Paco-Paco had had with it. Note: Now that I have had a closer look, it seems loader-plugins will need to be reloaded somewhere. (one of the patches deal with regular plugins, the other with protocol-plugins). -- Adil ---------------------------------------------------------------------- Comment By: Mark Doliner (thekingant) Date: 2005-06-23 21:51 Message: Logged In: YES user_id=20979 If gaim_plugin_reload() is never used then I get the feeling its original intention was to do what you're trying to do, and it would be better to change/replace it with your version. ---------------------------------------------------------------------- Comment By: Sadrul H C (sadrul) Date: 2005-06-23 19:00 Message: Logged In: YES user_id=1132702 I have now used g_stat (and updated the patch). grep tells me gaim_plugin_reload() is never called from anywhere (unless some plugin uses it). So changing/replacing it probably won't have any side-effects. -- Adil ---------------------------------------------------------------------- Comment By: Mark Doliner (thekingant) Date: 2005-06-23 18:38 Message: Logged In: YES user_id=20979 Definitely no configure flag (why would you ever want to disable this?) Is it possible to use g_stat or g_file_get_timestamp or something and avoid the use of stat? Could the plugin API reload a plugin automatically if it has changed, instead of making the preferences API deal with it? When is gaim_plugin_reload() used? Could it be changed to always do the "hard" reload? What side-effects would this have? ---------------------------------------------------------------------- Comment By: Sadrul H C (sadrul) Date: 2005-06-23 17:45 Message: Logged In: YES user_id=1132702 I added the stuff to work with prpl-s. Added the stuff in gaim_find_prpl (prpl.c) which seemed the most appropriate place to do it. I did a very simple check whether this works or not (changed a few strings in msn/session.c :-) ), and it seemed to work OK. But it'd be great if someone else checked these out and let me know the results. -- Adil ---------------------------------------------------------------------- Comment By: Sadrul H C (sadrul) Date: 2005-06-23 14:55 Message: Logged In: YES user_id=1132702 Perhaps I should reload only the modified *native* plugins? I am looking at prpl-s now. And it seems reloading the modified protocol-plugin can be done at gaim_connection_connect (connection.c) (it will of course, need to be made sure that no other account using that prpl is active) Perhaps this feature can/should be added with some configure-flags so that only the concerned people (the developers) have anything to do with it? -- Adil ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=300235&aid=1226022&group_id=235 |