Fossil SCM
Minor repo_list_page() API doc addition and zeroed a closed db handle, "just in case".
Commit
d87bf251e5fd71fe525b02d3d0944c8991cdc08dd3947a5c84ce74f79e67016b
Parent
b45da258cbbc2d8…
1 file changed
+2
-1
+2
-1
| --- src/repolist.c | ||
| +++ src/repolist.c | ||
| @@ -96,11 +96,11 @@ | ||
| 96 | 96 | ** to signal the special processing in that case. The special case |
| 97 | 97 | ** processing is intended for the "fossil all ui" command which never |
| 98 | 98 | ** runs in a chroot jail anyhow. |
| 99 | 99 | ** |
| 100 | 100 | ** Or, if no repositories can be located beneath g.zRepositoryName, |
| 101 | -** return 0. | |
| 101 | +** close g.db and return 0. | |
| 102 | 102 | */ |
| 103 | 103 | int repo_list_page(void){ |
| 104 | 104 | Blob base; /* document root for all repositories */ |
| 105 | 105 | int n = 0; /* Number of repositories found */ |
| 106 | 106 | int allRepo; /* True if running "fossil ui all". |
| @@ -140,10 +140,11 @@ | ||
| 140 | 140 | allRepo = 0; |
| 141 | 141 | } |
| 142 | 142 | n = db_int(0, "SELECT count(*) FROM sfile"); |
| 143 | 143 | if( n==0 ){ |
| 144 | 144 | sqlite3_close(g.db); |
| 145 | + g.db = 0; | |
| 145 | 146 | return 0; |
| 146 | 147 | }else{ |
| 147 | 148 | Stmt q; |
| 148 | 149 | double rNow; |
| 149 | 150 | blob_append_sql(&html, |
| 150 | 151 |
| --- 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 |