chiark / gitweb /
Fix problem with allocating large buffers and log leftovers
[elogind.git] / src / journal-remote / journal-remote-parse.h
index c1506d118d73759fe4975abc5a602d0150440ca4..5b7f23650cbf9d3863360d058df2fd8a90d04248 100644 (file)
@@ -33,11 +33,12 @@ typedef enum {
 } source_state;
 
 typedef struct RemoteSource {
-        charname;
+        char *name;
         int fd;
 
         char *buf;
         size_t size;
+        size_t scanned;
         size_t filled;
         size_t data_size;
 
@@ -49,10 +50,10 @@ typedef struct RemoteSource {
         sd_event_source *event;
 } RemoteSource;
 
-static inline int source_non_empty(RemoteSource *source) {
+static inline size_t source_non_empty(RemoteSource *source) {
         assert(source);
 
-        return source->filled > 0;
+        return source->filled;
 }
 
 void source_free(RemoteSource *source);