* Europagate, 1995
*
* $Log: main.c,v $
- * Revision 1.17 1995/04/19 10:46:18 adam
+ * Revision 1.19 1995/04/19 16:01:58 adam
+ * Some hacks to get the FIFO communication work!! Isn't reliable.
+ * Resource gw.account added - default account info.
+ *
+ * Revision 1.18 1995/04/19 13:19:09 adam
+ * New command: account - for authentication.
+ *
+ * Revision 1.17 1995/04/19 10:46:18 adam
* Persistency works much better now. New command: status - history-like
*
* Revision 1.16 1995/04/19 07:31:07 adam
gip = gips_initialize (fifo_server_name);
gips_open (gip, fifo_client_name);
gip_fd = gip_infileno (gip);
+ open (fifo_server_name, O_WRONLY);
while (1)
{
info.default_res = "default.res";
info.override_res = NULL;
*info.target = 0;
+ *info.account = 0;
info.lang = NULL;
info.bibset = NULL;
info.zass = NULL;
if (*info.target && ! gw_res_get (info.kernel_res, resource_name, NULL))
{
/* target is there, and there is no sub-resource for it... */
- char *split;
+ const char *split;
if ((split = strchr (info.target, ':')))
- *split++ = '\0';
- strncpy (info.hostname, info.target, sizeof(info.hostname)-1);
- if (split)
- info.port = atoi (split);
+ {
+ memcpy (info.hostname, info.target, split-info.target);
+ info.hostname[split-info.target] = '\0';
+ info.port = atoi (split+1);
+ }
else
+ {
+ strcpy (info.hostname, info.target);
info.port = atoi (gw_res_get
(info.kernel_res, "gw.portno", "210"));
+ }
}
else
{
sizeof(info.hostname)-1);
info.port = atoi (gw_res_get (info.kernel_res,
"gw.portno", "210"));
+ strcpy (info.account, gw_res_get (info.kernel_res, "gw.account", ""));
}
if (info.databases)
free (info.databases);