diff options
Diffstat (limited to 'channels/chan_sip.c')
-rw-r--r-- | channels/chan_sip.c | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/channels/chan_sip.c b/channels/chan_sip.c index e4f985991..d1b1547e1 100644 --- a/channels/chan_sip.c +++ b/channels/chan_sip.c @@ -1483,7 +1483,7 @@ static int sipsock_read(int *id, int fd, short events, void *ignore); static int __sip_xmit(struct sip_pvt *p, char *data, int len); static int __sip_reliable_xmit(struct sip_pvt *p, int seqno, int resp, char *data, int len, int fatal, int sipmethod); static int __transmit_response(struct sip_pvt *p, const char *msg, const struct sip_request *req, enum xmittype reliable); -static int retrans_pkt(void *data); +static int retrans_pkt(const void *data); static int transmit_sip_request(struct sip_pvt *p, struct sip_request *req); static int transmit_response_using_temp(ast_string_field callid, struct sockaddr_in *sin, int useglobal_nat, const int intended_method, const struct sip_request *req, const char *msg); static int transmit_response(struct sip_pvt *p, const char *msg, const struct sip_request *req); @@ -1515,7 +1515,7 @@ static int sip_send_mwi_to_peer(struct sip_peer *peer, const struct ast_event *e /*--- Dialog management */ static struct sip_pvt *sip_alloc(ast_string_field callid, struct sockaddr_in *sin, int useglobal_nat, const int intended_method); -static int __sip_autodestruct(void *data); +static int __sip_autodestruct(const void *data); static void sip_scheddestroy(struct sip_pvt *p, int ms); static void sip_cancel_destroy(struct sip_pvt *p); static struct sip_pvt *sip_destroy(struct sip_pvt *p); @@ -1523,7 +1523,7 @@ static void __sip_destroy(struct sip_pvt *p, int lockowner, int lockdialoglist); static void __sip_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod); static void __sip_pretend_ack(struct sip_pvt *p); static int __sip_semi_ack(struct sip_pvt *p, int seqno, int resp, int sipmethod); -static int auto_congest(void *arg); +static int auto_congest(const void *arg); static int update_call_counter(struct sip_pvt *fup, int event); static int hangup_sip2cause(int cause); static const char *hangup_cause2sip(int cause); @@ -1579,7 +1579,7 @@ static struct sip_auth *find_realm_authentication(struct sip_auth *authlist, con /*--- Misc functions */ static int sip_do_reload(enum channelreloadreason reason); static int reload_config(enum channelreloadreason reason); -static int expire_register(void *data); +static int expire_register(const void *data); static void *do_monitor(void *data); static int restart_monitor(void); static int sip_addrcmp(char *name, struct sockaddr_in *sin); /* Support for peer matching */ @@ -1590,7 +1590,7 @@ static int attempt_transfer(struct sip_dual *transferer, struct sip_dual *target /*--- Device monitoring and Device/extension state/event handling */ static int cb_extensionstate(char *context, char* exten, int state, void *data); static int sip_devicestate(void *data); -static int sip_poke_noanswer(void *data); +static int sip_poke_noanswer(const void *data); static int sip_poke_peer(struct sip_peer *peer); static void sip_poke_all_peers(void); static void sip_peer_hold(struct sip_pvt *p, int hold); @@ -1667,7 +1667,7 @@ static struct sip_peer *temp_peer(const char *name); static void register_peer_exten(struct sip_peer *peer, int onoff); static struct sip_peer *find_peer(const char *peer, struct sockaddr_in *sin, int realtime); static struct sip_user *find_user(const char *name, int realtime); -static int sip_poke_peer_s(void *data); +static int sip_poke_peer_s(const void *data); static enum parse_register_result parse_register_contact(struct sip_pvt *pvt, struct sip_peer *p, struct sip_request *req); static void reg_source_db(struct sip_peer *peer); static void destroy_association(struct sip_peer *peer); @@ -1688,9 +1688,9 @@ static void ast_sip_ouraddrfor(struct in_addr *them, struct sockaddr_in *us); static void sip_registry_destroy(struct sip_registry *reg); static int sip_register(char *value, int lineno); static const char *regstate2str(enum sipregistrystate regstate) attribute_const; -static int sip_reregister(void *data); +static int sip_reregister(const void *data); static int __sip_do_register(struct sip_registry *r); -static int sip_reg_timeout(void *data); +static int sip_reg_timeout(const void *data); static void sip_send_all_registers(void); /*--- Parsing SIP requests and responses */ @@ -2243,9 +2243,9 @@ static void append_history_full(struct sip_pvt *p, const char *fmt, ...) } /*! \brief Retransmit SIP message if no answer (Called from scheduler) */ -static int retrans_pkt(void *data) +static int retrans_pkt(const void *data) { - struct sip_pkt *pkt = data, *prev, *cur = NULL; + struct sip_pkt *pkt = (struct sip_pkt *)data, *prev, *cur = NULL; int reschedule = DEFAULT_RETRANS; int xmitres = 0; @@ -2414,9 +2414,9 @@ static enum sip_result __sip_reliable_xmit(struct sip_pvt *p, int seqno, int res * and we are called using that reference. So if the event is not * rescheduled, we need to call dialog_unref(). */ -static int __sip_autodestruct(void *data) +static int __sip_autodestruct(const void *data) { - struct sip_pvt *p = data; + struct sip_pvt *p = (struct sip_pvt *)data; /* If this is a subscription, tell the phone that we got a timeout */ if (p->subscribed) { @@ -3473,9 +3473,9 @@ static int create_addr(struct sip_pvt *dialog, const char *opeer) /*! \brief Scheduled congestion on a call. * Only called by the scheduler, must return the reference when done. */ -static int auto_congest(void *arg) +static int auto_congest(const void *arg) { - struct sip_pvt *p = arg; + struct sip_pvt *p = (struct sip_pvt *)arg; sip_pvt_lock(p); p->initid = -1; /* event gone, will not be rescheduled */ @@ -8063,7 +8063,7 @@ static const char *regstate2str(enum sipregistrystate regstate) * We assume the reference so the sip_registry is valid, since it * is stored in the scheduled event anyways. */ -static int sip_reregister(void *data) +static int sip_reregister(const void *data) { /* if we are here, we know that we need to reregister. */ struct sip_registry *r= registry_addref((struct sip_registry *) data); @@ -8100,7 +8100,7 @@ static int __sip_do_register(struct sip_registry *r) * This is called by the scheduler so the event is not pending anymore when * we are called. */ -static int sip_reg_timeout(void *data) +static int sip_reg_timeout(const void *data) { /* if we are here, our registration timed out, so we'll just do it over */ @@ -8537,9 +8537,9 @@ static void destroy_association(struct sip_peer *peer) } /*! \brief Expire registration of SIP peer */ -static int expire_register(void *data) +static int expire_register(const void *data) { - struct sip_peer *peer = data; + struct sip_peer *peer = (struct sip_peer *)data; if (!peer) /* Hmmm. We have no peer. Weird. */ return 0; @@ -8569,9 +8569,9 @@ static int expire_register(void *data) } /*! \brief Poke peer (send qualify to check if peer is alive and well) */ -static int sip_poke_peer_s(void *data) +static int sip_poke_peer_s(const void *data) { - struct sip_peer *peer = data; + struct sip_peer *peer = (struct sip_peer *)data; peer->pokeexpire = -1; sip_poke_peer(peer); @@ -16668,9 +16668,9 @@ static int restart_monitor(void) } /*! \brief React to lack of answer to Qualify poke */ -static int sip_poke_noanswer(void *data) +static int sip_poke_noanswer(const void *data) { - struct sip_peer *peer = data; + struct sip_peer *peer = (struct sip_peer *)data; peer->pokeexpire = -1; if (peer->lastms > -1) { |