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

Overview
Comment:On windows, use the global variable _pgmptr instead of argv[0] in order to find the name of the current executable. Ticket [c8c0b78c840e4df9]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:23a3adac3937b26e4df718fda2e11827abc51eaa
User & Date: drh 2010-10-15 22:41:37
Context
2010-10-16
12:13
Do not free memory not obtained from malloc in the "fossil diff" command. Ticket [38d7bb8cf044219c2eff8]. check-in: ddb975e2 user: drh tags: trunk
2010-10-15
22:41
On windows, use the global variable _pgmptr instead of argv[0] in order to find the name of the current executable. Ticket [c8c0b78c840e4df9] check-in: 23a3adac user: drh tags: trunk
17:13
Replace all malloc() calls with fossil_malloc(). The fossil_malloc() routine panics rather than return a NULL pointer. check-in: 8f41b2fa user: drh tags: trunk
Changes

Changes to src/winhttp.c.

104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
      break;
    }
    wanted -= got;
  }
  fclose(out);
  out = 0;
  sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
    g.argv[0], g.zRepositoryName, zRequestFName, zReplyFName, 
    inet_ntoa(p->addr.sin_addr), p->zNotFound
  );
  portable_system(zCmd);
  in = fopen(zReplyFName, "rb");
  if( in ){
    while( (got = fread(zHdr, 1, sizeof(zHdr), in))>0 ){
      send(p->s, zHdr, got, 0);







|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
      break;
    }
    wanted -= got;
  }
  fclose(out);
  out = 0;
  sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s%s",
    _pgmptr, g.zRepositoryName, zRequestFName, zReplyFName, 
    inet_ntoa(p->addr.sin_addr), p->zNotFound
  );
  portable_system(zCmd);
  in = fopen(zReplyFName, "rb");
  if( in ){
    while( (got = fread(zHdr, 1, sizeof(zHdr), in))>0 ){
      send(p->s, zHdr, got, 0);