mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 01:26:58 +00:00
add libresample to core libs in msvc build, rework GetLibs.vbs to be more sensible in it's structure, change jrtp4c build in msvc to build as part of mod_exosip instead of as a separate lib for build simplicity, squash numerous warnings in libiax2 and jrtp4c, delete FreeswitchPlusLibs.sln because we were not using it and not maintaining it.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@250 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -32,6 +32,7 @@
|
||||
#if defined(_MSC_VER)
|
||||
#define close _close
|
||||
#define inline __inline
|
||||
#define strdup _strdup
|
||||
#endif
|
||||
|
||||
void gettimeofday(struct timeval *tv, void /*struct timezone*/ *tz);
|
||||
@@ -567,7 +568,7 @@ int iax_get_netstats(struct iax_session *session, int *rtt, struct iax_netstat *
|
||||
|
||||
static int calc_timestamp(struct iax_session *session, unsigned int ts, struct ast_frame *f)
|
||||
{
|
||||
int ms;
|
||||
unsigned int ms;
|
||||
time_in_ms_t time_in_ms;
|
||||
int voice = 0;
|
||||
int genuine = 0;
|
||||
@@ -926,7 +927,7 @@ int iax_init(int preferredportno)
|
||||
DEBU(G "Already initialized.");
|
||||
return 0;
|
||||
}
|
||||
netfd = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
||||
netfd = (int)socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
|
||||
if (netfd < 0) {
|
||||
DEBU(G "Unable to allocate UDP socket\n");
|
||||
IAXERROR "Unable to allocate UDP socket\n");
|
||||
@@ -976,7 +977,7 @@ int iax_init(int preferredportno)
|
||||
#endif
|
||||
portno = ntohs(sin.sin_port);
|
||||
}
|
||||
srand(time(NULL));
|
||||
srand((unsigned int)time(NULL));
|
||||
callnums = rand() % 32767 + 1;
|
||||
transfer_id = rand() % 32767 + 1;
|
||||
DEBU(G "Started on port %d\n", portno);
|
||||
@@ -1609,7 +1610,7 @@ int iax_hangup(struct iax_session *session, char *byemsg)
|
||||
|
||||
int iax_sendurl(struct iax_session *session, char *url)
|
||||
{
|
||||
return send_command(session, AST_FRAME_HTML, AST_HTML_URL, 0, (unsigned char *) url, strlen(url), -1);
|
||||
return send_command(session, AST_FRAME_HTML, AST_HTML_URL, 0, (unsigned char *) url, (int)strlen(url), -1);
|
||||
}
|
||||
|
||||
int iax_ring_announce(struct iax_session *session)
|
||||
@@ -1653,12 +1654,12 @@ int iax_load_complete(struct iax_session *session)
|
||||
|
||||
int iax_send_url(struct iax_session *session, char *url, int link)
|
||||
{
|
||||
return send_command(session, AST_FRAME_HTML, link ? AST_HTML_LINKURL : AST_HTML_URL, 0, (unsigned char *) url, strlen(url), -1);
|
||||
return send_command(session, AST_FRAME_HTML, link ? AST_HTML_LINKURL : AST_HTML_URL, 0, (unsigned char *) url, (int)strlen(url), -1);
|
||||
}
|
||||
|
||||
int iax_send_text(struct iax_session *session, char *text)
|
||||
{
|
||||
return send_command(session, AST_FRAME_TEXT, 0, 0, (unsigned char *) text, strlen(text) + 1, -1);
|
||||
return send_command(session, AST_FRAME_TEXT, 0, 0, (unsigned char *) text, (int)strlen(text) + 1, -1);
|
||||
}
|
||||
|
||||
int iax_send_unlink(struct iax_session *session)
|
||||
@@ -1687,7 +1688,7 @@ static int iax_send_pong(struct iax_session *session, unsigned int ts)
|
||||
iax_ie_append_int(&ied,IAX_IE_RR_LOSS,
|
||||
((0xff & (stats.losspct/1000)) << 24 | (stats.frames_lost & 0x00ffffff)));
|
||||
iax_ie_append_int(&ied,IAX_IE_RR_PKTS, stats.frames_in);
|
||||
iax_ie_append_short(&ied,IAX_IE_RR_DELAY, stats.current - stats.min);
|
||||
iax_ie_append_short(&ied,IAX_IE_RR_DELAY, (unsigned short)(stats.current - stats.min));
|
||||
iax_ie_append_int(&ied,IAX_IE_RR_DROPPED, stats.frames_dropped);
|
||||
iax_ie_append_int(&ied,IAX_IE_RR_OOO, stats.frames_ooo);
|
||||
}
|
||||
@@ -1767,8 +1768,8 @@ int iax_auth_reply(struct iax_session *session, char *password, char *challenge,
|
||||
memset(&ied, 0, sizeof(ied));
|
||||
if ((methods & IAX_AUTH_MD5) && challenge) {
|
||||
MD5Init(&md5);
|
||||
MD5Update(&md5, (const unsigned char *) challenge, strlen(challenge));
|
||||
MD5Update(&md5, (const unsigned char *) password, strlen(password));
|
||||
MD5Update(&md5, (const unsigned char *) challenge, (unsigned int)strlen(challenge));
|
||||
MD5Update(&md5, (const unsigned char *) password, (unsigned int)strlen(password));
|
||||
MD5Final((unsigned char *) reply, &md5);
|
||||
memset(realreply, 0, sizeof(realreply));
|
||||
convert_reply(realreply, (unsigned char *) reply);
|
||||
@@ -1790,8 +1791,8 @@ static int iax_regauth_reply(struct iax_session *session, char *password, char *
|
||||
iax_ie_append_short(&ied, IAX_IE_REFRESH, session->refresh);
|
||||
if ((methods & IAX_AUTHMETHOD_MD5) && challenge) {
|
||||
MD5Init(&md5);
|
||||
MD5Update(&md5, (const unsigned char *) challenge, strlen(challenge));
|
||||
MD5Update(&md5, (const unsigned char *) password, strlen(password));
|
||||
MD5Update(&md5, (const unsigned char *) challenge, (unsigned int)strlen(challenge));
|
||||
MD5Update(&md5, (const unsigned char *) password, (unsigned int)strlen(password));
|
||||
MD5Final((unsigned char *) reply, &md5);
|
||||
memset(realreply, 0, sizeof(realreply));
|
||||
convert_reply(realreply, (unsigned char *) reply);
|
||||
@@ -1852,7 +1853,7 @@ char iax_pref_codec_add(struct iax_session *session, unsigned int format)
|
||||
void iax_pref_codec_del(struct iax_session *session, unsigned int format)
|
||||
{
|
||||
int diff = (int) 'A';
|
||||
int x;
|
||||
size_t x;
|
||||
char old[32];
|
||||
char remove = which_bit(format) + diff;
|
||||
|
||||
@@ -2539,7 +2540,7 @@ static struct iax_event *iax_header_to_event(struct iax_session *session,
|
||||
session->capability = e->ies.capability;
|
||||
if (e->ies.codec_prefs) {
|
||||
strncpy(session->codec_order, e->ies.codec_prefs, sizeof(session->codec_order));
|
||||
session->codec_order_len = strlen(session->codec_order);
|
||||
session->codec_order_len = (int)strlen(session->codec_order);
|
||||
}
|
||||
e->etype = IAX_EVENT_CONNECT;
|
||||
e = schedule_delivery(e, ts, updatehistory);
|
||||
|
@@ -239,21 +239,21 @@ static void dump_prov_ies(char *output, int maxlen, unsigned char *iedata, int l
|
||||
if (len < 2)
|
||||
return;
|
||||
strcpy(output, "\n");
|
||||
maxlen -= strlen(output); output += strlen(output);
|
||||
maxlen -= (int)strlen(output); output += strlen(output);
|
||||
while(len > 2) {
|
||||
ie = iedata[0];
|
||||
ielen = iedata[1];
|
||||
if (ielen + 2> len) {
|
||||
snprintf(tmp, (int)sizeof(tmp), "Total Prov IE length of %d bytes exceeds remaining prov frame length of %d bytes\n", ielen + 2, len);
|
||||
strncpy(output, tmp, maxlen - 1);
|
||||
maxlen -= strlen(output); output += strlen(output);
|
||||
maxlen -= (int)strlen(output); output += strlen(output);
|
||||
return;
|
||||
}
|
||||
found = 0;
|
||||
if (!found) {
|
||||
snprintf(tmp, (int)sizeof(tmp), " Unknown Prov IE %03d : Present\n", ie);
|
||||
strncpy(output, tmp, maxlen - 1);
|
||||
maxlen -= strlen(output); output += strlen(output);
|
||||
maxlen -= (int)strlen(output); output += strlen(output);
|
||||
}
|
||||
iedata += (2 + ielen);
|
||||
len -= (2 + ielen);
|
||||
@@ -467,7 +467,7 @@ int iax_ie_append_short(struct iax_ie_data *ied, unsigned char ie, unsigned shor
|
||||
|
||||
int iax_ie_append_str(struct iax_ie_data *ied, unsigned char ie, unsigned char *str)
|
||||
{
|
||||
return iax_ie_append_raw(ied, ie, str, strlen((char *) str));
|
||||
return iax_ie_append_raw(ied, ie, str, (int)strlen((char *) str));
|
||||
}
|
||||
|
||||
int iax_ie_append_byte(struct iax_ie_data *ied, unsigned char ie, unsigned char dat)
|
||||
|
@@ -130,7 +130,7 @@ extern "C" {
|
||||
|
||||
|
||||
if ((pack = jrtp4c->session->GetNextPacket())) {
|
||||
slen = pack->GetPayloadLength();
|
||||
slen = (int)pack->GetPayloadLength();
|
||||
|
||||
if (slen > datalen) {
|
||||
slen = datalen;
|
||||
|
@@ -6,6 +6,14 @@
|
||||
#ifndef CCRTP4C_H
|
||||
#define CCRTP4C_H
|
||||
|
||||
#ifdef WIN32
|
||||
#include <winsock2.h>
|
||||
#pragma warning(disable: 4267)
|
||||
#else
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#endif // WIN32
|
||||
|
||||
#ifdef __cplusplus
|
||||
#include <rtpsession.h>
|
||||
#include <rtppacket.h>
|
||||
@@ -13,18 +21,6 @@
|
||||
#include <rtpipv4address.h>
|
||||
#include <rtpsessionparams.h>
|
||||
#include <rtperrors.h>
|
||||
#ifndef WIN32
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#else
|
||||
#include <winsock2.h>
|
||||
#endif // WIN32
|
||||
#if 0
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#endif
|
||||
|
||||
extern "C" {
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user