Fossil SCM

Minor repo_list_page() API doc addition and zeroed a closed db handle, "just in case".

stephan 2020-02-10 08:32 trunk
Commit d87bf251e5fd71fe525b02d3d0944c8991cdc08dd3947a5c84ce74f79e67016b
1 file changed +2 -1
+2 -1
--- src/repolist.c
+++ src/repolist.c
@@ -96,11 +96,11 @@
9696
** to signal the special processing in that case. The special case
9797
** processing is intended for the "fossil all ui" command which never
9898
** runs in a chroot jail anyhow.
9999
**
100100
** Or, if no repositories can be located beneath g.zRepositoryName,
101
-** return 0.
101
+** close g.db and return 0.
102102
*/
103103
int repo_list_page(void){
104104
Blob base; /* document root for all repositories */
105105
int n = 0; /* Number of repositories found */
106106
int allRepo; /* True if running "fossil ui all".
@@ -140,10 +140,11 @@
140140
allRepo = 0;
141141
}
142142
n = db_int(0, "SELECT count(*) FROM sfile");
143143
if( n==0 ){
144144
sqlite3_close(g.db);
145
+ g.db = 0;
145146
return 0;
146147
}else{
147148
Stmt q;
148149
double rNow;
149150
blob_append_sql(&html,
150151
--- src/repolist.c
+++ src/repolist.c
@@ -96,11 +96,11 @@
96 ** to signal the special processing in that case. The special case
97 ** processing is intended for the "fossil all ui" command which never
98 ** runs in a chroot jail anyhow.
99 **
100 ** Or, if no repositories can be located beneath g.zRepositoryName,
101 ** return 0.
102 */
103 int repo_list_page(void){
104 Blob base; /* document root for all repositories */
105 int n = 0; /* Number of repositories found */
106 int allRepo; /* True if running "fossil ui all".
@@ -140,10 +140,11 @@
140 allRepo = 0;
141 }
142 n = db_int(0, "SELECT count(*) FROM sfile");
143 if( n==0 ){
144 sqlite3_close(g.db);
 
145 return 0;
146 }else{
147 Stmt q;
148 double rNow;
149 blob_append_sql(&html,
150
--- src/repolist.c
+++ src/repolist.c
@@ -96,11 +96,11 @@
96 ** to signal the special processing in that case. The special case
97 ** processing is intended for the "fossil all ui" command which never
98 ** runs in a chroot jail anyhow.
99 **
100 ** Or, if no repositories can be located beneath g.zRepositoryName,
101 ** close g.db and return 0.
102 */
103 int repo_list_page(void){
104 Blob base; /* document root for all repositories */
105 int n = 0; /* Number of repositories found */
106 int allRepo; /* True if running "fossil ui all".
@@ -140,10 +140,11 @@
140 allRepo = 0;
141 }
142 n = db_int(0, "SELECT count(*) FROM sfile");
143 if( n==0 ){
144 sqlite3_close(g.db);
145 g.db = 0;
146 return 0;
147 }else{
148 Stmt q;
149 double rNow;
150 blob_append_sql(&html,
151

Keyboard Shortcuts

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