TIP: Click on subject to list as thread! ANSI
echo: ftsc_public
to: WILFRED VAN VELZEN
from: BJRN FELTEN
date: 2016-01-25 16:09:00
subject: BSO .try files

 WvV> Now I noticed that binkd is writing 5 binary bytes to a try file. Seems
 WvV> like some status information, plus the following string length.

   Yes indeed binkd is using those files for some seemingly undocumented
purpose.

   In a quick and dirty search, I found this in ftnq.c:

void write_try (FTN_ADDR *fa, unsigned *nok, unsigned *nbad, char *comment,
BINKD_CONFIG *config)
{
  char buf[MAXPATHLEN + 1];

  if (config->tries > 0)
  {
    ftnaddress_to_filename (buf, fa, config);
    if (*buf)
    {
      FILE *f;

      strnzcat (buf, ".try", sizeof (buf));
      if ((f = fopen (buf, "wb")) != NULL)
      {
 fprintf (f, "%c%c%c%c%c%s",
   *nok & 0xff, *nok >> 8,
   *nbad & 0xff, *nbad >> 8,
   (int) strlen (comment),
   comment);
 fclose (f);
      }
    }
  }
}

void read_try (FTN_ADDR *fa, unsigned *nok, unsigned *nbad, BINKD_CONFIG
*config)
{
  char buf[MAXPATHLEN + 1];

  ftnaddress_to_filename (buf, fa, config);
  if (*buf)
  {
    FILE *f;
    unsigned char ch1, ch2, ch3, ch4;

    strnzcat (buf, ".try", sizeof (buf));
    if ((f = fopen (buf, "rb")) != NULL &&
 fscanf (f, "%c%c%c%c", &ch1, &ch2, &ch3, &ch4) == 4)
    {
      *nok = ch1 + (ch2 << 8);
      *nbad = ch3 + (ch4 << 8);
    }
    else
    {
      *nok = *nbad = 0;
    }
    if (f)
      fclose (f);
  }
}


   I haven't found the time to further investigate e.g. the define for the
*.try file, but if I find anything I'll keep you posted.

--- Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.9.1.16) Gecko/20101125
* Origin: news://eljaco.se (2:203/2)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.