MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / init

Method init

src/remote/server/ReplServer.cpp:308–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

306
307 private:
308 static int init(const PathName& directory, const Guid& guid)
309 {
310#ifdef WIN_NT
311 const mode_t ACCESS_MODE = DEFAULT_OPEN_MODE;
312#else
313 const mode_t ACCESS_MODE = 0664;
314#endif
315 char guidStr[GUID_BUFF_SIZE];
316 GuidToString(guidStr, &guid);
317
318 const PathName filename = directory + guidStr;
319
320 const int fd = os_utils::open(filename.c_str(),
321 O_CREAT | O_RDWR | O_BINARY, ACCESS_MODE);
322
323 if (fd < 0)
324 raiseError("Control file %s open failed (error: %d)", filename.c_str(), ERRNO);
325
326 return fd;
327 }
328
329 void flush()
330 {

Callers 8

putDataMethod · 0.45
newKeyMethod · 0.45
shutdownMethod · 0.45
setDbCryptCallbackMethod · 0.45
resetFunction · 0.45
execWithCheckMethod · 0.45
newKeyMethod · 0.45
allocate_statementFunction · 0.45

Calls 4

GuidToStringFunction · 0.85
openFunction · 0.50
raiseErrorFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected