Commit 19ebe987 authored by Pekka Pessi's avatar Pekka Pessi

API calls with invali arguments do not fail assert() anymore.

darcs-hash:20051007073835-65a35-16239b51d1a6a5d799353e0944714f79a253b494.gz
parent c59f7910
......@@ -193,7 +193,8 @@ nua_t *nua_create(su_root_t *root,
enter;
assert(callback);
if (callback == NULL)
return (void)(errno = EFAULT), NULL;
if ((nua = su_home_new(sizeof(*nua)))) {
ta_list ta;
......@@ -670,12 +671,14 @@ void nua_get_params(nua_t *nua, tag_type_t tag, tag_value_t value, ...)
#define NUA_SIGNAL(nh, event, tag, value) \
enter; \
assert(nh); assert(NH_IS_VALID((nh))); \
if (NH_IS_VALID((nh))) { \
ta_list ta; \
ta_start(ta, tag, value); \
nua_signal((nh)->nh_nua, nh, NULL, 0, event, 0, NULL, ta_tags(ta)); \
ta_end(ta); \
} \
else { \
su_log("nua: " #event " with invalid handle %p\n", nh); \
}
......@@ -1263,7 +1266,6 @@ void nua_respond(nua_handle_t *nh,
{
enter;
assert(NH_IS_VALID(nh));
if (NH_IS_VALID(nh)) {
ta_list ta;
ta_start(ta, tag, value);
......@@ -1271,6 +1273,9 @@ void nua_respond(nua_handle_t *nh,
status, phrase, ta_tags(ta));
ta_end(ta);
}
else {
su_log("nua: respond with invalid handle %p\n", nh);
}
}
/** Destroy a handle
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment