Changeset 6f0a55 in git for Singular


Ignore:
Timestamp:
Feb 14, 2024, 3:05:03 PM (3 months ago)
Author:
Hans Schoenemann <hannes@…>
Branches:
(u'spielwiese', 'b4f17ed1d25f93d46dbe29e4b499baecc2fd51bb')
Children:
956c8a3cd124c9c2699cd7c5eb20233d90e2f41a
Parents:
a95300a2a7eb5b30b4ea424081ee2110c95212de
git-author:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2024-02-14 15:05:03+01:00
git-committer:
Hans Schoenemann <hannes@mathematik.uni-kl.de>2024-02-14 15:06:06+01:00
Message:
format, handling localhost for ssi:tcp
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Singular/links/ssiLink.cc

    ra95300 r6f0a55  
    10281028        int err1=pipe(pc);
    10291029        int err2=pipe(cp);
    1030         if (err1 || err2)
    1031         {
     1030        if (err1 || err2)
     1031        {
    10321032          Werror("pipe failed with %d\n",errno);
    10331033          return TRUE;
    1034         }
     1034        }
    10351035        link_list n=(link_list)omAlloc(sizeof(link_struct));
    10361036        n->u=u;
     
    11971197    }
    11981198    // =========================================================================
    1199     else /*l->name=NULL*/
     1199    else /*now l->name!=NULL*/
    12001200    {
    12011201      // tcp mode
     
    12531253        char* ssh_command = (char*)omAlloc(256);
    12541254        char* ser_host = (char*)omAlloc(64);
    1255         gethostname(ser_host,64);
     1255        if(strcmp(cli_host,"localhost")==0)
     1256          strcpy(ser_host,"localhost");
     1257        else
     1258          gethostname(ser_host,64);
    12561259        if (strcmp(cli_host,"localhost")==0) /*avoid "ssh localhost" as key may change*/
    12571260          snprintf(ssh_command,256,"%s -q --batch --link=ssi --MPhost=%s --MPport=%d &",path,ser_host,portno);
     
    12631266        if (TEST_OPT_PROT) { Print("running >>%s<<\n",ssh_command); }
    12641267        int re=system(ssh_command);
    1265         if (re<0)
    1266         {
     1268        if (re<0)
     1269        {
    12671270          Werror("ERROR running `%s` (%d)",ssh_command,re);
    12681271          l->data=NULL;
     
    12701273          omFree(d);
    12711274          return TRUE;
    1272         }
     1275        }
    12731276        omFree(ssh_command);
    12741277        omFree(ser_host);
Note: See TracChangeset for help on using the changeset viewer.