Fossil SCM

Simplify the changes in the previous check-in slightly and add some calls to assert().

mistachkin 2014-09-16 05:28 trunk
Commit 134f7fd1ce88721e5e9ed46547b7fac8f7de0986
1 file changed +3 -1
+3 -1
--- src/winhttp.c
+++ src/winhttp.c
@@ -117,11 +117,12 @@
117117
/*
118118
** The repository name is only needed if there was no open checkout. This
119119
** is designed to allow the open checkout for the interactive user to work
120120
** with the local Fossil server started via the "ui" command.
121121
*/
122
- if( g.zRepositoryName && (p->flags&HTTP_SERVER_HAD_CHECKOUT)==0 ){
122
+ if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
123
+ assert( g.zRepositoryName && g.zRepositoryName[0] );
123124
sqlite3_snprintf(sizeof(zCmd), zCmd, "%s%s\n%s\n%s\n%s",
124125
get_utf8_bom(0), zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr),
125126
g.zRepositoryName
126127
);
127128
}else{
@@ -192,10 +193,11 @@
192193
fwrite(zHdr, 1, got, out);
193194
wanted += got;
194195
}
195196
fclose(out);
196197
out = 0;
198
+ assert( g.zRepositoryName && g.zRepositoryName[0] );
197199
sqlite3_snprintf(sizeof(zCmd), zCmd,
198200
"\"%s\" http \"%s\" \"%s\" %s \"%s\" --scgi --nossl%s",
199201
g.nameOfExe, zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr),
200202
g.zRepositoryName, p->zOptions
201203
);
202204
--- src/winhttp.c
+++ src/winhttp.c
@@ -117,11 +117,12 @@
117 /*
118 ** The repository name is only needed if there was no open checkout. This
119 ** is designed to allow the open checkout for the interactive user to work
120 ** with the local Fossil server started via the "ui" command.
121 */
122 if( g.zRepositoryName && (p->flags&HTTP_SERVER_HAD_CHECKOUT)==0 ){
 
123 sqlite3_snprintf(sizeof(zCmd), zCmd, "%s%s\n%s\n%s\n%s",
124 get_utf8_bom(0), zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr),
125 g.zRepositoryName
126 );
127 }else{
@@ -192,10 +193,11 @@
192 fwrite(zHdr, 1, got, out);
193 wanted += got;
194 }
195 fclose(out);
196 out = 0;
 
197 sqlite3_snprintf(sizeof(zCmd), zCmd,
198 "\"%s\" http \"%s\" \"%s\" %s \"%s\" --scgi --nossl%s",
199 g.nameOfExe, zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr),
200 g.zRepositoryName, p->zOptions
201 );
202
--- src/winhttp.c
+++ src/winhttp.c
@@ -117,11 +117,12 @@
117 /*
118 ** The repository name is only needed if there was no open checkout. This
119 ** is designed to allow the open checkout for the interactive user to work
120 ** with the local Fossil server started via the "ui" command.
121 */
122 if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
123 assert( g.zRepositoryName && g.zRepositoryName[0] );
124 sqlite3_snprintf(sizeof(zCmd), zCmd, "%s%s\n%s\n%s\n%s",
125 get_utf8_bom(0), zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr),
126 g.zRepositoryName
127 );
128 }else{
@@ -192,10 +193,11 @@
193 fwrite(zHdr, 1, got, out);
194 wanted += got;
195 }
196 fclose(out);
197 out = 0;
198 assert( g.zRepositoryName && g.zRepositoryName[0] );
199 sqlite3_snprintf(sizeof(zCmd), zCmd,
200 "\"%s\" http \"%s\" \"%s\" %s \"%s\" --scgi --nossl%s",
201 g.nameOfExe, zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr),
202 g.zRepositoryName, p->zOptions
203 );
204

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button