- 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:
Thomas Ries 2004-11-03 21:23:34 +00:00
parent 5cb8bd57af
commit 9a11b03a00
9 changed files with 10 additions and 144 deletions

View File

@ -295,113 +295,3 @@ AC_MSG_RESULT($acx_which_gethostname_r)
])dnl ACX_WHICH_GETHOSTBYNAME_R
dnl @synopsis ACX_WHICH_OSIP
dnl
dnl Provides a test to determine the correct
dnl way to call various osip_* functions
dnl
dnl defines HAVE_FUNC_OSIP_MESSAGE_TO_STR_3 if it needs 3 arguments
dnl defines HAVE_FUNC_OSIP_BODY_TO_STR_3 if it needs 3 arguments
dnl (libosip2 >= 2.0.9)
dnl
dnl @version $Id$
dnl @author Thomas Ries <tries@gmx.net>
dnl
AC_DEFUN([ACX_WHICH_OSIP], [
dnl
dnl osip_message_to_str
dnl
AC_CHECK_FUNC(osip_message_to_str, [
AC_MSG_CHECKING(how many arguments takes osip_message_to_str)
AC_TRY_COMPILE([
#include <osipparser2/osip_parser.h>], [
osip_message_t *sip;
char **dest;
int length;
(void) osip_message_to_str(sip, dest, &length);
],acx_which_osip_message_to_str=three,
acx_which_osip_message_to_str=two)
], acx_which_osip_message_to_str=no)
if test $acx_which_osip_message_to_str = three; then
AC_DEFINE(HAVE_FUNC_OSIP_MESSAGE_TO_STR_3,,
[osip_message_to_str takes 3 arguments])
fi
AC_MSG_RESULT($acx_which_osip_message_to_str)
dnl
dnl osip_body_to_str
dnl
AC_CHECK_FUNC(osip_body_to_str, [
AC_MSG_CHECKING(how many arguments takes osip_body_to_str)
AC_TRY_COMPILE([
#include <osipparser2/osip_parser.h>], [
osip_message_t *sip;
char **dest;
int length;
(void) osip_body_to_str(sip, dest, &length);
],acx_which_osip_body_to_str=three,
acx_which_osip_body_to_str=two)
], acx_which_osip_body_to_str=no)
if test $acx_which_osip_body_to_str = three; then
AC_DEFINE(HAVE_FUNC_OSIP_BODY_TO_STR_3,,
[osip_body_to_str takes 3 arguments])
fi
AC_MSG_RESULT($acx_which_osip_body_to_str)
dnl
dnl osip_message_set_body
dnl
AC_CHECK_FUNC(osip_message_set_body, [
AC_MSG_CHECKING(how many arguments takes osip_message_set_body)
AC_TRY_COMPILE([
#include <osipparser2/osip_parser.h>], [
osip_message_t *sip;
char **buf;
int length;
(void) osip_message_set_body(sip, buf, length);
],acx_which_osip_message_set_body=three,
acx_which_osip_message_set_body=two)
], acx_which_osip_message_set_body=no)
if test $acx_which_osip_message_set_body = three; then
AC_DEFINE(HAVE_FUNC_OSIP_MESSAGE_SET_BODY_3,,
[osip_message_set_body takes 3 arguments])
fi
AC_MSG_RESULT($acx_which_osip_message_set_body)
dnl
dnl osip_message_parse
dnl
AC_CHECK_FUNC(osip_message_parse, [
AC_MSG_CHECKING(how many arguments takes osip_message_parse)
AC_TRY_COMPILE([
#include <osipparser2/osip_parser.h>], [
osip_message_t *sip;
char **buf;
int length;
(void) osip_message_parse(sip, buf, length);
],acx_which_osip_message_parse=three,
acx_which_osip_message_parse=two)
], acx_which_osip_message_parse=no)
if test $acx_which_osip_message_parse = three; then
AC_DEFINE(HAVE_FUNC_OSIP_MESSAGE_PARSE_3,,
[osip_message_parse takes 3 arguments])
fi
AC_MSG_RESULT($acx_which_osip_message_parse)
])dnl ACX_WHICH_OSIP

View File

@ -30,18 +30,6 @@
/* gethostbyname_r takes 6 arguments */
#undef HAVE_FUNC_GETHOSTBYNAME_R_6
/* osip_body_to_str takes 3 arguments */
#undef HAVE_FUNC_OSIP_BODY_TO_STR_3
/* osip_message_parse takes 3 arguments */
#undef HAVE_FUNC_OSIP_MESSAGE_PARSE_3
/* osip_message_set_body takes 3 arguments */
#undef HAVE_FUNC_OSIP_MESSAGE_SET_BODY_3
/* osip_message_to_str takes 3 arguments */
#undef HAVE_FUNC_OSIP_MESSAGE_TO_STR_3
/* Define to 1 if you have the `getgid' function. */
#undef HAVE_GETGID

View File

@ -30,8 +30,6 @@ dnl (there seems to be a bug somewhere)
dnl 18-Aug-2004 tries fli4l-uclibc -> fli4l-21-uclibc, fli4l-22-uclibc
dnl 2.1.x has no pthread support, link -static
dnl 2.2.x has (maybe) pthread support
dnl 09-Oct-2004 tries libosip2 compatibility >= 2.0.9
dnl
dnl
dnl
@ -350,10 +348,6 @@ dnl
dnl Checks for library functions.
dnl
dnl
dnl libosip specifics: version dependencies
ACX_WHICH_OSIP()
AC_FUNC_MEMCMP
AC_FUNC_VPRINTF

View File

@ -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

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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