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

Function get_key

src/utilities/drop.cpp:159–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

157#endif
158
159static SLONG get_key(const TEXT* filename)
160{
161/*************************************
162 *
163 * g e t _ k e y
164 *
165 *************************************
166 *
167 * Functional description
168 * Find the semaphore/shared memory key for a file.
169 *
170 ************************************/
171 TEXT expanded_filename[128], hostname[64];
172
173#ifdef NOHOSTNAME
174 strcpy(expanded_filename, filename);
175#else
176 sprintf(expanded_filename, filename, ISC_get_host(hostname, sizeof(hostname)));
177#endif
178
179 // Produce shared memory key for file
180
181 return ftok(expanded_filename, FTOK_KEY);
182}
183
184
185#ifndef HAVE_MMAP

Callers 1

remove_resourceFunction · 0.70

Calls 1

ISC_get_hostFunction · 0.85

Tested by

no test coverage detected