diff options
author | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-04-21 22:19:43 +0200 |
---|---|---|
committer | David Oberhollenzer <david.oberhollenzer@tele2.at> | 2018-04-22 13:41:18 +0200 |
commit | 160cd6b6aaffc12fb8cff0e6a9b8e1e0ba7053d0 (patch) | |
tree | 08caea2de35007173a168c65d41ff26fd71b8b0d /lib/src/rdsvc.c | |
parent | 32113521eb21b36cd26ebde5c15aac09c7212ee6 (diff) |
Store original file name in service structure
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
Diffstat (limited to 'lib/src/rdsvc.c')
-rw-r--r-- | lib/src/rdsvc.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/src/rdsvc.c b/lib/src/rdsvc.c index 1f859b7..ef3465f 100644 --- a/lib/src/rdsvc.c +++ b/lib/src/rdsvc.c @@ -289,6 +289,10 @@ service_t *rdsvc(int dirfd, const char *filename) if (svc == NULL) goto fail_oom; + svc->fname = strdup(filename); + if (svc->fname == NULL) + goto fail_oom; + memcpy(svc->name, filename, nlen); while ((ret = rdline(&rd)) == 0) { |