mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-02 11:58:40 +00:00
use string fields for some stuff in ast_channel
const-ify some more APIs remove 'type' field from ast_channel, in favor of the one in the channel's tech structure allow string field module users to specify the 'chunk size' for pool allocations update chan_alsa to be compatible with recent const-ification patches git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9060 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -525,7 +525,7 @@ void iax_showframe(struct iax_frame *f, struct ast_iax2_full_hdr *fhi, int rx, s
|
||||
dump_ies(fh->iedata, datalen);
|
||||
}
|
||||
|
||||
int iax_ie_append_raw(struct iax_ie_data *ied, unsigned char ie, void *data, int datalen)
|
||||
int iax_ie_append_raw(struct iax_ie_data *ied, unsigned char ie, const void *data, int datalen)
|
||||
{
|
||||
char tmp[256];
|
||||
if (datalen > ((int)sizeof(ied->buf) - ied->pos)) {
|
||||
@@ -540,7 +540,7 @@ int iax_ie_append_raw(struct iax_ie_data *ied, unsigned char ie, void *data, int
|
||||
return 0;
|
||||
}
|
||||
|
||||
int iax_ie_append_addr(struct iax_ie_data *ied, unsigned char ie, struct sockaddr_in *sin)
|
||||
int iax_ie_append_addr(struct iax_ie_data *ied, unsigned char ie, const struct sockaddr_in *sin)
|
||||
{
|
||||
return iax_ie_append_raw(ied, ie, sin, (int)sizeof(struct sockaddr_in));
|
||||
}
|
||||
@@ -559,7 +559,7 @@ int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned shor
|
||||
return iax_ie_append_raw(ied, ie, &newval, (int)sizeof(newval));
|
||||
}
|
||||
|
||||
int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie, char *str)
|
||||
int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie, const char *str)
|
||||
{
|
||||
return iax_ie_append_raw(ied, ie, str, strlen(str));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user