Commit 0869349d authored by Pekka Pessi's avatar Pekka Pessi

sip module: using isize_t, usize_t, issize_t in API.

darcs-hash:20060906215612-65a35-399384fbfee1fa84ac7bdb0f71b453ca4a318f3c.gz
parent e20e140f
This diff is collapsed.
......@@ -98,8 +98,8 @@ msg_hclass_t sip_request_disposition_class[] =
SIP_HEADER_CLASS(request_disposition, "Request-Disposition", "d", rd_items,
list, request_disposition);
int sip_request_disposition_d(su_home_t *home, sip_header_t *h,
char *s, int slen)
issize_t sip_request_disposition_d(su_home_t *home, sip_header_t *h,
char *s, isize_t slen)
{
sip_request_disposition_t *rd = h->sh_request_disposition;
......@@ -107,7 +107,7 @@ int sip_request_disposition_d(su_home_t *home, sip_header_t *h,
}
int sip_request_disposition_e(char b[], int bsiz, sip_header_t const *h, int flags)
issize_t sip_request_disposition_e(char b[], isize_t bsiz, sip_header_t const *h, int flags)
{
char *end = b + bsiz, *b0 = b;
sip_request_disposition_t const *o = h->sh_request_disposition;
......@@ -120,7 +120,7 @@ int sip_request_disposition_e(char b[], int bsiz, sip_header_t const *h, int fla
}
int sip_request_disposition_dup_xtra(sip_header_t const *h, int offset)
isize_t sip_request_disposition_dup_xtra(sip_header_t const *h, isize_t offset)
{
sip_request_disposition_t const *o = h->sh_request_disposition;
......@@ -133,7 +133,7 @@ int sip_request_disposition_dup_xtra(sip_header_t const *h, int offset)
/** Duplicate one sip_request_disposition_t object */
char *sip_request_disposition_dup_one(sip_header_t *dst,
sip_header_t const *src,
char *b, int xtra)
char *b, isize_t xtra)
{
char *end = b + xtra;
sip_request_disposition_t *o_dst = dst->sh_request_disposition;
......@@ -188,7 +188,7 @@ size_t span_attribute_value(char *s)
}
static
int sip_caller_prefs_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_caller_prefs_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_header_t **hh = &h->sh_succ, *h0 = h;
sip_caller_prefs_t *cp = h->sh_caller_prefs;
......@@ -248,7 +248,7 @@ int sip_caller_prefs_d(su_home_t *home, sip_header_t *h, char *s, int slen)
}
int sip_caller_prefs_e(char b[], int bsiz, sip_header_t const *h, int flags)
issize_t sip_caller_prefs_e(char b[], isize_t bsiz, sip_header_t const *h, int flags)
{
sip_caller_prefs_t const *cp = h->sh_caller_prefs;
char *b0 = b, *end = b + bsiz;
......@@ -261,19 +261,18 @@ int sip_caller_prefs_e(char b[], int bsiz, sip_header_t const *h, int flags)
}
int sip_caller_prefs_dup_xtra(sip_header_t const *h, int offset)
isize_t sip_caller_prefs_dup_xtra(sip_header_t const *h, isize_t offset)
{
int rv = offset;
sip_caller_prefs_t const *cp = h->sh_caller_prefs;
MSG_PARAMS_SIZE(rv, cp->cp_params);
MSG_PARAMS_SIZE(offset, cp->cp_params);
return rv;
return offset;
}
char *sip_caller_prefs_dup_one(sip_header_t *dst, sip_header_t const *src,
char *b, int xtra)
char *b, isize_t xtra)
{
char *end = b + xtra;
sip_caller_prefs_t *cp = dst->sh_caller_prefs;
......@@ -287,7 +286,7 @@ char *sip_caller_prefs_dup_one(sip_header_t *dst, sip_header_t const *src,
}
static int sip_caller_prefs_update(msg_common_t *h,
char const *name, int namelen,
char const *name, isize_t namelen,
char const *value)
{
sip_caller_prefs_t *cp = (sip_caller_prefs_t *)h;
......@@ -376,13 +375,13 @@ msg_hclass_t sip_accept_contact_class[] =
SIP_HEADER_CLASS(accept_contact, "Accept-Contact", "a", cp_params, append,
caller_prefs);
int sip_accept_contact_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_accept_contact_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_caller_prefs_d(home, h, s, slen);
}
int sip_accept_contact_e(char b[], int bsiz, sip_header_t const *h, int flags)
issize_t sip_accept_contact_e(char b[], isize_t bsiz, sip_header_t const *h, int flags)
{
return sip_caller_prefs_e(b, bsiz, h, flags);
}
......@@ -410,13 +409,13 @@ msg_hclass_t sip_reject_contact_class[] =
SIP_HEADER_CLASS(reject_contact, "Reject-Contact", "j", cp_params, append,
caller_prefs);
int sip_reject_contact_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_reject_contact_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_caller_prefs_d(home, h, s, slen);
}
int sip_reject_contact_e(char b[], int bsiz, sip_header_t const *h, int flags)
issize_t sip_reject_contact_e(char b[], isize_t bsiz, sip_header_t const *h, int flags)
{
return sip_caller_prefs_e(b, bsiz, h, flags);
}
......@@ -92,10 +92,10 @@ static msg_update_f sip_event_update;
msg_hclass_t sip_event_class[] =
SIP_HEADER_CLASS(event, "Event", "o", o_params, single, event);
int sip_event_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_event_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_event_t *o = h->sh_event;
int n;
size_t n;
n = span_token(s); if (n == 0) return -1;
o->o_type = s; s += n;
......@@ -108,7 +108,7 @@ int sip_event_d(su_home_t *home, sip_header_t *h, char *s, int slen)
return 0;
}
int sip_event_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_event_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
char *end = b + bsiz, *b0 = b;
sip_event_t const *o = h->sh_event;
......@@ -120,7 +120,7 @@ int sip_event_e(char b[], int bsiz, sip_header_t const *h, int f)
return b - b0;
}
int sip_event_dup_xtra(sip_header_t const *h, int offset)
isize_t sip_event_dup_xtra(sip_header_t const *h, isize_t offset)
{
sip_event_t const *o = h->sh_event;
......@@ -132,7 +132,7 @@ int sip_event_dup_xtra(sip_header_t const *h, int offset)
/** Duplicate one sip_event_t object */
char *sip_event_dup_one(sip_header_t *dst, sip_header_t const *src,
char *b, int xtra)
char *b, isize_t xtra)
{
sip_event_t *o_dst = dst->sh_event;
sip_event_t const *o_src = src->sh_event;
......@@ -147,7 +147,7 @@ char *sip_event_dup_one(sip_header_t *dst, sip_header_t const *src,
/** Update parameters in Event header. */
static int sip_event_update(msg_common_t *h,
char const *name, int namelen,
char const *name, isize_t namelen,
char const *value)
{
sip_event_t *o = (sip_event_t *)h;
......@@ -196,12 +196,12 @@ static int sip_event_update(msg_common_t *h,
msg_hclass_t sip_allow_events_class[] =
SIP_HEADER_CLASS_LIST(allow_events, "Allow-Events", "u", list);
int sip_allow_events_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_allow_events_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return msg_list_d(home, h, s, slen);
}
int sip_allow_events_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_allow_events_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_allow_events(h));
return msg_list_e(b, bsiz, h, f);
......@@ -283,8 +283,8 @@ SIP_HEADER_CLASS(subscription_state, "Subscription-State", "",
ss_params, single,
subscription_state);
int sip_subscription_state_d(su_home_t *home, sip_header_t *h,
char *s, int slen)
issize_t sip_subscription_state_d(su_home_t *home, sip_header_t *h,
char *s, isize_t slen)
{
sip_subscription_state_t *ss = h->sh_subscription_state;
ss->ss_substate = s;
......@@ -307,7 +307,7 @@ int sip_subscription_state_d(su_home_t *home, sip_header_t *h,
return 0;
}
int sip_subscription_state_e(char b[], int bsiz, sip_header_t const *h, int flags)
issize_t sip_subscription_state_e(char b[], isize_t bsiz, sip_header_t const *h, int flags)
{
char *end = b + bsiz, *b0 = b;
sip_subscription_state_t const *ss = h->sh_subscription_state;
......@@ -320,7 +320,7 @@ int sip_subscription_state_e(char b[], int bsiz, sip_header_t const *h, int flag
return b - b0;
}
int sip_subscription_state_dup_xtra(sip_header_t const *h, int offset)
isize_t sip_subscription_state_dup_xtra(sip_header_t const *h, isize_t offset)
{
sip_subscription_state_t const *ss = h->sh_subscription_state;
......@@ -333,7 +333,7 @@ int sip_subscription_state_dup_xtra(sip_header_t const *h, int offset)
/** Duplicate one sip_subscription_state_t object */
char *sip_subscription_state_dup_one(sip_header_t *dst, sip_header_t const *src,
char *b, int xtra)
char *b, isize_t xtra)
{
sip_subscription_state_t *ss_dst = dst->sh_subscription_state;
sip_subscription_state_t const *ss_src = src->sh_subscription_state;
......@@ -347,7 +347,7 @@ char *sip_subscription_state_dup_one(sip_header_t *dst, sip_header_t const *src,
}
static int sip_subscription_state_update(msg_common_t *h,
char const *name, int namelen,
char const *name, isize_t namelen,
char const *value)
{
sip_subscription_state_t *ss = (sip_subscription_state_t *)h;
......@@ -419,10 +419,10 @@ SIP_HEADER_CLASS(publication, "Publication", "", pub_params, single,
static inline void sip_publication_update(sip_publication_t *pub);
int sip_publication_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_publication_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_publication_t *pub = h->sh_publication;
int n;
size_t n;
n = span_token(s); if (n == 0) return -1;
pub->pub_package = s; s += n;
......@@ -435,7 +435,7 @@ int sip_publication_d(su_home_t *home, sip_header_t *h, char *s, int slen)
return 0;
}
int sip_publication_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_publication_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
char *end = b + bsiz, *b0 = b;
sip_publication_t const *pub = h->sh_publication;
......@@ -447,7 +447,7 @@ int sip_publication_e(char b[], int bsiz, sip_header_t const *h, int f)
return b - b0;
}
int sip_publication_dup_xtra(sip_header_t const *h, int offset)
isize_t sip_publication_dup_xtra(sip_header_t const *h, isize_t offset)
{
sip_publication_t const *pub = h->sh_publication;
......@@ -459,7 +459,7 @@ int sip_publication_dup_xtra(sip_header_t const *h, int offset)
/** Duplicate one sip_publication_t object */
char *sip_publication_dup_one(sip_header_t *dst, sip_header_t const *src,
char *b, int xtra)
char *b, isize_t xtra)
{
sip_publication_t *pub_dst = dst->sh_publication;
sip_publication_t const *pub_src = src->sh_publication;
......@@ -476,7 +476,7 @@ char *sip_publication_dup_one(sip_header_t *dst, sip_header_t const *src,
static inline void sip_publication_update(sip_publication_t *pub)
{
int i;
size_t i;
if (pub->pub_params)
for (i = 0; pub->pub_params[i]; i++) {
......@@ -505,12 +505,12 @@ static inline void sip_publication_update(sip_publication_t *pub)
msg_hclass_t sip_allow_publications_class[] =
SIP_HEADER_CLASS_LIST(allow_publications, "Allow-Publications", "", list);
int sip_allow_publications_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_allow_publications_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return msg_list_d(home, h, s, slen);
}
int sip_allow_publications_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_allow_publications_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_allow_publications(h));
return msg_list_e(b, bsiz, h, f);
......
......@@ -50,13 +50,13 @@
/* ====================================================================== */
static int sip_info_d(su_home_t *home, sip_header_t *h, char *s, int slen);
static issize_t sip_info_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen);
static int sip_info_dup_xtra(sip_header_t const *h, int offset);
static isize_t sip_info_dup_xtra(sip_header_t const *h, isize_t offset);
static char *sip_info_dup_one(sip_header_t *dst,
sip_header_t const *src,
char *b,
int xtra);
isize_t xtra);
#define sip_info_update NULL
......@@ -103,9 +103,9 @@ msg_hclass_t sip_call_info_class[] =
SIP_HEADER_CLASS(call_info, "Call-Info", "",
ci_params, append, call_info);
int sip_call_info_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_call_info_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
int retval = sip_info_d(home, h, s, slen);
issize_t retval = sip_info_d(home, h, s, slen);
if (retval == 0)
for (;h; h = h->sh_next)
......@@ -114,7 +114,7 @@ int sip_call_info_d(su_home_t *home, sip_header_t *h, char *s, int slen)
return retval;
}
int sip_call_info_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_call_info_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
sip_call_info_t *ci = (sip_call_info_t *)h;
......@@ -129,7 +129,7 @@ int sip_call_info_e(char b[], int bsiz, sip_header_t const *h, int f)
*/
static
int sip_call_info_update(msg_common_t *h,
char const *name, int namelen,
char const *name, isize_t namelen,
char const *value)
{
sip_call_info_t *ci = (sip_call_info_t *)h;
......@@ -181,12 +181,12 @@ msg_hclass_t sip_error_info_class[] =
SIP_HEADER_CLASS(error_info, "Error-Info", "",
ei_params, append, info);
int sip_error_info_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_error_info_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_info_d(home, h, s, slen);
}
int sip_error_info_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_error_info_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
sip_error_info_t const *ei = h->sh_error_info;
......@@ -213,12 +213,12 @@ int sip_error_info_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_in_reply_to_class[] =
SIP_HEADER_CLASS_LIST(in_reply_to, "In-Reply-To", "", list);
int sip_in_reply_to_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_in_reply_to_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return msg_list_d(home, h, s, slen);
}
int sip_in_reply_to_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_in_reply_to_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_in_reply_to_p(h));
return msg_list_e(b, bsiz, h, f);
......@@ -242,12 +242,12 @@ int sip_in_reply_to_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_organization_class[] =
SIP_HEADER_CLASS_G(organization, "Organization", "", single);
int sip_organization_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_organization_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_generic_d(home, h, s, slen);
}
int sip_organization_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_organization_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_organization_p(h));
return sip_generic_e(b, bsiz, h, f);
......@@ -272,12 +272,12 @@ int sip_organization_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_priority_class[] =
SIP_HEADER_CLASS_G(priority, "Priority", "", single);
int sip_priority_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_priority_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_generic_d(home, h, s, slen);
}
int sip_priority_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_priority_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_priority_p(h));
return sip_generic_e(b, bsiz, h, f);
......@@ -302,12 +302,12 @@ int sip_priority_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_server_class[] =
SIP_HEADER_CLASS_G(server, "Server", "", single);
int sip_server_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_server_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_generic_d(home, h, s, slen);
}
int sip_server_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_server_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_server_p(h));
return sip_generic_e(b, bsiz, h, f);
......@@ -329,12 +329,12 @@ int sip_server_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_subject_class[] =
SIP_HEADER_CLASS_G(subject, "Subject", "s", single);
int sip_subject_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_subject_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_generic_d(home, h, s, slen);
}
int sip_subject_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_subject_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_subject_p(h));
return sip_generic_e(b, bsiz, h, f);
......@@ -356,18 +356,18 @@ int sip_subject_e(char b[], int bsiz, sip_header_t const *h, int f)
*
*/
static int sip_timestamp_dup_xtra(sip_header_t const *h, int offset);
static isize_t sip_timestamp_dup_xtra(sip_header_t const *h, isize_t offset);
static char *sip_timestamp_dup_one(sip_header_t *dst,
sip_header_t const *src,
char *b,
int xtra);
sip_header_t const *src,
char *b,
isize_t xtra);
#define sip_timestamp_update NULL
msg_hclass_t sip_timestamp_class[] =
SIP_HEADER_CLASS(timestamp, "Timestamp", "", ts_common, single,
timestamp);
int sip_timestamp_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_timestamp_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_timestamp_t *ts = (sip_timestamp_t*)h;
......@@ -392,7 +392,7 @@ int sip_timestamp_d(su_home_t *home, sip_header_t *h, char *s, int slen)
return 0;
}
int sip_timestamp_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_timestamp_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
sip_timestamp_t const *ts = h->sh_timestamp;
char *end = b + bsiz, *b0 = b;
......@@ -410,21 +410,22 @@ int sip_timestamp_e(char b[], int bsiz, sip_header_t const *h, int f)
return b - b0;
}
int sip_timestamp_dup_xtra(sip_header_t const *h, int offset)
static
isize_t sip_timestamp_dup_xtra(sip_header_t const *h, isize_t offset)
{
int rv = offset;
sip_timestamp_t const *ts = h->sh_timestamp;
rv += MSG_STRING_SIZE(ts->ts_stamp);
rv += MSG_STRING_SIZE(ts->ts_delay);
offset += MSG_STRING_SIZE(ts->ts_stamp);
offset += MSG_STRING_SIZE(ts->ts_delay);
return rv;
return offset;
}
static
char *sip_timestamp_dup_one(sip_header_t *dst,
sip_header_t const *src,
char *b,
int xtra)
isize_t xtra)
{
sip_timestamp_t *ts = dst->sh_timestamp;
sip_timestamp_t const *o = src->sh_timestamp;
......@@ -458,12 +459,12 @@ char *sip_timestamp_dup_one(sip_header_t *dst,
msg_hclass_t sip_user_agent_class[] =
SIP_HEADER_CLASS_G(user_agent, "User-Agent", "", single);
int sip_user_agent_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_user_agent_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_generic_d(home, h, s, slen);
}
int sip_user_agent_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_user_agent_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_user_agent_p(h));
return sip_generic_e(b, bsiz, h, f);
......@@ -485,14 +486,14 @@ int sip_user_agent_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_etag_class[] =
SIP_HEADER_CLASS_G(etag, "SIP-ETag", "", single);
int sip_etag_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_etag_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_etag_t *etag = (sip_etag_t *)h;
return msg_token_d(&s, &etag->g_value);
}
int sip_etag_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_etag_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
return msg_generic_e(b, bsiz, h, f);
}
......@@ -514,19 +515,19 @@ int sip_etag_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_if_match_class[] =
SIP_HEADER_CLASS_G(if_match, "SIP-If-Match", "", single);
int sip_if_match_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_if_match_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_etag_d(home, h, s, slen);
}
int sip_if_match_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_if_match_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
return sip_etag_e(b, bsiz, h, f);
}
/* ====================================================================== */
int sip_info_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_info_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_call_info_t *ci = h->sh_call_info;
char *end = s + slen;
......@@ -558,21 +559,20 @@ int sip_info_d(su_home_t *home, sip_header_t *h, char *s, int slen)
return sip_info_d(home, h, s, end - s);
}
int sip_info_dup_xtra(sip_header_t const *h, int offset)
isize_t sip_info_dup_xtra(sip_header_t const *h, isize_t offset)
{
int rv = offset;
sip_call_info_t const *ci = h->sh_call_info;
MSG_PARAMS_SIZE(rv, ci->ci_params);
rv += url_xtra(ci->ci_url);
MSG_PARAMS_SIZE(offset, ci->ci_params);
offset += url_xtra(ci->ci_url);
return rv;
return offset;
}
char *sip_info_dup_one(sip_header_t *dst,
sip_header_t const *src,
char *b,
int xtra)
isize_t xtra)
{
sip_call_info_t *ci = dst->sh_call_info;
sip_call_info_t const *o = src->sh_call_info;
......
......@@ -77,13 +77,13 @@
msg_hclass_t sip_allow_class[] =
SIP_HEADER_CLASS_LIST(allow, "Allow", "", list);
int sip_allow_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_allow_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_allow_t *k = (sip_allow_t *)h;
return msg_commalist_d(home, &s, &k->k_items, msg_token_scan);
}
int sip_allow_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_allow_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_allow(h));
return msg_list_e(b, bsiz, h, f);
......@@ -123,13 +123,13 @@ int sip_allow_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_proxy_require_class[] =
SIP_HEADER_CLASS_LIST(proxy_require, "Proxy-Require", "", list);
int sip_proxy_require_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_proxy_require_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_proxy_require_t *k = (sip_proxy_require_t *)h;
return msg_commalist_d(home, &s, &k->k_items, msg_token_scan);
}
int sip_proxy_require_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_proxy_require_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_proxy_require(h));
return msg_list_e(b, bsiz, h, f);
......@@ -170,13 +170,13 @@ int sip_proxy_require_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_require_class[] =
SIP_HEADER_CLASS_LIST(require, "Require", "", list);
int sip_require_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_require_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_require_t *k = (sip_require_t *)h;
return msg_commalist_d(home, &s, &k->k_items, msg_token_scan);
}
int sip_require_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_require_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_require(h));
return msg_list_e(b, bsiz, h, f);
......@@ -217,13 +217,13 @@ int sip_require_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_supported_class[] =
SIP_HEADER_CLASS_LIST(supported, "Supported", "k", list);
int sip_supported_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_supported_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_supported_t *k = (sip_supported_t *)h;
return msg_commalist_d(home, &s, &k->k_items, msg_token_scan);
}
int sip_supported_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_supported_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_supported(h));
return msg_list_e(b, bsiz, h, f);
......@@ -262,13 +262,13 @@ int sip_supported_e(char b[], int bsiz, sip_header_t const *h, int f)
msg_hclass_t sip_unsupported_class[] =
SIP_HEADER_CLASS_LIST(unsupported, "Unsupported", "", list);
int sip_unsupported_d(su_home_t *home, sip_header_t *h, char *s, int slen)
issize_t sip_unsupported_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
sip_unsupported_t *k = (sip_unsupported_t *)h;
return msg_commalist_d(home, &s, &k->k_items, msg_token_scan);
}
int sip_unsupported_e(char b[], int bsiz, sip_header_t const *h, int f)
issize_t sip_unsupported_e(char b[], isize_t bsiz, sip_header_t const *h, int f)
{
assert(sip_is_unsupported(h));
return msg_list_e(b, bsiz, h, f);
......@@ -338,7 +338,7 @@ sip_has_unsupported_any(su_home_t *home,
sip_require_t const *require2,
sip_require_t const *require3)
{
int i, j;
size_t i, j;
sip_unsupported_t *unsupported = NULL;
msg_param_t const empty[1] = { NULL };
msg_param_t const *slist = empty;
......@@ -407,7 +407,7 @@ sip_has_unsupported_any(su_home_t *home,
int sip_has_feature(msg_list_t const *supported, char const *feature)
{
int i;
size_t i;
if (!feature || !feature[0])
return 1; /* Empty feature is always supported */
......@@ -463,15 +463,12 @@ int sip_has_supported(sip_supported_t const *supported, char const *feature)
msg_hclass_t sip_path_class[] =
SIP_HEADER_CLASS(path, "Path", "", r_params, prepend, any_route);
int sip_path_d(su_home_t *home,
sip_header_t *h,
char *s,
int slen)
issize_t sip_path_d(su_home_t *home, sip_header_t *h, char *s, isize_t slen)
{
return sip_any_route_d(home, h, s, slen);
}
int sip_path_e(char b[], int bsiz, sip_header_t const *h, int flags)
issize_t sip_path_e(char b[], isize_t bsiz, sip_header_t const *h, int flags)
{
assert(sip_is_path(h));
return sip_any_route_e(b, bsiz, h, flags);
......@@ -519,15 +516,12 @@ msg_hclass_t sip_service_route_class[] =
SIP_HEADER_CLASS(service_route, "Service-Route", "",
r_params, append, any_route);
int sip_service_route_d(su_home_t *home,
sip_header_t *h,
char *s,