mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-15 22:08:33 +00:00
fix more msvc warnings.
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@636 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
70739b6d2e
commit
241903ba4e
15 files changed
+324
-325
No files matched your search
@@ -37,7 +37,7 @@ static switch_memory_pool *module_pool;
|
||||
|
||||
static struct {
|
||||
char *address;
|
||||
int port;
|
||||
switch_port_t port;
|
||||
switch_sockaddr_t *addr;
|
||||
switch_socket_t *udp_socket;
|
||||
int running;
|
||||
@@ -70,7 +70,7 @@ static switch_status load_config(void)
|
||||
if (!strcasecmp(var, "address")) {
|
||||
set_global_address(val);
|
||||
} else if (!strcasecmp(var, "port")) {
|
||||
globals.port = atoi(val);
|
||||
globals.port = (switch_port_t)atoi(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -205,13 +205,13 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
|
||||
switch_event_add_header(local_event, SWITCH_STACK_BOTTOM, "Multicast", "yes");
|
||||
var = buf;
|
||||
while(*var) {
|
||||
if ((val = strchr(var, ':'))) {
|
||||
if ((val = strchr(var, ':')) != 0) {
|
||||
char varname[512];
|
||||
*val++ = '\0';
|
||||
while(*val == ' ') {
|
||||
val++;
|
||||
}
|
||||
if ((term = strchr(val, '\r')) || (term=strchr(val, '\n'))) {
|
||||
if ((term = strchr(val, '\r')) != 0 || (term=strchr(val, '\n')) != 0) {
|
||||
*term = '\0';
|
||||
while(*term == '\r' || *term == '\n') {
|
||||
term++;
|
||||
|
||||
@@ -223,13 +223,13 @@ int on_msg(void *user_data, ikspak * pak)
|
||||
char retbuf[1024] = "";
|
||||
char *p;
|
||||
|
||||
if ((p = strchr(cmd, '\r'))) {
|
||||
if ((p = strchr(cmd, '\r')) != 0) {
|
||||
*p++ = '\0';
|
||||
} else if ((p = strchr(cmd, '\n'))) {
|
||||
} else if ((p = strchr(cmd, '\n')) != 0) {
|
||||
*p++ = '\0';
|
||||
}
|
||||
|
||||
if ((arg = strchr(cmd, ' '))) {
|
||||
if ((arg = strchr(cmd, ' ')) != 0) {
|
||||
*arg++ = '\0';
|
||||
}
|
||||
|
||||
|
||||
@@ -135,9 +135,9 @@ static void event_handler(switch_event *event)
|
||||
switch_event_header *hp;
|
||||
char *service = switch_event_get_header(event, "service");
|
||||
char *port = switch_event_get_header(event, "port");
|
||||
int porti = 0;
|
||||
sw_port porti = 0;
|
||||
for (hp = event->headers; hp; hp = hp->next) {
|
||||
int len = strlen(hp->name) + strlen(hp->value) + 2;
|
||||
size_t len = strlen(hp->name) + strlen(hp->value) + 2;
|
||||
char *data = malloc(len);
|
||||
|
||||
if (!data) {
|
||||
@@ -156,7 +156,7 @@ static void event_handler(switch_event *event)
|
||||
service = "_freeswitch._tcp";
|
||||
}
|
||||
if (port) {
|
||||
porti = atoi(port);
|
||||
porti = (sw_port)atoi(port);
|
||||
}
|
||||
|
||||
switch_mutex_lock(globals.zc_lock);
|
||||
@@ -208,7 +208,7 @@ static switch_status load_config(void)
|
||||
while (switch_config_next_pair(&cfg, &var, &val)) {
|
||||
if (!strcasecmp(cfg.category, "settings")) {
|
||||
if (!strcmp(var, "browse")) {
|
||||
if ((oid = switch_core_alloc(module_pool, sizeof(*oid)))) {
|
||||
if ((oid = switch_core_alloc(module_pool, sizeof(*oid))) != 0) {
|
||||
switch_console_printf(SWITCH_CHANNEL_CONSOLE, "Bind browser to to %s\n", val);
|
||||
switch_mutex_lock(globals.zc_lock);
|
||||
sw_discovery_browse(globals.discovery, 0, val, NULL, my_browser, NULL, oid);
|
||||
@@ -308,7 +308,7 @@ SWITCH_MOD_DECLARE(switch_status) switch_module_runtime(void)
|
||||
|
||||
RUNNING = 1;
|
||||
while(RUNNING == 1) {
|
||||
unsigned int ms;
|
||||
sw_uint32 ms;
|
||||
ms = 100;
|
||||
sw_discovery_step(globals.discovery, &ms);
|
||||
switch_yield(1000);
|
||||
|
||||
Reference in new issue
Block a user