Fossil SCM
Simplify the changes in the previous check-in slightly and add some calls to assert().
Commit
134f7fd1ce88721e5e9ed46547b7fac8f7de0986
Parent
1f8a4ecdb77e123…
1 file changed
+3
-1
+3
-1
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -117,11 +117,12 @@ | ||
| 117 | 117 | /* |
| 118 | 118 | ** The repository name is only needed if there was no open checkout. This |
| 119 | 119 | ** is designed to allow the open checkout for the interactive user to work |
| 120 | 120 | ** with the local Fossil server started via the "ui" command. |
| 121 | 121 | */ |
| 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] ); | |
| 123 | 124 | sqlite3_snprintf(sizeof(zCmd), zCmd, "%s%s\n%s\n%s\n%s", |
| 124 | 125 | get_utf8_bom(0), zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr), |
| 125 | 126 | g.zRepositoryName |
| 126 | 127 | ); |
| 127 | 128 | }else{ |
| @@ -192,10 +193,11 @@ | ||
| 192 | 193 | fwrite(zHdr, 1, got, out); |
| 193 | 194 | wanted += got; |
| 194 | 195 | } |
| 195 | 196 | fclose(out); |
| 196 | 197 | out = 0; |
| 198 | + assert( g.zRepositoryName && g.zRepositoryName[0] ); | |
| 197 | 199 | sqlite3_snprintf(sizeof(zCmd), zCmd, |
| 198 | 200 | "\"%s\" http \"%s\" \"%s\" %s \"%s\" --scgi --nossl%s", |
| 199 | 201 | g.nameOfExe, zRequestFName, zReplyFName, inet_ntoa(p->addr.sin_addr), |
| 200 | 202 | g.zRepositoryName, p->zOptions |
| 201 | 203 | ); |
| 202 | 204 |
| --- 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 |