Compare commits

...
6 Commits
37 ... 39
Author SHA1 Message Date
Arjan van de Ven be8a99da53 allow service to start early 2017-05-07 15:42:30 +00:00
Ikey Doherty c9304402e2 Bump v38 to resync configure + tags
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2017-03-09 17:48:59 +00:00
Ikey Doherty 6e202f13f7 Bump v34
Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2017-03-09 17:46:10 +00:00
Ikey Doherty 6735f8f6ed nica/files: Ensure we really do break on a read error
Previously nc_copy_file would return true regardless of a source read
error, flagged in analysis. Ensure we bypass the set of ret to true and
return the correct value in all instances.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2017-03-09 15:44:09 +00:00
Ikey Doherty 8b3777ab99 server: Remove useless assignment of prefix
This particular assignment is never used, as if this path fails, we go to
the thread end. We then reassign prefix after we split the input string.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2017-03-09 15:38:29 +00:00
Ikey Doherty 84350939ef nica/hashmap: Fix signature issue & item dereference
The signature was incorrect for inserting buckets, as we used an int, not
a boolean. Another issue resolved with this change is the potential
dereferencing of a null pointer by not having checked first if item was
NULL when setting the next pointer.

Signed-off-by: Ikey Doherty <michael.i.doherty@intel.com>
2017-03-09 15:35:29 +00:00
6 changed files with 11 additions and 8 deletions
+1
View File
@@ -4,6 +4,7 @@ Description=Clear Linux debuginfo daemon
[Service]
Type=simple
ExecStart=/usr/bin/clr_debug_daemon
DefaultDependencies=no
[Install]
WantedBy=multi-user.target
+1
View File
@@ -5,6 +5,7 @@ After=clr_debug_daemon.service
[Service]
Type=simple
ExecStart=/usr/bin/clr_debug_fuse
DefaultDependencies=no
[Install]
WantedBy=multi-user.target
+1 -1
View File
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ([2.66])
AC_INIT(clr-debug-info, 33, arjan@linux.intel.com)
AC_INIT(clr-debug-info, 38, arjan@linux.intel.com)
AM_INIT_AUTOMAKE([foreign -Wall -W subdir-objects])
AM_SILENT_RULES([yes])
AC_PROG_CC
+1 -1
View File
@@ -113,7 +113,7 @@ bool nc_copy_file(const char *src, const char *dst, mode_t mode, bool remove_tar
while (true) {
if ((r = read(src_fd, &buffer, sizeof(buffer))) < 0) {
ret = false;
break;
goto end;
}
if (write(dest_fd, buffer, sizeof(buffer)) != r) {
break;
+7 -5
View File
@@ -123,8 +123,8 @@ static inline unsigned nc_hashmap_get_hash(NcHashmap *self, const void *key)
return hash;
}
static bool nc_hashmap_insert_bucket(NcHashmap *self, NcHashmapEntry *buckets, int n_buckets,
unsigned hash, const void *key, void *value)
static int nc_hashmap_insert_bucket(NcHashmap *self, NcHashmapEntry *buckets, int n_buckets,
unsigned hash, const void *key, void *value)
{
NcHashmapEntry *row = &(buckets[hash % n_buckets]);
NcHashmapEntry *head = NULL;
@@ -458,10 +458,12 @@ bool nc_hashmap_iter_next(NcHashmapIter *citer, void **key, void **value)
}
item = &(map->buckets[iter->bucket]);
}
if (item && item->occ) {
goto success;
if (item) {
if (item->occ) {
goto success;
}
item = item->next;
}
item = item->next;
}
return false;
-1
View File
@@ -282,7 +282,6 @@ static void *server_thread(void *arg)
if (ret < 0) {
goto thread_end;
}
prefix = buf;
c = strchr(buf, ':');
if (!c) {
goto thread_end;