Commit 632024ac authored by Pekka Pessi's avatar Pekka Pessi

soa module: using isize_t/usize_t/issize_t in API.

darcs-hash:20060906220424-65a35-de886a4101b313981b8748b8f63638287c484dc2.gz
parent 087b7092
......@@ -712,7 +712,7 @@ int soa_get_warning(soa_session_t *ss, char const **return_text)
int soa_get_capability_sdp(soa_session_t const *ss,
sdp_session_t const **return_sdp,
char const **return_sdp_str,
int *return_len)
isize_t *return_len)
{
sdp_session_t const *sdp;
char const *sdp_str;
......@@ -742,11 +742,10 @@ int soa_get_capability_sdp(soa_session_t const *ss,
int soa_set_capability_sdp(soa_session_t *ss,
sdp_session_t const *sdp,
char const *str, int len)
char const *str, issize_t len)
{
SU_DEBUG_9(("soa_set_capability_sdp(%s::%p, %p, %p, %d) called\n",
ss ? ss->ss_actions->soa_name : "", ss, sdp, str,
str && len == -1 ? (int)strlen(str) : len));
SU_DEBUG_9(("soa_set_capability_sdp(%s::%p, %p, %p, %zd) called\n",
ss ? ss->ss_actions->soa_name : "", ss, sdp, str, (ssize_t)len));
return soa_set_sdp(ss, soa_capability_sdp_kind, sdp, str, len);
}
......@@ -754,7 +753,7 @@ int soa_set_capability_sdp(soa_session_t *ss,
/** Set capabilities */
int
soa_base_set_capability_sdp(soa_session_t *ss,
sdp_session_t *sdp, char const *str0, int len0)
sdp_session_t *sdp, char const *str0, isize_t len0)
{
sdp_origin_t o[1] = {{ sizeof(o) }};
sdp_connection_t *c, c0[1] = {{ sizeof(c0) }};
......@@ -803,7 +802,7 @@ soa_base_set_capability_sdp(soa_session_t *ss,
int soa_get_user_sdp(soa_session_t const *ss,
sdp_session_t const **return_sdp,
char const **return_sdp_str,
int *return_len)
isize_t *return_len)
{
sdp_session_t const *sdp;
char const *sdp_str;
......@@ -843,17 +842,17 @@ int soa_get_user_version(soa_session_t const *ss)
int soa_set_user_sdp(soa_session_t *ss,
sdp_session_t const *sdp,
char const *str, int len)
char const *str, issize_t len)
{
SU_DEBUG_9(("soa_set_user_sdp(%s::%p, %p, %p, %d) called\n",
ss ? ss->ss_actions->soa_name : "", ss, sdp, str,
str && len == -1 ? (int)strlen(str) : len));
SU_DEBUG_9(("soa_set_user_sdp(%s::%p, %p, %p, %zd) called\n",
ss ? ss->ss_actions->soa_name : "", ss, sdp, str, (ssize_t)len));
return soa_set_sdp(ss, soa_user_sdp_kind, sdp, str, len);
}
/** Set user SDP (base version). */
int soa_base_set_user_sdp(soa_session_t *ss,
sdp_session_t *sdp, char const *str0, int len0)
sdp_session_t *sdp, char const *str0, isize_t len0)
{
++ss->ss_user_version;
return soa_description_set(ss, ss->ss_user, sdp, str0, len0);
......@@ -868,7 +867,7 @@ int soa_base_set_user_sdp(soa_session_t *ss,
int soa_get_remote_sdp(soa_session_t const *ss,
sdp_session_t const **return_sdp,
char const **return_sdp_str,
int *return_len)
isize_t *return_len)
{
sdp_session_t const *sdp;
char const *sdp_str;
......@@ -909,18 +908,18 @@ int soa_get_remote_version(soa_session_t const *ss)
/** Set remote SDP (offer or answer) */
int soa_set_remote_sdp(soa_session_t *ss,
sdp_session_t const *sdp,
char const *str, int len)
char const *str, issize_t len)
{
SU_DEBUG_9(("soa_set_remote_sdp(%s::%p, %p, %p, %d) called\n",
ss ? ss->ss_actions->soa_name : "", ss, sdp, str,
str && len == -1 ? (int)strlen(str) : len));
SU_DEBUG_9(("soa_set_remote_sdp(%s::%p, %p, %p, %zd) called\n",
ss ? ss->ss_actions->soa_name : "", ss, sdp, str, (ssize_t)len));
return soa_set_sdp(ss, soa_remote_sdp_kind, sdp, str, len);
}
/** Set remote SDP (base version). */
int soa_base_set_remote_sdp(soa_session_t *ss,
int new_version,
sdp_session_t *sdp, char const *str0, int len0)
sdp_session_t *sdp, char const *str0, isize_t len0)
{
/* This is cleared in soa_generate_answer() or soa_process_answer(). */
ss->ss_unprocessed_remote = 1;
......@@ -955,7 +954,7 @@ int soa_clear_remote_sdp(soa_session_t *ss)
int soa_get_local_sdp(soa_session_t const *ss,
sdp_session_t const **return_sdp,
char const **return_sdp_str,
int *return_len)
isize_t *return_len)
{
sdp_session_t const *sdp;
char const *sdp_str;
......@@ -1609,7 +1608,7 @@ int soa_description_set(soa_session_t *ss,
struct soa_description *ssd,
sdp_session_t *sdp,
char const *sdp_str,
int str_len)
isize_t str_len)
{
int retval = -1;
......@@ -1731,7 +1730,7 @@ static
su_localinfo_t *li_in_list(su_localinfo_t *li0, char const **llist)
{
char const *list = *llist;
int n;
size_t n;
if (!list)
return NULL;
......
......@@ -92,14 +92,14 @@ static tagi_t *soa_static_get_paramlist(soa_session_t const *ss,
...);
static int soa_static_set_capability_sdp(soa_session_t *ss,
sdp_session_t *sdp,
char const *, int);
char const *, isize_t);
static int soa_static_set_remote_sdp(soa_session_t *ss,
int new_version,
sdp_session_t *sdp,
char const *, int);
char const *, isize_t);
static int soa_static_set_user_sdp(soa_session_t *ss,
sdp_session_t *sdp,
char const *, int);
char const *, isize_t);
static int soa_static_generate_offer(soa_session_t *ss, soa_callback_f *);
static int soa_static_generate_answer(soa_session_t *ss, soa_callback_f *);
static int soa_static_process_answer(soa_session_t *ss, soa_callback_f *);
......@@ -219,7 +219,7 @@ static tagi_t *soa_static_get_paramlist(soa_session_t const *ss,
static int soa_static_set_capability_sdp(soa_session_t *ss,
sdp_session_t *sdp,
char const *sdp_str,
int sdp_len)
isize_t sdp_len)
{
return soa_base_set_capability_sdp(ss, sdp, sdp_str, sdp_len);
}
......@@ -229,7 +229,7 @@ static int soa_static_set_remote_sdp(soa_session_t *ss,
int new_version,
sdp_session_t *sdp,
char const *sdp_str,
int sdp_len)
isize_t sdp_len)
{
return soa_base_set_remote_sdp(ss, new_version, sdp, sdp_str, sdp_len);
}
......@@ -238,7 +238,7 @@ static int soa_static_set_remote_sdp(soa_session_t *ss,
static int soa_static_set_user_sdp(soa_session_t *ss,
sdp_session_t *sdp,
char const *sdp_str,
int sdp_len)
isize_t sdp_len)
{
return soa_base_set_user_sdp(ss, sdp, sdp_str, sdp_len);
}
......
......@@ -76,21 +76,21 @@ SOFIAPUBFUN int soa_get_warning(soa_session_t *ss, char const **return_phrase);
SOFIAPUBFUN int soa_set_capability_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, int len);
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_capability_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
int *return_len);
isize_t *return_len);
SOFIAPUBFUN int soa_set_remote_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, int len);
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_remote_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
int *return_len);
isize_t *return_len);
SOFIAPUBFUN int soa_clear_remote_sdp(soa_session_t *ss);
......@@ -98,19 +98,19 @@ SOFIAPUBFUN int soa_get_remote_version(soa_session_t const *ss);
SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, int len);
char const *str, issize_t len);
SOFIAPUBFUN int soa_get_user_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
int *return_len);
isize_t *return_len);
SOFIAPUBFUN int soa_get_user_version(soa_session_t const *ss);
SOFIAPUBFUN int soa_get_local_sdp(soa_session_t const *ss,
struct sdp_session_s const **return_sdp,
char const **return_sdp_str,
int *return_len);
isize_t *return_len);
SOFIAPUBFUN char const * const * soa_sip_require(soa_session_t const *ss);
SOFIAPUBFUN char const * const * soa_sip_supported(soa_session_t const *ss);
......
......@@ -66,11 +66,11 @@ struct soa_session_actions
char const * const * support,
char const * const * required);
int (*soa_set_capability_sdp)(soa_session_t *, sdp_session_t *,
char const *, int);
char const *, isize_t);
int (*soa_set_remote_sdp)(soa_session_t *, int new_version,
sdp_session_t *, char const *, int);
sdp_session_t *, char const *, isize_t);
int (*soa_set_user_sdp)(soa_session_t *, sdp_session_t *,
char const *, int);
char const *, isize_t);
int (*soa_generate_offer)(soa_session_t *ss, soa_callback_f *completed);
int (*soa_generate_answer)(soa_session_t *ss, soa_callback_f *completed);
int (*soa_process_answer)(soa_session_t *ss, soa_callback_f *completed);
......@@ -100,12 +100,12 @@ SOFIAPUBFUN int soa_base_remote_sip_features(soa_session_t *ss,
char const * const *required);
SOFIAPUBFUN int soa_base_set_capability_sdp(soa_session_t *ss,
sdp_session_t *sdp,
char const *, int);
char const *, isize_t);
SOFIAPUBFUN int soa_base_set_remote_sdp(soa_session_t *ss,
int new_version,
sdp_session_t *sdp, char const *, int);
sdp_session_t *sdp, char const *, isize_t);
SOFIAPUBFUN int soa_base_set_user_sdp(soa_session_t *ss,
sdp_session_t *sdp, char const *, int);
sdp_session_t *sdp, char const *, isize_t);
SOFIAPUBFUN int soa_base_generate_offer(soa_session_t *ss,
soa_callback_f *completed);
......@@ -237,15 +237,11 @@ SOFIAPUBFUN int soa_set_status(soa_session_t *ss,
SOFIAPUBFUN void soa_set_activity(soa_session_t *ss,
sdp_media_t const *m, int remote);
SOFIAPUBFUN int soa_set_user_sdp(soa_session_t *ss,
struct sdp_session_s const *sdp,
char const *str, int len);
SOFIAPUBFUN int soa_description_set(soa_session_t *ss,
struct soa_description *ssd,
sdp_session_t *sdp,
char const *sdp_str,
int sdp_len);
isize_t sdp_len);
SOFIAPUBFUN void soa_description_free(soa_session_t *,
struct soa_description *ssd);
......
......@@ -325,7 +325,7 @@ int test_static_offer_answer(struct context *ctx)
soa_session_t *a, *b;
char const *caps = NONE, *offer = NONE, *answer = NONE;
int capslen = -1, offerlen = -1, answerlen = -1;
isize_t capslen = -1, offerlen = -1, answerlen = -1;
su_home_t home[1] = { SU_HOME_INIT(home) };
......@@ -583,7 +583,7 @@ int test_codec_selection(struct context *ctx)
soa_session_t *a, *b;
char const *offer = NONE, *answer = NONE;
int offerlen = -1, answerlen = -1;
isize_t offerlen = -1, answerlen = -1;
sdp_session_t const *a_sdp, *b_sdp;
sdp_media_t const *m;
......@@ -1117,7 +1117,7 @@ int test_asynch_offer_answer(struct context *ctx)
int n;
char const *caps = NONE, *offer = NONE, *answer = NONE;
int capslen = -1, offerlen = -1, answerlen = -1;
isize_t capslen = -1, offerlen = -1, answerlen = -1;
char const a[] =
"v=0\r\n"
......
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