~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/module/library.cc

  • Committer: Package Import Robot
  • Author(s): Clint Byrum
  • Date: 2012-06-19 10:46:49 UTC
  • mfrom: (1.1.6)
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20120619104649-e2l0ggd4oz3um0f4
Tags: upstream-7.1.36-stable
ImportĀ upstreamĀ versionĀ 7.1.36-stable

Show diffs side-by-side

added added

removed removed

Lines of Context:
83
83
  }
84
84
 
85
85
  void *dl_handle= NULL;
86
 
  string dlpath("");
 
86
  string dlpath;
87
87
 
88
88
  if (builtin)
89
89
  {
90
 
    dlpath.assign("<builtin>");
 
90
    dlpath= "<builtin>";
91
91
    dl_handle= dlopen(NULL, RTLD_NOW|RTLD_LOCAL);
92
92
    if (dl_handle == NULL)
93
93
    {
102
102
  else
103
103
  {
104
104
  /* Open new dll handle */
105
 
    dlpath.assign(Library::getLibraryPath(plugin_name).file_string());
 
105
    dlpath= Library::getLibraryPath(plugin_name).file_string();
106
106
    dl_handle= dlopen(dlpath.c_str(), RTLD_NOW|RTLD_GLOBAL);
107
107
    if (dl_handle == NULL)
108
108
    {
134
134
  if (sym == NULL)
135
135
  {
136
136
    const char* errmsg= dlerror();
137
 
    errmsg_printf(error::ERROR, errmsg);
 
137
    errmsg_printf(error::ERROR, "%s", errmsg);
138
138
    errmsg_printf(error::ERROR, ER(ER_CANT_FIND_DL_ENTRY),
139
139
                  plugin_decl_sym.c_str(), dlpath.c_str());
140
140
    (void)dlerror();
154
154
    return NULL;
155
155
  }
156
156
 
157
 
  return new (nothrow) module::Library(plugin_name, dl_handle, module_manifest);
 
157
  return new module::Library(plugin_name, dl_handle, module_manifest);
158
158
}
159
159
 
160
160
} /* namespace drizzled */