Fossil

Diff
Login

Differences From Artifact [5a78aa5158]:

To Artifact [43aeafc30a]:


91
92
93
94
95
96
97
98
99
100


101
102


103
104
105
106
107
108
109
110
111
112
113
}

/*
** Global initialization of the transport layer
*/
void transport_global_startup(void){
  if( g.urlIsSsh ){
    char *zCmd;
    char zIn[20];
#ifdef __MINGW32__


    fossil_fatal("the ssh:// sync method is currently only supported on unix");
#endif


    if( g.urlUser && g.urlUser[0] ){
      zCmd = mprintf("ssh -e none %s@%s", g.urlUser, g.urlName);
    }else{
      zCmd = mprintf("ssh -e none %s", g.urlName);
    }
    /* printf("%s\n", zCmd); */
    popen2(zCmd, &sshIn, &sshOut, &sshPid);
    if( sshPid==0 ){
      fossil_fatal("cannot start ssh tunnel using [%s]", zCmd);
    }
    free(zCmd);







<
<

>
>
|

>
>

|

|







91
92
93
94
95
96
97


98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
}

/*
** Global initialization of the transport layer
*/
void transport_global_startup(void){
  if( g.urlIsSsh ){


#ifdef __MINGW32__
    static const char *zSshCmd = "ssh";
#else
    static const char *zSshCmd = "ssh -e none";
#endif
    char *zCmd;
    char zIn[20];
    if( g.urlUser && g.urlUser[0] ){
      zCmd = mprintf("%s %s@%s", zSshCmd, g.urlUser, g.urlName);
    }else{
      zCmd = mprintf("%s %s", zSshCmd, g.urlName);
    }
    /* printf("%s\n", zCmd); */
    popen2(zCmd, &sshIn, &sshOut, &sshPid);
    if( sshPid==0 ){
      fossil_fatal("cannot start ssh tunnel using [%s]", zCmd);
    }
    free(zCmd);