diff --git a/core_cmds.c b/core_cmds.c index 5f01ebeb091..43b12aad879 100644 --- a/core_cmds.c +++ b/core_cmds.c @@ -1057,7 +1057,7 @@ static int w_set_adv_port(struct sip_msg *msg, str *adv_port) static int w_f_send_sock(struct sip_msg *msg, struct socket_info *si) { - msg->force_send_socket=si; + msg->force_send_socket=(const struct socket_info *)si; return 1; } diff --git a/modules/proto_sctp/sctp_server.c b/modules/proto_sctp/sctp_server.c index aef28ab62a6..408d506bde4 100644 --- a/modules/proto_sctp/sctp_server.c +++ b/modules/proto_sctp/sctp_server.c @@ -194,10 +194,11 @@ int proto_sctp_send(const struct socket_info *source, char *buf, unsigned len, { int n; int tolen; + struct sockaddr s = to->s; /* XXX Linux defines sctp_sendmsg without const */ tolen=sockaddru_len(*to); again: - n=sctp_sendmsg(source->socket, buf, len, &to->s, tolen, 0, 0, 0, 0, 0); + n=sctp_sendmsg(source->socket, buf, len, &s, tolen, 0, 0, 0, 0, 0); #ifdef XL_DEBUG LM_INFO("send status: %d\n", n); #endif