[Groonga-commit] groonga/groonga [master] clear errline and errfile after grn_dl_close() is succeeded.

Back to archive index

null+****@clear***** null+****@clear*****
2011年 2月 27日 (日) 16:35:24 JST


Kouhei Sutou	2011-02-27 07:35:24 +0000 (Sun, 27 Feb 2011)

  New Revision: 42592dacf275517ad16ac720c5aaf3685dbccc91

  Log:
    clear errline and errfile after grn_dl_close() is succeeded.
    
    Reported by @tomotaka_ito. Thanks!!!

  Modified files:
    lib/plugin.c

  Modified: lib/plugin.c (+5 -1)
===================================================================
--- lib/plugin.c    2011-02-27 02:33:02 +0000 (9bdc4ff)
+++ lib/plugin.c    2011-02-27 07:35:24 +0000 (a061859)
@@ -161,7 +161,11 @@ grn_plugin_open(grn_ctx *ctx, const char *filename)
       }
       if (!*plugin) {
         grn_hash_delete_by_id(ctx, grn_plugins, id, NULL);
-        if (!grn_dl_close(dl)) {
+        if (grn_dl_close(dl)) {
+          /* Now, __FILE__ set in plugin is invalid. */
+          ctx->errline = 0;
+          ctx->errfile = NULL;
+        } else {
           const char *label;
           label = grn_dl_close_error_label;
           SERR(label);




Groonga-commit メーリングリストの案内
Back to archive index