projects
/
blerg.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Normalize /subscribe to accept a parameter rather than having two endpoints
[blerg.git]
/
database
/
subscription.c
diff --git
a/database/subscription.c
b/database/subscription.c
index
aac7acf
..
c1633fe
100644
(file)
--- a/
database/subscription.c
+++ b/
database/subscription.c
@@
-88,12
+88,12
@@
struct blergref * subscription_list(const char *author, uint64_t offset, int *co
int feed_fd = open(filename, O_RDONLY);
if (feed_fd == -1) {
perror("Could not open subscription feed");
int feed_fd = open(filename, O_RDONLY);
if (feed_fd == -1) {
perror("Could not open subscription feed");
- goto subscription_list_
map
_failed;
+ goto subscription_list_
open
_failed;
}
fstat(feed_fd, &st);
if (st.st_size == 0) {
}
fstat(feed_fd, &st);
if (st.st_size == 0) {
-
close(feed_fd
);
+
fprintf(stderr, "Feed is empty\n"
);
goto subscription_list_map_failed;
}
n_subscription_records = st.st_size / sizeof(struct blergref);
goto subscription_list_map_failed;
}
n_subscription_records = st.st_size / sizeof(struct blergref);