- removed the "sip compatibility" stuff. It seems to have been
a intermediate version of libosip with a "funny" API. New versions have no API changes on existing functions.
This commit is contained in:
@@ -28,7 +28,7 @@ sbin_PROGRAMS = siproxd
|
||||
siproxd_SOURCES = siproxd.c proxy.c register.c sock.c utils.c \
|
||||
sip_utils.c log.c readconf.c rtpproxy.c \
|
||||
rtpproxy_relay.c accessctl.c route_processing.c \
|
||||
security.c auth.c fwapi.c comp_osip.c
|
||||
security.c auth.c fwapi.c
|
||||
|
||||
#
|
||||
# an example for a custom firewall control module
|
||||
|
||||
12
src/proxy.c
12
src/proxy.c
@@ -528,7 +528,7 @@ int proxy_request (sip_ticket_t *ticket) {
|
||||
* RFC 3261, Section 16.6 step 10
|
||||
* Proxy Behavior - Forward the new request
|
||||
*/
|
||||
sts = comp_osip_message_to_str(request, &buffer);
|
||||
sts = osip_message_to_str(request, &buffer);
|
||||
if (sts != 0) {
|
||||
ERROR("proxy_request: osip_message_to_str failed");
|
||||
return STS_FAILURE;
|
||||
@@ -932,7 +932,7 @@ int proxy_response (sip_ticket_t *ticket) {
|
||||
}
|
||||
}
|
||||
|
||||
sts = comp_osip_message_to_str(response, &buffer);
|
||||
sts = osip_message_to_str(response, &buffer);
|
||||
if (sts != 0) {
|
||||
ERROR("proxy_response: osip_message_to_str failed");
|
||||
return STS_FAILURE;
|
||||
@@ -988,7 +988,7 @@ int proxy_rewrite_invitation_body(osip_message_t *mymsg, int direction){
|
||||
}
|
||||
}
|
||||
|
||||
sts = comp_osip_body_to_str(body, &bodybuff);
|
||||
sts = osip_body_to_str(body, &bodybuff);
|
||||
sts = sdp_message_init(&sdp);
|
||||
sts = sdp_message_parse (sdp, bodybuff);
|
||||
osip_free(bodybuff);
|
||||
@@ -1003,7 +1003,7 @@ if (configuration.debuglevel)
|
||||
{ /* just dump the buffer */
|
||||
char *tmp, *tmp2;
|
||||
sts = osip_message_get_body(mymsg, 0, &body);
|
||||
sts = comp_osip_body_to_str(body, &tmp);
|
||||
sts = osip_body_to_str(body, &tmp);
|
||||
osip_content_length_to_str(mymsg->content_length, &tmp2);
|
||||
DEBUG("Body before rewrite (clen=%s, strlen=%i):\n%s\n----",
|
||||
tmp2, strlen(tmp), tmp);
|
||||
@@ -1226,7 +1226,7 @@ if (configuration.debuglevel)
|
||||
sdp_message_free(sdp);
|
||||
|
||||
/* include new body */
|
||||
comp_osip_message_set_body(mymsg, bodybuff);
|
||||
osip_message_set_body(mymsg, bodybuff);
|
||||
|
||||
/* free content length resource and include new one*/
|
||||
osip_content_length_free(mymsg->content_length);
|
||||
@@ -1241,7 +1241,7 @@ if (configuration.debuglevel)
|
||||
{ /* just dump the buffer */
|
||||
char *tmp, *tmp2;
|
||||
sts = osip_message_get_body(mymsg, 0, &body);
|
||||
sts = comp_osip_body_to_str(body, &tmp);
|
||||
sts = osip_body_to_str(body, &tmp);
|
||||
osip_content_length_to_str(mymsg->content_length, &tmp2);
|
||||
DEBUG("Body after rewrite (clen=%s, strlen=%i):\n%s\n----",
|
||||
tmp2, strlen(tmp), tmp);
|
||||
|
||||
@@ -550,7 +550,7 @@ int register_response(sip_ticket_t *ticket, int flag) {
|
||||
}
|
||||
}
|
||||
|
||||
sts = comp_osip_message_to_str(response, &buffer);
|
||||
sts = osip_message_to_str(response, &buffer);
|
||||
if (sts != 0) {
|
||||
ERROR("register_response: msg_2char failed");
|
||||
return STS_FAILURE;
|
||||
|
||||
@@ -563,7 +563,7 @@ int sip_gen_response(sip_ticket_t *ticket, int code) {
|
||||
}
|
||||
}
|
||||
|
||||
sts = comp_osip_message_to_str(response, &buffer);
|
||||
sts = osip_message_to_str(response, &buffer);
|
||||
if (sts != 0) {
|
||||
ERROR("sip_gen_response: msg_2char failed");
|
||||
return STS_FAILURE;
|
||||
|
||||
@@ -308,7 +308,7 @@ int main (int argc, char *argv[])
|
||||
* Proxy Behavior - Request Validation - Reasonable Syntax
|
||||
* (parse the received message)
|
||||
*/
|
||||
sts=comp_osip_message_parse(ticket.sipmsg, buff);
|
||||
sts=osip_message_parse(ticket.sipmsg, buff);
|
||||
if (sts != 0) {
|
||||
ERROR("osip_message_parse() failed... this is not good");
|
||||
DUMP_BUFFER(-1, buff, i);
|
||||
|
||||
@@ -195,12 +195,6 @@ int fwapi_stop_rtp(int rtp_direction,
|
||||
struct in_addr local_ipaddr, int local_port,
|
||||
struct in_addr remote_ipaddr, int remote_port);
|
||||
|
||||
/* osip_comp.c */
|
||||
int comp_osip_message_to_str (osip_message_t *sip, char **dest);
|
||||
int comp_osip_body_to_str (const osip_body_t *body, char **dest);
|
||||
int comp_osip_message_set_body(osip_message_t *sip, const char *buf);
|
||||
int comp_osip_message_parse (osip_message_t *sip, const char *message);
|
||||
|
||||
|
||||
/*
|
||||
* some constant definitions
|
||||
|
||||
Reference in New Issue
Block a user