Fossil

Check-in [d5c934e5df]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a typo in the popen2() implementation for windows. Ticket [cf50ea4d6914fb6d856988da7]. Also refinements on the ssh:// toward getting it working on windows.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: d5c934e5df81f88878f3f9666ac5e96c3081cb9a
User & Date: drh 2010-08-27 17:19:05.000
Context
2010-08-27
20:40
The ssh:// method on windows is now working well with plink. It will even prompt for passwords if the URL contains a "*" password. ... (check-in: 0cdb6403cb user: drh tags: trunk)
17:19
Fix a typo in the popen2() implementation for windows. Ticket [cf50ea4d6914fb6d856988da7]. Also refinements on the ssh:// toward getting it working on windows. ... (check-in: d5c934e5df user: drh tags: trunk)
2010-08-26
14:13
Show diffs on info pages even if the user lacks history privilege. ... (check-in: 72147afc9d user: drh tags: trunk)
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/http_transport.c.
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);
Changes to src/popen.c.
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  }
  SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE);
  
  win32_create_child_process((char*)zCmd, 
                             hStdinRd, hStdoutWr, hStderr,&childPid);
  *pChildPid = childPid;
  *pfdIn = _open_osfhandle(hStdoutRd, 0);
  fd = _open_osfhandle(hStdoutWr, 0);
  *ppOut = _fdopen(fd, "w");
  CloseHandle(hStdinRd); 
  CloseHandle(hStdoutWr);
  return 0;
#else
  int pin[2], pout[2];
  *pfdIn = 0;







|







113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
  }
  SetHandleInformation( hStdinWr, HANDLE_FLAG_INHERIT, FALSE);
  
  win32_create_child_process((char*)zCmd, 
                             hStdinRd, hStdoutWr, hStderr,&childPid);
  *pChildPid = childPid;
  *pfdIn = _open_osfhandle(hStdoutRd, 0);
  fd = _open_osfhandle(hStdinWr, 0);
  *ppOut = _fdopen(fd, "w");
  CloseHandle(hStdinRd); 
  CloseHandle(hStdoutWr);
  return 0;
#else
  int pin[2], pout[2];
  *pfdIn = 0;