/* This file is part of the yazpp toolkit.
- * Copyright (C) 1998-2011 Index Data and Mike Taylor
+ * Copyright (C) 1998-2013 Index Data and Mike Taylor
* See the file LICENSE for details.
*/
IPDU_Observer *MyClient::sessionNotify(IPDU_Observable *the_PDU_Observable,
int fd)
-{
+{
return new MyClient(the_PDU_Observable, m_socketManager);
}
if (r->direct_reference)
{
char name_oid_str[OID_STR_MAX];
- const char *name_oid = yaz_oid_to_string_buf(r->direct_reference, 0,
+ const char *name_oid = yaz_oid_to_string_buf(r->direct_reference, 0,
name_oid_str);
printf("Record type: %s\n", name_oid ? name_oid : "unknown");
}
(size_t) r->u.sutrs->len);
else if (r->which == Z_External_grs1)
recv_genericRecord(r->u.grs1);
- else
+ else
{
printf("Unknown record representation.\n");
if (!z_External(odr_print(), &r, 0, 0))
odr_perror(odr_print(), "Printing external");
odr_reset(odr_print());
}
- }
+ }
}
void MyClient::recv_namePlusRecord (Z_NamePlusRecord *zpr, int offset)
{"proxy", &MyClient::cmd_proxy, "<host>:[':'<port>]"},
{0,0,0}
};
-
+
if (sscanf(commandLine, "%s %[^;]", cmdStr, cmdArgs) < 1)
return 1;
int i;
for (i = 0; cmd[i].cmd; i++)
if (!strncmp(cmd[i].cmd, cmdStr, strlen(cmdStr)))
break;
-
+
int res = 1;
if (cmd[i].cmd) // Invoke command handler
res = (this->*cmd[i].fun)(cmdArgs);
strncpy(m_thisCommand,line_in, 1023);
m_thisCommand[1023] = '\0';
free (line_in);
-#else
+#else
// Read using fgets(3)
printf (C_PROMPT);
fflush(stdout);