From 511132ac1ed6ab09fc36db3c638572f022092e37 Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Tue, 1 Dec 2009 22:42:18 +0000 Subject: [PATCH] fix sofia build when -std=c99 git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@15746 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- libs/sofia-sip/.update | 2 +- libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c | 2 +- libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c | 6 +++--- libs/sofia-sip/libsofia-sip-ua/tport/tport.c | 4 ++-- libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c | 14 +++++++------- .../libsofia-sip-ua/tport/tport_type_sctp.c | 3 +++ .../libsofia-sip-ua/tport/tport_type_tls.c | 4 ++-- 7 files changed, 19 insertions(+), 16 deletions(-) diff --git a/libs/sofia-sip/.update b/libs/sofia-sip/.update index 9b485b41f5..ae3dca84a1 100644 --- a/libs/sofia-sip/.update +++ b/libs/sofia-sip/.update @@ -1 +1 @@ -Mon Sep 21 14:27:58 CDT 2009 +Tue Dec 1 16:41:39 CST 2009 diff --git a/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c b/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c index a976885a33..fd826e0e19 100644 --- a/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c +++ b/libs/sofia-sip/libsofia-sip-ua/nua/nua_register.c @@ -1034,7 +1034,7 @@ void nua_register_connection_closed(tp_stack_t *sip_stack, tpn = tport_name(nr->nr_tport); SU_DEBUG_5(("nua_register(%p): tport to %s/%s:%s%s%s closed %s\n", - du->du_dialog->ds_owner, + (void *)du->du_dialog->ds_owner, tpn->tpn_proto, tpn->tpn_host, tpn->tpn_port, tpn->tpn_comp ? ";comp=" : "", tpn->tpn_comp ? tpn->tpn_comp : "", diff --git a/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c b/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c index e6a91e160d..5dfbc3098f 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c +++ b/libs/sofia-sip/libsofia-sip-ua/sresolv/sres_sip.c @@ -404,7 +404,7 @@ _sres_sip_destruct(void *_srs) sres_resolver_t *sres = srs->srs_resolver; struct srs_step *step; - SU_DEBUG_5(("srs(%p): destroyed\n", _srs)); + SU_DEBUG_5(("srs(%p): destroyed\n", (void *) (_srs))); srs->srs_resolver = NULL; @@ -565,7 +565,7 @@ sres_sip_graylist(sres_sip_t *srs, if (step->sp_otype != sres_type_srv) return; - SU_DEBUG_5(("srs(%p): graylisting %s:%u;transport=%s\n", target, step->sp_port, proto)); + SU_DEBUG_5(("srs(%p): graylisting %s:%u;transport=%s\n", (void *) target, step->sp_port, proto)); for (step = srs->srs_send; step; step = step->sp_next) if (step->sp_otype == sres_type_srv && step->sp_priority > maxprio) @@ -1647,7 +1647,7 @@ sres_sip_append_result(sres_sip_t *srs, } SU_DEBUG_5(("srs(%p): %s result %s%s%s:%u;transport=%s\n", - srs, duplicate ? "duplicate" : "returning", + (void *)srs, duplicate ? "duplicate" : "returning", lb , numeric, rb, port, sres_sip_transport_name(result->ai_protocol))); diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport.c index 1b73848678..a33b77f3e2 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport.c @@ -2252,7 +2252,7 @@ int tport_set_secondary_timer(tport_t *self) if (tport_is_closed(self)) { if (self->tp_refs == 0) { SU_DEBUG_7(("tport(%p): set timer at %u ms because %s\n", - self, 0, "zap")); + (void *)self, 0, "zap")); su_timer_set_interval(self->tp_timer, timer, self, 0); } else @@ -2601,7 +2601,7 @@ int tport_accept(tport_primary_t *pri, int events) /* Alloc a new transport object, then register socket events with it */ if ((self = tport_alloc_secondary(pri, s, 1, &reason)) == NULL) { SU_DEBUG_3(("%s(%p): incoming secondary on "TPN_FORMAT - " failed. reason = %s\n", __func__, pri, + " failed. reason = %s\n", __func__, (void *)pri, TPN_ARGS(pri->pri_primary->tp_name), reason)); return 0; } diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c index 711ff200ec..aedd1d88b6 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_tls.c @@ -494,7 +494,7 @@ int tls_post_connection_check(tport_t *self, tls_t *tls) cert = SSL_get_peer_certificate(tls->con); if (!cert) { SU_DEBUG_7(("%s(%p): Peer did not provide X.509 Certificate.\n", - __func__, self)); + __func__, (void *) self)); if (self->tp_accepted && tls->verify_incoming) return X509_V_ERR_CERT_UNTRUSTED; else if (!self->tp_accepted && tls->verify_outgoing) @@ -572,10 +572,10 @@ int tls_post_connection_check(tport_t *self, tls_t *tls) int i, len = su_strlst_len(tls->subjects); for (i=0; i < len; i++) SU_DEBUG_7(("%s(%p): Peer Certificate Subject %i: %s\n", \ - __func__, self, i, su_strlst_item(tls->subjects, i))); + __func__, (void *)self, i, su_strlst_item(tls->subjects, i))); if (i == 0) SU_DEBUG_7(("%s(%p): Peer Certificate provided no usable subjects.\n", - __func__, self)); + __func__, (void *)self)); } /* Verify incoming connections */ @@ -599,7 +599,7 @@ int tls_post_connection_check(tport_t *self, tls_t *tls) return X509_V_OK; } SU_DEBUG_3(("%s(%p): Peer Subject Mismatch (incoming connection)\n", \ - __func__, self)); + __func__, (void *)self)); return X509_V_ERR_CERT_UNTRUSTED; } @@ -617,7 +617,7 @@ int tls_post_connection_check(tport_t *self, tls_t *tls) if (tport_subject_search(subject, tls->subjects)) return X509_V_OK; /* Subject match found in verified certificate chain */ SU_DEBUG_3(("%s(%p): Peer Subject Mismatch (%s)\n", \ - __func__, self, subject)); + __func__, (void *)self, subject)); return X509_V_ERR_CERT_UNTRUSTED; } @@ -856,7 +856,7 @@ int tls_connect(su_root_magic_t *magic, su_wait_t *w, tport_t *self) if ((tls = tlstp->tlstp_context) == NULL) { SU_DEBUG_3(("%s(%p): Error: no TLS context data for connected socket.\n", - __func__, tlstp)); + __func__, (void *)tlstp)); tport_close(self); tport_set_secondary_timer(self); return 0; @@ -922,7 +922,7 @@ int tls_connect(su_root_magic_t *magic, su_wait_t *w, tport_t *self) char errbuf[64]; ERR_error_string_n(status, errbuf, 64); SU_DEBUG_3(("%s(%p): TLS setup failed (%s)\n", - __func__, self, errbuf)); + __func__, (void *)self, errbuf)); } break; } diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c index 08b160bb75..470178fdf8 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_sctp.c @@ -325,4 +325,7 @@ void tport_sctp_timer(tport_t *self, su_time_t now) tport_base_timer(self, now); } +#else +/* ISO c99 forbids empty source file */ +void *sofia_tport_type_sctp_dummy; #endif diff --git a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c index a1f0adf1fe..7afd34c66d 100644 --- a/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c +++ b/libs/sofia-sip/libsofia-sip-ua/tport/tport_type_tls.c @@ -575,7 +575,7 @@ int tport_tls_accept(tport_primary_t *pri, int events) /* Alloc a new transport object, then register socket events with it */ if ((self = tport_alloc_secondary(pri, s, 1, &reason)) == NULL) { SU_DEBUG_3(("%s(%p): incoming secondary on "TPN_FORMAT - " failed. reason = %s\n", __func__, pri, + " failed. reason = %s\n", __func__, (void *)pri, TPN_ARGS(pri->pri_primary->tp_name), reason)); return 0; } @@ -594,7 +594,7 @@ int tport_tls_accept(tport_primary_t *pri, int events) self->tp_is_connected = 0; SU_DEBUG_5(("%s(%p): new connection from " TPN_FORMAT "\n", - __func__, (void *)self, TPN_ARGS(self->tp_name))); + __func__, (void *)self, TPN_ARGS(self->tp_name))); /* Return succesfully */ return 0;