Commit 321fc36a authored by Pekka Pessi's avatar Pekka Pessi

Fixed VC/Win32 problems in libsofia-sip-ua.

Signedness problems, includes, linkage, winsock initialization.

darcs-hash:20060125155919-65a35-aa3313959225506110feabc038872da2bef20e3d.gz
parent 79a23b45
......@@ -292,7 +292,8 @@ struct msg_hclass_s
char hc_short[2];/**< Short name, if any. */
unsigned char hc_size; /**< Size of header structure. */
unsigned char hc_params; /**< Offset of parameters */
msg_header_kind_t hc_kind:3; /**< Kind of header:
unsigned /* msg_header_kind_t */
hc_kind:3; /**< Kind of header:
* single, append, list, apndlist, prepend. */
unsigned hc_critical:1; /**< True if header is critical */
unsigned /*pad*/:0;
......
......@@ -247,7 +247,7 @@ static nta_outgoing_t *outgoing_find(nta_agent_t const *sa,
sip_t const *sip,
sip_via_t const *v);
static int outgoing_recv(nta_outgoing_t *orq, int status, msg_t *, sip_t *);
static int outgoing_default_recv(nta_outgoing_t *, int, msg_t *, sip_t *);
static void outgoing_default_recv(nta_outgoing_t *, int, msg_t *, sip_t *);
static inline int outgoing_timer(nta_agent_t *, su_duration_t);
static int outgoing_recv_reliable(nta_outgoing_t *orq, msg_t *msg, sip_t *sip);
......@@ -7637,7 +7637,7 @@ int outgoing_recv(nta_outgoing_t *orq,
return 0;
}
static int outgoing_default_recv(nta_outgoing_t *orq,
static void outgoing_default_recv(nta_outgoing_t *orq,
int status,
msg_t *msg,
sip_t *sip)
......
......@@ -57,9 +57,9 @@ struct call;
#include <string.h>
#include <assert.h>
#include <unistd.h>
#if HAVE_ALARM
#include <unistd.h>
#include <signal.h>
#endif
......@@ -1097,7 +1097,7 @@ int test_params(struct context *ctx)
static char passwd_name[] = "tmp_sippasswd.XXXXXX";
static void rmtmp(void)
static void remove_tmp(void)
{
if (passwd_name[0])
unlink(passwd_name);
......@@ -1128,7 +1128,7 @@ int test_init(struct context *ctx, int start_proxy, url_t const *o_proxy)
printf("TEST NUA-2.0.0: init proxy P\n");
temp = mkstemp(passwd_name); TEST_1(temp != -1);
atexit(rmtmp); /* Make sure temp file is unlinked */
atexit(remove_tmp); /* Make sure temp file is unlinked */
TEST(write(temp, passwd, strlen(passwd)), strlen(passwd));
......@@ -2430,7 +2430,7 @@ int test_reject_401_aka(struct context *ctx)
SOATAG_USER_SDP_STR(a_call->sdp),
TAG_END());
run_ab_until(ctx, -1, save_until_final_response, -1, reject_401_aka);
run_ab_until(ctx, -1, until_terminated, -1, reject_401_aka);
/*
Client transitions
......@@ -4445,7 +4445,7 @@ int test_events(struct context *ctx)
sip_t const *sip;
tagi_t const *n_tags, *r_tags;
url_t b_url[1];
nea_sub_t *sub;
nea_sub_t *sub = NULL;
char const open[] =
"<?xml version='1.0' encoding='UTF-8'?>\n"
......
......@@ -147,12 +147,23 @@ static int process_register(struct proxy *proxy,
static struct registration_entry *
registration_entry_find(struct proxy const *proxy, url_t const *uri);
static
auth_challenger_t registrar_challenger[1];
/* Proxy entry point */
static int
test_proxy_init(su_root_t *root, struct proxy *proxy)
{
struct proxy_transaction *t;
auth_challenger_t _registrar_challenger[1] =
{{
SIP_401_UNAUTHORIZED,
sip_www_authenticate_class,
sip_authentication_info_class
}};
*registrar_challenger = *_registrar_challenger;
proxy->root = root;
proxy->auth = auth_mod_create(root, TAG_NEXT(proxy->tags));
......@@ -394,13 +405,6 @@ LIST_BODIES(static, proxy_transaction, struct proxy_transaction, next, prev);
static int check_unregister(sip_t const *sip);
auth_challenger_t const registrar_challenger[1] =
{{
SIP_401_UNAUTHORIZED,
sip_www_authenticate_class,
sip_authentication_info_class
}};
int process_register(struct proxy *proxy,
nta_incoming_t *irq,
sip_t const *sip)
......
......@@ -892,6 +892,10 @@ static void *su_clone_main(void *varg)
pthread_cleanup_push(su_clone_signal_parent, varg);
#if SU_HAVE_WINSOCK
su_init();
#endif
port = su_port_create();
if (!port)
pthread_exit(NULL);
......@@ -935,6 +939,10 @@ static void *su_clone_main(void *varg)
SU_PORT_ZAPREF(port, su_clone_main);
#if SU_HAVE_WINSOCK
su_deinit();
#endif
return NULL;
}
#endif
......
......@@ -46,6 +46,8 @@
#include <sys/types.h>
#endif
#include <stddef.h>
SOFIA_BEGIN_DECLS
#if SU_HAVE_STDINT || SU_HAVE_INTTYPES
......
......@@ -338,11 +338,13 @@ int su_wait(su_wait_t waits[], unsigned n, su_duration_t timeout);
int su_wait_events(su_wait_t *wait, su_socket_t s);
int su_wait_mask(su_wait_t *dst, su_socket_t s, int events);
#if SU_HAVE_BSDSOCK
static inline
su_socket_t su_wait_socket(su_wait_t *wait)
{
return wait->fd;
}
#endif
/* Root */
su_root_t *su_root_create(su_root_magic_t *magic)
......
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