mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-24 01:23:03 +01:00
Misc.
This commit is contained in:
parent
a5900b4214
commit
8e8586669f
@ -44,9 +44,6 @@ int CLIB_ROUTINE main( int argc, char **argv)
|
|||||||
ISC_STATUS_ARRAY status;
|
ISC_STATUS_ARRAY status;
|
||||||
isc_svc_handle svc_handle = NULL;
|
isc_svc_handle svc_handle = NULL;
|
||||||
char svc_name[256];
|
char svc_name[256];
|
||||||
char *sptr, sendbuf[512];
|
|
||||||
char respbuf[256], *p = respbuf;
|
|
||||||
unsigned short path_length;
|
|
||||||
|
|
||||||
if (argc != 2 && argc != 1) {
|
if (argc != 2 && argc != 1) {
|
||||||
printf("Usage %s \n %s filename\n");
|
printf("Usage %s \n %s filename\n");
|
||||||
@ -59,7 +56,6 @@ int CLIB_ROUTINE main( int argc, char **argv)
|
|||||||
else
|
else
|
||||||
strcpy(fname, argv[1]);
|
strcpy(fname, argv[1]);
|
||||||
|
|
||||||
sptr = sendbuf;
|
|
||||||
strcpy(buffer, fname);
|
strcpy(buffer, fname);
|
||||||
printf("Filename to dump pool info = %s \n", buffer);
|
printf("Filename to dump pool info = %s \n", buffer);
|
||||||
sprintf(svc_name, "localhost:anonymous");
|
sprintf(svc_name, "localhost:anonymous");
|
||||||
@ -68,14 +64,19 @@ int CLIB_ROUTINE main( int argc, char **argv)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
path_length = strlen(buffer);
|
const unsigned short path_length = strlen(buffer);
|
||||||
|
|
||||||
|
char sendbuf[512];
|
||||||
|
char* sptr = sendbuf;
|
||||||
*sptr = isc_info_svc_dump_pool_info;
|
*sptr = isc_info_svc_dump_pool_info;
|
||||||
++sptr;
|
++sptr;
|
||||||
add_word(sptr, path_length);
|
add_word(sptr, path_length);
|
||||||
strcpy(sptr, buffer);
|
strcpy(sptr, buffer);
|
||||||
sptr += path_length;
|
sptr += path_length;
|
||||||
|
|
||||||
|
char respbuf[256];
|
||||||
if (isc_service_query
|
if (isc_service_query
|
||||||
(status, &svc_handle, NULL, 0, NULL, sptr - sendbuf, sendbuf, 256,
|
(status, &svc_handle, NULL, 0, NULL, sptr - sendbuf, sendbuf, sizeof(respbuf),
|
||||||
respbuf))
|
respbuf))
|
||||||
{
|
{
|
||||||
printf("Failed to query service\n");
|
printf("Failed to query service\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user