]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix windows build
authorMichael Jerris <mike@jerris.com>
Fri, 20 Mar 2009 22:38:38 +0000 (22:38 +0000)
committerMichael Jerris <mike@jerris.com>
Fri, 20 Mar 2009 22:38:38 +0000 (22:38 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@12696 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/applications/mod_lcr/mod_lcr.c
src/switch_core_port_allocator.c

index e27e7cb7f18d4132e002b6e260bdb3abde73d6f6..5fd63237c954fe51902b3f971d81b57577dddb66 100644 (file)
@@ -527,6 +527,7 @@ switch_status_t lcr_do_lookup(callback_t *cb_struct, char *digits)
        switch_bool_t lookup_status;
        switch_channel_t *channel;
        char *id_str;
+       char *safe_sql;
 
        digits_copy = string_digitsonly(cb_struct->pool, digits);
        if (switch_strlen_zero(digits_copy)) {
@@ -558,7 +559,6 @@ switch_status_t lcr_do_lookup(callback_t *cb_struct, char *digits)
        }
 
        /* set up the query to be executed */
-       char *safe_sql;
 
        /* format the custom_sql */
        safe_sql = format_custom_sql(profile->custom_sql, cb_struct, digits_copy);
index d3b0d06f52c891e0e1d699d0c75bfc5441c7f40a..4de059a983e39f87270307c904ba259965843a7f 100644 (file)
@@ -118,7 +118,7 @@ SWITCH_DECLARE(switch_status_t) switch_core_port_allocator_request_port(switch_c
        int odd = switch_test_flag(alloc, SPF_ODD);
 
        switch_mutex_lock(alloc->mutex);
-       srand((unsigned)(intptr_t)port_ptr + (unsigned)(intptr_t)switch_thread_self() + switch_micro_time_now());
+       srand((unsigned)((unsigned)(intptr_t)port_ptr + (unsigned)(intptr_t)switch_thread_self() + switch_micro_time_now()));
 
        while (alloc->track_used < alloc->track_len) {
                uint32_t index;