diff options
| -rw-r--r-- | src/proplist.c | 4 | ||||
| -rw-r--r-- | src/pulse.c | 3 | 
2 files changed, 4 insertions, 3 deletions
| diff --git a/src/proplist.c b/src/proplist.c index a835779..5a6db25 100644 --- a/src/proplist.c +++ b/src/proplist.c @@ -94,9 +94,9 @@ static int _unset(ca_proplist *p, const char *key) {  int ca_proplist_sets(ca_proplist *p, const char *key, const char *value) {      ca_return_val_if_fail(p, CA_ERROR_INVALID);      ca_return_val_if_fail(key, CA_ERROR_INVALID); -    ca_return_val_if_fail(!value, CA_ERROR_INVALID); +    ca_return_val_if_fail(value, CA_ERROR_INVALID); -    return ca_proplist_set(p, key, value, sizeof(value)+1); +    return ca_proplist_set(p, key, value, strlen(value)+1);  }  int ca_proplist_setf(ca_proplist *p, const char *key, const char *format, ...) { diff --git a/src/pulse.c b/src/pulse.c index fcf8148..b576058 100644 --- a/src/pulse.c +++ b/src/pulse.c @@ -270,7 +270,6 @@ int driver_open(ca_context *c) {          return ret;      } -      if (!(p->context = pa_context_new_with_proplist(pa_threaded_mainloop_get_api(p->mainloop), "libcanberra", l))) {          pa_proplist_free(l);          driver_destroy(c); @@ -346,6 +345,8 @@ int driver_destroy(ca_context *c) {      ca_free(p); +    c->private = NULL; +      return CA_SUCCESS;  } | 
