### fold into append_lock? */ ### take an optional buf parameter? */
| 923 | /* ### fold into append_lock? */ |
| 924 | /* ### take an optional buf parameter? */ |
| 925 | static dav_error * dav_fs_add_locknull_state( |
| 926 | dav_lockdb *lockdb, |
| 927 | const dav_resource *resource) |
| 928 | { |
| 929 | dav_buffer buf = { 0 }; |
| 930 | apr_pool_t *p = lockdb->info->pool; |
| 931 | const char *dirpath; |
| 932 | const char *fname; |
| 933 | dav_error *err; |
| 934 | |
| 935 | /* ### should test this result value... */ |
| 936 | (void) dav_fs_dir_file_name(resource, &dirpath, &fname); |
| 937 | |
| 938 | if ((err = dav_fs_load_locknull_list(p, dirpath, &buf)) != NULL) { |
| 939 | return dav_push_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, |
| 940 | "Could not load .locknull file.", err); |
| 941 | } |
| 942 | |
| 943 | dav_buffer_append(p, &buf, fname); |
| 944 | buf.cur_len++; /* we want the null-term here */ |
| 945 | |
| 946 | if ((err = dav_fs_save_locknull_list(p, dirpath, &buf)) != NULL) { |
| 947 | return dav_push_error(p, HTTP_INTERNAL_SERVER_ERROR, 0, |
| 948 | "Could not save .locknull file.", err); |
| 949 | } |
| 950 | |
| 951 | return NULL; |
| 952 | } |
| 953 | |
| 954 | /* |
| 955 | ** dav_fs_remove_locknull_state: Given a request, check to see if r->filename |
no test coverage detected