summaryrefslogtreecommitdiff
path: root/libdaemon/client
Commit message (Collapse)AuthorAgeFilesLines
* coverity: helping coverity with NULL pointerZdenek Kabelac2016-02-261-2/+2
| | | | | | Helping with understanding we will not try to deref NULL pointer, as if the sizes are initialized to NULL it also means 'mem' would be NULL, but thats too hard to model so make it obvious.
* gcc: logical-op warning go awayZdenek Kabelac2016-02-231-4/+6
| | | | | Don't be too much inventive and shutdown gcc6 warning: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69602
* doc: change fsf addressZdenek Kabelac2016-01-217-7/+7
| | | | | Hmm rpmlint suggest fsf is using a different address these days, so lets keep it up-to-date
* libdaemon: prohibit use of %d for 64bit numbresZdenek Kabelac2015-11-091-1/+6
| | | | | Do not let pass %d and print internal error when found one. Require all users to use FMTd64 - it's seriously confusing.
* lockd: add debug logging for metadata errorDavid Teigland2015-09-292-1/+2
| | | | | | | | | When lvmetad_pvscan_vg() reads VG metadata from each PV, it compares it to the last one to verify it matches. If the VG metadata does not match on the PVs, an error is printed and it fails to read the VG. In this error case, use log_debug to show the differences between the two unmatching copies of the metadata.
* libdaemon: config_make_nodes_v needs fixingPeter Rajnoha2015-07-091-0/+4
| | | | | | Put the change from commit #10d27998b3d2f6100e9e29e83d1d99948c55875f back so we have working tree again for now. This code needs a bit of a cleanup to return proper return value to check...
* include: Standardise around new tool.h.Alasdair G Kergon2015-07-066-25/+12
|
* macros: Wrap PRI with FMT.Alasdair G Kergon2015-07-061-2/+3
| | | | | Create a set of wrappers with embedded % such as #define FMTu64 "%" PRIu64
* Add lvmlockddev-dct-lvmlockd-AZDavid Teigland2015-07-021-3/+13
|
* libdaemon: move compare_config to libDavid Teigland2015-06-172-0/+59
| | | | so it can be used elsewhere.
* libdaemon: Export chain_node from config-utils.c.Petr Rockai2015-04-142-3/+7
|
* cleanup: drop unused valZdenek Kabelac2015-02-171-6/+0
|
* libdaemon: Use select to yield CPU on a blocked read or write.Petr Rockai2015-02-051-5/+22
|
* libdaemon: Fix some client leaks.Alasdair G Kergon2014-11-282-10/+27
| | | | | | | | | | Free (and clear) h.protocol string on daemon_open() error paths so it's OK for caller to skip calling daemon_close() if returned h.socket_fd is -1. Close h.socket_fd in daemon_close() to avoid possible leak. https://bugzilla.redhat.com/1164234
* va_list: properly pass va_list through functionsZdenek Kabelac2014-09-161-4/+12
| | | | | | | | | | Code should not just pass va_list arg through the function as args could be passed in many strange ways. Use va_copy(). For details look in i.e.: http://julipedia.meroh.net/2011/09/using-vacopy-to-safely-pass-ap.html
* libdaemon: header cleanupZdenek Kabelac2014-04-186-16/+12
| | | | | | | Ensure daemon-io.h is used as a generic header included with configure defines before other headers. (In future all lvm2 libraries should settle on a single lib.h header) Rename couple defines to better match header file names.
* libdaemon: fix misleading "WARNING: Ignoring unsupported value for ↵Peter Rajnoha2014-03-241-1/+1
| | | | | | | | | | | | | | | | | | expected." when communicating with daemon When we're trying to search for certain tree node in daemon's reply, we default to a blank string "" if the node is not found. This happens during lvmetad initialization. However, when the default blank string is used, we can't use dm_config_find_str at the same time - the dm_config_find_str_allow_empty should be used instead. Otherwise a a warning message: "WARNING: Ignoring unsupported value for ..." is issued.
* libdaemon: Fix an invalid memory read.Petr Rockai2013-10-081-1/+1
|
* cleanup: easier to read loop codeZdenek Kabelac2013-06-182-38/+29
| | | | | buffer_write now accepts const pointer Simplify loops and drop goto when not needed.
* lvmetad: fix compare functionZdenek Kabelac2013-06-181-1/+1
| | | | | | | | | Check for enough space in preallocated buffer. Fixes problem, when lvm code started to suddenly allocate too big memory chunks. TODO: lvmetad protocol should announce needed size ahead, so if metadata have 1MB we are not reallocating memory...
* lvmetad: use dm_ malloc wrappersZdenek Kabelac2013-06-181-1/+1
| | | | Use matching dm_ functions for internally used buffers.
* libdaemon: add logging to daemon_openAlasdair G Kergon2013-01-041-8/+28
| | | | | | Log all conditions encountered in daemon_open(). Only store errno when known to be set.
* lvmetad: add check for failure dm_config_write_nodeZdenek Kabelac2012-12-151-1/+4
| | | | Detect if dm_config_write_node failed and fail correctly.
* lvmetad: keep returned struct fully initializedZdenek Kabelac2012-12-151-3/+3
| | | | | Always clear the response structure. Simplify daemon_reply initialization.
* libdaemon: check for strdup resultZdenek Kabelac2012-12-151-6/+11
| | | | | | | | Detect failure of dm_pool_strdup() and print error in fail path. Save one extra strchr call - since we already know the distance for the '=' character. Drop stack trace from return after log_error().
* lvmetad: fix leak of append on error pathZdenek Kabelac2012-10-141-1/+1
|
* lvmetad: fix memory leaks in error pathsZdenek Kabelac2012-10-131-3/+4
| | | | | | Destroy interator in error path. Releasy any possible allocated buffer from buffer_append_f and buffer_append_vf in error path.
* lvmetad: move initialization in the inner loopZdenek Kabelac2012-10-131-1/+2
| | | | | Set append to NULL in the front of cycle, so the INTERNAL error path is not leading to double-free of append pointer.
* cleanup: remove unneeded headersZdenek Kabelac2012-10-131-1/+0
| | | | Header do not provide any needed symbols.
* lvmetad: fix test for dm_asprintfZdenek Kabelac2012-10-121-4/+4
|
* lvmetad: validate dm_asprintf in buffer_append_vfZdenek Kabelac2012-10-121-13/+20
| | | | | | Check result of dm_asprintf Check buffer_append result Declare vars in front
* lvmetad: check result of buffer_reallocZdenek Kabelac2012-10-121-2/+3
|
* cleanup: fix compiler warningsZdenek Kabelac2012-10-122-10/+24
| | | | | | remove unused vars move var declarations into the front of functions. fix some sign warnings
* libdaemon: Make buffer handling asymptotically more efficient.Petr Rockai2012-10-116-83/+107
|
* libdaemon-client: Fix a memory leak in daemon_send.Petr Rockai2012-10-081-4/+8
|
* libdaemon: Split daemon-shared.[hc] into daemon-io.[hc] and config-util.[hc].Petr Rockai2012-09-266-90/+136
|
* libdaemonclient: Use log_sys_error in place of perror.Petr Rockai2012-09-261-1/+1
|
* libdaemonclient: Use dm_{malloc,free} in place of {malloc,free}.Petr Rockai2012-09-261-3/+2
|
* lvmetad: Fix #845269: SEGV on corrupt lvmetad response.Petr Rockai2012-09-261-0/+2
|
* lvmetad: Use "%" PRId64 in place of "%d" for extra clarity.Petr Rockai2012-09-261-4/+4
|
* Implement devices/global_filter.Petr Rockai2012-09-261-1/+3
| | | | | The global filter is applied first, and is also applied in pvscan --cache (which is called from udev rules to keep lvmetad updated). Cf. example.conf.
* libdaemon: Extend and refactor APIs.Petr Rockai2012-09-264-13/+337
| | | | | | | - move common dm_config_tree manipulation functions from lvmetad-core to daemon-shared - add config-tree-based request manipulation APIs to daemon-client - factor out _v (va_list) variants of most variadic functions in libdaemon
* [lvmetad] Continue reading/writing on EINTRMarian Csontos2012-08-021-4/+4
|
* lvmetad: Skip redundant checks on no inputMarian Csontos2012-08-021-14/+13
|
* cleanup: replace memset with struct initilizationZdenek Kabelac2012-06-221-3/+2
| | | | | Simplifies the code, properly detects too long socket paths, drops unused parameter.
* Use dm_strncpy instead of plain strncpy while setting the socket path.Peter Rajnoha2012-04-271-1/+4
| | | | Also check the return value as it meaningless to work with truncated strings.
* strcpy -> strncpy in common daemon code.Peter Rajnoha2012-04-101-1/+1
|
* Few more close and dev_close traceZdenek Kabelac2012-03-011-1/+2
| | | | Adding (void) where we cannot really report an error.
* Use 64 bit integers whenever extracting numbers from daemon replies.Petr Rockai2012-03-011-2/+2
|
* Reflect new file locations, include file updates etc.Alasdair Kergon2012-02-284-5/+60
|