• XSDK error writing to socket

    From Hemo@VERT to All on Thu May 26 02:27:48 2016
    Thanks digital man for providing the XSDK, that sure is slick and made some things I was working on a lot easier than I expected!

    Tonight I spent some time updating the source to an old linux console curses based game to use the XSDK and data available in the xtrn.dat drop file instead of using command line parameters or the linux environment.

    For the most part, that works well, but I do get a STDERR whenever calling the program, even though the program seems to operatore correctly.

    !XSDK Error -1 (9) sending on socket 28

    The number in paranthesis may change, last time I ran the door that number was (88).

    Is this something I should worry about? I can eliminate the message by redirecting STDERR to a log file, but if there is a better/correct method to eliminate this, I'm interested.


    -What I want is all of the power and none of the responsibility.- bbs.ujoint.org - Running Madly into the Wind and Screaming ...

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Digital Man@VERT to Hemo on Thu May 26 05:12:30 2016
    Re: XSDK error writing to socket
    By: Hemo to All on Wed May 25 2016 10:27 pm

    Thanks digital man for providing the XSDK, that sure is slick and made some things I was working on a lot easier than I expected!

    Tonight I spent some time updating the source to an old linux console curses based game to use the XSDK and data available in the xtrn.dat drop file instead of using command line parameters or the linux environment.

    For the most part, that works well, but I do get a STDERR whenever calling the program, even though the program seems to operatore correctly.

    !XSDK Error -1 (9) sending on socket 28

    The number in paranthesis may change, last time I ran the door that number was (88).

    That number will correspond with a value from errno.h:
    #define EBADF 9 /* Bad file number */
    #define ENOTSOCK 88 /* Socket operation on non-socket */

    So it sounds like it's trying to write to the socket descriptor provided in the xtrn.dat file, but it's not a valid socket.

    Is this something I should worry about? I can eliminate the message by redirecting STDERR to a log file, but if there is a better/correct method to eliminate this, I'm interested.

    How do you have "Intercept I/O" option set for your door in SCFG? For XSDK, it should normally be set to "No". It sounds like you may have it set to "Standard" instead.

    digital man

    Synchronet "Real Fact" #9:
    The name "DOVE-Net" comes from: The Beast's DOmain / VErtrauen network.
    Norco, CA WX: 55.1°F, 75.0% humidity, 0 mph SE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Hemo@VERT/UJOINT to Digital Man on Thu May 26 20:45:11 2016
    Re: XSDK error writing to socket
    By: Digital Man to Hemo on Thu May 26 2016 01:12 am

    How do you have "Intercept I/O" option set for your door in SCFG? For XSDK, it should normally be set to "No". It sounds like you may have it set to "Standard" instead.

    oh.. it got better than that the more I fiddled with things...

    I narrowed it down to xsdk.c and the presence of pre-existing XTRN.DAT files in the node directorys when I did the initial pull to build the system.

    xsdk.c is looking for XTRN.DAT in the node directory, and on CentOS - the system is writing out xtrn.dat files. Whatever settings were in the XTRN.DAT must have been causing things, and I honestly can't say how the program was starting any longer, unless I was connected to a different node and that file had slightly different settings... once I removed the XTRN.DAT files I would then catch a glimpse that the system couldn't find file /sbbs/node1/XTRN.DAT

    facepalm<

    I made an edit to xsdk.c :
    #if defined(__unix__)
    sprintf(str,"%sxtrn.dat",node_dir);
    #else
    sprintf(str,"%sXTRN.DAT",node_dir);
    #endif

    I have needed to make a few other edits in the xsdk as well, some conflicts with getch and getstr between the xsdk and curses,it seems.

    Things are better, I'm off to the next step of my project..

    ---
    ■ Synchronet ■ - Running madly into the wind and screaming - bbs.ujoint.org
  • From Digital Man@VERT to Hemo on Thu May 26 19:54:17 2016
    Re: XSDK error writing to socket
    By: Hemo to Digital Man on Thu May 26 2016 04:45 pm

    Re: XSDK error writing to socket
    By: Digital Man to Hemo on Thu May 26 2016 01:12 am

    How do you have "Intercept I/O" option set for your door in SCFG? For XSDK, it should normally be set to "No". It sounds like you may have it set to "Standard" instead.

    oh.. it got better than that the more I fiddled with things...

    I narrowed it down to xsdk.c and the presence of pre-existing XTRN.DAT files in the node directorys when I did the initial pull to build the system.

    xsdk.c is looking for XTRN.DAT in the node directory, and on CentOS - the system is writing out xtrn.dat files.

    The case (upper or lower) of the drop file is configurable in SCFG. You apparently have it configured to drop a lowercase xtrn.dat.

    Whatever settings were in the
    XTRN.DAT must have been causing things, and I honestly can't say how the program was starting any longer, unless I was connected to a different node and that file had slightly different settings... once I removed the XTRN.DAT files I would then catch a glimpse that the system couldn't find file /sbbs/node1/XTRN.DAT

    facepalm<

    I made an edit to xsdk.c :
    #if defined(__unix__)
    sprintf(str,"%sxtrn.dat",node_dir);
    #else
    sprintf(str,"%sXTRN.DAT",node_dir);
    #endif

    I have needed to make a few other edits in the xsdk as well, some conflicts with getch and getstr between the xsdk and curses,it seems.

    Things are better, I'm off to the next step of my project..

    Okay, cool. XSDK is pretty old and crufty now and most new stuff for Synchronet is written in JS. But I'm glad it's working for you!

    digital man

    Synchronet/BBS Terminology Definition #42:
    XON = Transmit On (ASCII 17, Ctrl-Q)
    Norco, CA WX: 72.1°F, 54.0% humidity, 4 mph SE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Hemo@VERT/UJOINT to Digital Man on Fri May 27 13:33:43 2016
    Re: XSDK error writing to socket
    By: Digital Man to Hemo on Thu May 26 2016 03:54 pm

    The case (upper or lower) of the drop file is configurable in SCFG. You apparently have it configured to drop a lowercase xtrn.dat.

    there is that. this is what I get for not paying attention when trying multiple things. I likely had it set to upper case initially, and then somewhere along the lines of trying to debug the other issue, changed this to lower case.

    I might adjust the #ifdef I added and have the XSDK look for upper case
    first, and then if on linux, also check for lower case if upper case is not found before giving up. That might save me from memory fog in a few months.

    ---
    ■ Synchronet ■ - Running madly into the wind and screaming - bbs.ujoint.org
  • From Digital Man@VERT to Hemo on Fri May 27 21:05:10 2016
    Re: XSDK error writing to socket
    By: Hemo to Digital Man on Fri May 27 2016 09:33 am

    Re: XSDK error writing to socket
    By: Digital Man to Hemo on Thu May 26 2016 03:54 pm

    The case (upper or lower) of the drop file is configurable in SCFG. You apparently have it configured to drop a lowercase xtrn.dat.

    there is that. this is what I get for not paying attention when trying multiple things. I likely had it set to upper case initially, and then somewhere along the lines of trying to debug the other issue, changed this to lower case.

    I might adjust the #ifdef I added and have the XSDK look for upper case first, and then if on linux, also check for lower case if upper case is not found before giving up. That might save me from memory fog in a few months.

    Using fexistcase(), from xpdev, would be the better solution.

    digital man

    Synchronet "Real Fact" #19:
    The first Synchronet BBS (Vertrauen) went live in July of 1991 (replacing WWIV).
    Norco, CA WX: 73.1°F, 54.0% humidity, 20 mph SSE wind, 0.00 inches rain/24hrs

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net
  • From Hemo@VERT to Digital Man on Sat May 28 22:59:38 2016
    Re: XSDK error writing to socket
    By: Digital Man to Hemo on Fri May 27 2016 05:05 pm

    The case (upper or lower) of the drop file is configurable in SCFG. apparently have it configured to drop a lowercase xtrn.dat.

    there is that. this is what I get for not paying attention when trying multiple things. I likely had it set to upper case initially, and then somewhere along the lines of trying to debug the other issue, changed thi to lower case.

    I might adjust the #ifdef I added and have the XSDK look for upper case first, and then if on linux, also check for lower case if upper case is n found before giving up. That might save me from memory fog in a few mont

    Using fexistcase(), from xpdev, would be the better solution.

    Ugh. I'm taking baby steps in C. This project is basically a learning experiment and I pretty much don't know what I'm doing most of the time, using
    the knowledge I have from other languages and knowing what I want to do , looking up the commands to do that, etc.

    I tried adding what I thought I needed from xpdev, and the make blew up with more declaration conflicts against the /usr/include files so I'm going to work on things at the level I'm able to, and just stick to using the xsdk for now.

    I do appreciate the tip, perhaps one day I'll be using it. For now, adding too much might get me in over my head.

    Hemo
    bbs.ujoint.org - Running Madly into the Wind and Screaming ...

    ---
    ■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ telnet://vert.synchro.net