Merge branch 'master' of git://git.freeswitch.org/freeswitch

Conflicts:
	libs/freetdm/src/ftmod/ftmod_sangoma_boost/ftmod_sangoma_boost.c
This commit is contained in:
Nenad Corbic
2010-04-23 14:02:50 -04:00
73 changed files with 2576 additions and 738 deletions
+12 -4
View File
@@ -2050,6 +2050,10 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co
case FTDM_COMMAND_SET_RX_GAIN:
{
if (!FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
ftdm_log(FTDM_LOG_ERROR, "Cannot set rx gain in non-voice channel of type: %s\n", ftdm_chan_type2str(ftdmchan->type));
GOTO_STATUS(done, FTDM_FAIL);
}
ftdmchan->rxgain = FTDM_COMMAND_OBJ_FLOAT;
reset_gain_table(ftdmchan->rxgain_table, ftdmchan->rxgain, ftdmchan->native_codec);
if (ftdmchan->rxgain == 0.0) {
@@ -2068,6 +2072,10 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_command(ftdm_channel_t *ftdmchan, ftdm_co
break;
case FTDM_COMMAND_SET_TX_GAIN:
{
if (!FTDM_IS_VOICE_CHANNEL(ftdmchan)) {
ftdm_log(FTDM_LOG_ERROR, "Cannot set tx gain in non-voice channel of type: %s\n", ftdm_chan_type2str(ftdmchan->type));
GOTO_STATUS(done, FTDM_FAIL);
}
ftdmchan->txgain = FTDM_COMMAND_OBJ_FLOAT;
reset_gain_table(ftdmchan->txgain_table, ftdmchan->txgain, ftdmchan->native_codec);
if (ftdmchan->txgain == 0.0) {
@@ -2468,17 +2476,17 @@ FT_DECLARE(ftdm_status_t) ftdm_channel_read(ftdm_channel_t *ftdmchan, void *data
ftdm_assert_return(ftdmchan != NULL, FTDM_FAIL, "ftdmchan is null\n");
ftdm_assert_return(ftdmchan->fio != NULL, FTDM_FAIL, "No I/O module attached to ftdmchan\n");
if (!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OPEN)) {
if (!ftdm_test_flag(ftdmchan, FTDM_CHANNEL_OPEN)) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "channel not open");
return FTDM_FAIL;
}
return FTDM_FAIL;
}
if (!ftdmchan->fio->read) {
snprintf(ftdmchan->last_error, sizeof(ftdmchan->last_error), "method not implemented");
return FTDM_FAIL;
}
status = ftdmchan->fio->read(ftdmchan, data, datalen);
status = ftdmchan->fio->read(ftdmchan, data, datalen);
if (ftdmchan->fds[0] > -1) {
int dlen = (int) *datalen;
if (write(ftdmchan->fds[0], data, dlen) != dlen) {
@@ -688,13 +688,13 @@ static void handle_call_start_ack(sangomabc_connection_t *mcon, sangomabc_short_
if (ftdmchan->state == FTDM_CHANNEL_STATE_UP ||
ftdmchan->state == FTDM_CHANNEL_STATE_PROGRESS_MEDIA ||
ftdmchan->state == FTDM_CHANNEL_STATE_PROGRESS) {
ftdm_log(FTDM_LOG_CRIT, "ZCHAN CALL ACK STATE UP -> Changed to TERMINATING %d:%d\n", event->span+1,event->chan+1);
ftdm_log(FTDM_LOG_CRIT, "FTDMCHAN CALL ACK STATE UP -> Changed to TERMINATING %d:%d\n", event->span+1,event->chan+1);
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING, 0, r);
} else if (ftdmchan->state == FTDM_CHANNEL_STATE_HANGUP || ftdm_test_sflag(ftdmchan, SFLAG_HANGUP)) {
ftdm_log(FTDM_LOG_CRIT, "ZCHAN CALL ACK STATE HANGUP -> Changed to HANGUP COMPLETE %d:%d\n", event->span+1,event->chan+1);
ftdm_log(FTDM_LOG_CRIT, "FTDMCHAN CALL ACK STATE HANGUP -> Changed to HANGUP COMPLETE %d:%d\n", event->span+1,event->chan+1);
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE, 0, r);
} else {
ftdm_log(FTDM_LOG_CRIT, "ZCHAN STATE INVALID State %s on IN CALL ACK %d:%d\n",
ftdm_log(FTDM_LOG_CRIT, "FTDMCHAN STATE INVALID State %s on IN CALL ACK %d:%d\n",
ftdm_channel_state2str(ftdmchan->state),event->span+1,event->chan+1);
}
ftdm_set_sflag(ftdmchan, SFLAG_SENT_FINAL_MSG);
@@ -814,7 +814,9 @@ static void handle_call_start_nack(ftdm_span_t *span, sangomabc_connection_t *mc
if (sangoma_boost_data->sigmod) {
ftdmchan = OUTBOUND_REQUESTS[event->call_setup_id].ftdmchan;
CALL_DATA(ftdmchan)->last_event_id = event->event_id;
CALL_DATA(ftdmchan)->call_setup_id = event->call_setup_id;
ftdm_set_state_locked(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING);
ftdm_clear_sflag_locked(ftdmchan, SFLAG_SENT_FINAL_MSG);
} else {
sangomabc_exec_command(mcon,
0,
@@ -856,7 +858,7 @@ static void handle_call_start_nack(ftdm_span_t *span, sangomabc_connection_t *mc
sangomabc_exec_command(mcon,
event->span,
event->chan,
0,
event->call_setup_id,
SIGBOOST_EVENT_CALL_START_NACK_ACK,
0, 0);
}
@@ -1001,23 +1003,26 @@ static void handle_call_start(ftdm_span_t *span, sangomabc_connection_t *mcon, s
if (ftdmchan->state == FTDM_CHANNEL_STATE_UP ||
ftdmchan->state == FTDM_CHANNEL_STATE_PROGRESS_MEDIA ||
ftdmchan->state == FTDM_CHANNEL_STATE_PROGRESS) {
ftdm_log(FTDM_LOG_CRIT, "ZCHAN STATE UP -> Changed to TERMINATING %d:%d\n", event->span+1,event->chan+1);
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:FTDMCHAN STATE UP -> Changed to TERMINATING\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING, 0, r);
} else if (ftdmchan->state == FTDM_CHANNEL_STATE_HANGUP || ftdm_test_sflag(ftdmchan, SFLAG_HANGUP)) {
ftdm_log(FTDM_LOG_CRIT, "ZCHAN STATE HANGUP -> Changed to HANGUP COMPLETE %d:%d\n", event->span+1,event->chan+1);
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:FTDMCHAN STATE HANGUP -> Changed to HANGUP COMPLETE\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_HANGUP_COMPLETE, 0, r);
} else if (ftdmchan->state == FTDM_CHANNEL_STATE_DIALING) {
ftdm_log(FTDM_LOG_WARNING, "s%dc%d:Collision, hanging up incoming call\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_set_state_r(ftdmchan, FTDM_CHANNEL_STATE_TERMINATING, 0, r);
} else {
ftdm_log(FTDM_LOG_CRIT, "ZCHAN STATE INVALID %s on IN CALL %d:%d\n", ftdm_channel_state2str(ftdmchan->state),event->span+1,event->chan+1);
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:FTDMCHAN STATE INVALID %s on IN CALL\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event), ftdm_channel_state2str(ftdmchan->state));
}
ftdm_set_sflag(ftdmchan, SFLAG_SENT_FINAL_MSG);
ftdmchan = NULL;
}
ftdm_log(FTDM_LOG_CRIT, "START CANT FIND CHAN %d:%d\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:START CANT FIND CHAN\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
goto error;
}
if (ftdm_channel_open_chan(ftdmchan) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_CRIT, "START CANT OPEN CHAN %d:%d\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
ftdm_log(FTDM_LOG_CRIT, "s%dc%d:START CANT OPEN CHAN\n", BOOST_EVENT_SPAN(mcon->sigmod, event), BOOST_EVENT_CHAN(mcon->sigmod, event));
goto error;
}
@@ -1071,7 +1076,7 @@ static void handle_call_start(ftdm_span_t *span, sangomabc_connection_t *mcon, s
sangomabc_exec_command(mcon,
event->span,
event->chan,
0,
event->call_setup_id,
SIGBOOST_EVENT_CALL_START_NACK,
hangup_cause, 0);
@@ -1304,6 +1309,8 @@ static int parse_sangoma_event(ftdm_span_t *span, sangomabc_connection_t *mcon,
if (event->call_setup_id) {
nack_map[event->call_setup_id] = 0;
release_request_id(event->call_setup_id);
} else {
handle_call_done(span, mcon, event);
}
break;
case SIGBOOST_EVENT_INSERT_CHECK_LOOP:
@@ -1372,7 +1379,7 @@ static __inline__ void state_advance(ftdm_channel_t *ftdmchan)
sangomabc_exec_command(mcon,
BOOST_SPAN(ftdmchan),
BOOST_CHAN(ftdmchan),
0,
CALL_DATA(ftdmchan)->call_setup_id,
SIGBOOST_EVENT_CALL_START_NACK_ACK,
0, 0);
@@ -1823,7 +1830,7 @@ static void *ftdm_sangoma_boost_run(ftdm_thread_t *me, void *obj)
}
if (ftdm_boost_connection_open(span) != FTDM_SUCCESS) {
ftdm_log(FTDM_LOG_ERROR, "ftdm_boost_connection_open failed\n");
ftdm_log(FTDM_LOG_CRIT, "ftdm_boost_connection_open failed\n");
goto end;
}
@@ -1867,10 +1874,6 @@ static void *ftdm_sangoma_boost_run(ftdm_thread_t *me, void *obj)
check_state(span);
}
goto end;
ftdm_log(FTDM_LOG_CRIT, "Boost event processing Error!\n");
end:
if (!sangoma_boost_data->sigmod) {
sangomabc_connection_close(&sangoma_boost_data->mcon);
@@ -1917,13 +1920,17 @@ static int sigmod_ss7box_isup_exec_cmd(ftdm_stream_handle_t *stream, char *cmd)
static void ftdm_cli_span_state_cmd(ftdm_span_t *span, char *state)
{
int j;
unsigned int j;
int cnt=0;
ftdm_channel_state_t state_e = ftdm_str2ftdm_channel_state(state);
if (state_e == FTDM_CHANNEL_STATE_INVALID) {
ftdm_log(FTDM_LOG_CRIT, "Checking for channels not in the INVALID state is probably not waht you want\n");
}
for(j = 1; j <= span->chan_count; j++) {
if (span->channels[j]->state != FTDM_CHANNEL_STATE_DOWN) {
if (span->channels[j]->state != state_e) {
ftdm_channel_t *ftdmchan = span->channels[j];
ftdm_log(FTDM_LOG_CRIT, "Channel %i s%dc%d State=%s\n",
j,ftdmchan->physical_span_id-1,ftdmchan->physical_chan_id-1,ftdm_channel_state2str(ftdmchan->state));
j, ftdmchan->physical_span_id-1, ftdmchan->physical_chan_id-1, ftdm_channel_state2str(ftdmchan->state));
cnt++;
}
}
@@ -1986,6 +1993,7 @@ static FIO_API_FUNCTION(ftdm_sangoma_boost_api)
#endif
} else if (!strcasecmp(argv[0], "span")) {
int err;
sangomabc_connection_t *pcon;
ftdm_sangoma_boost_data_t *sangoma_boost_data;
ftdm_span_t *span;
@@ -1995,7 +2003,7 @@ static FIO_API_FUNCTION(ftdm_sangoma_boost_api)
goto done;
}
int err = ftdm_span_find_by_name(argv[1], &span);
err = ftdm_span_find_by_name(argv[1], &span);
if (FTDM_SUCCESS != err) {
stream->write_function(stream, "-ERR failed to find span by name %s\n",argv[1]);
goto done;
@@ -2132,23 +2140,23 @@ static ftdm_status_t ftdm_sangoma_boost_start(ftdm_span_t *span)
static ftdm_status_t ftdm_sangoma_boost_stop(ftdm_span_t *span)
{
int cnt = 10;
ftdm_status_t status = FTDM_SUCCESS;
ftdm_sangoma_boost_data_t *sangoma_boost_data = span->signal_data;
if (sangoma_boost_data->sigmod) {
/* FIXME: we should make sure the span thread is stopped (use pthread_kill or freetdm thread kill function) */
/* I think stopping the span before destroying the queue makes sense
otherwise may be boost events would still arrive when the queue is already destroyed! */
status = sangoma_boost_data->sigmod->stop_span(span);
ftdm_queue_enqueue(sangoma_boost_data->boost_queue, NULL);
while(ftdm_test_flag(sangoma_boost_data, FTDM_SANGOMA_BOOST_RUNNING) && cnt-- > 0) {
ftdm_log(FTDM_LOG_DEBUG, "Waiting for boost thread\n");
ftdm_sleep(500);
}
}
while (ftdm_test_flag(sangoma_boost_data, FTDM_SANGOMA_BOOST_RUNNING)) {
ftdm_log(FTDM_LOG_DEBUG, "Waiting for boost thread\n");
ftdm_sleep(100);
}
if (sangoma_boost_data->sigmod) {
ftdm_queue_destroy(&sangoma_boost_data->boost_queue);
return status;
}
return status;
}
@@ -2443,7 +2451,7 @@ static FIO_CONFIGURE_SPAN_SIGNALING_FUNCTION(ftdm_sangoma_boost_configure_span)
ftdm_dso_lib_t lib = NULL;
char path[255] = "";
char *err = NULL;
int j = 0;
unsigned int j = 0;
unsigned paramindex = 0;
ftdm_status_t rc = FTDM_SUCCESS;
+2 -1
View File
@@ -383,7 +383,8 @@ typedef enum {
} ftdm_channel_state_t;
#define CHANNEL_STATE_STRINGS "DOWN", "HOLD", "SUSPENDED", "DIALTONE", "COLLECT", \
"RING", "BUSY", "ATTN", "GENRING", "DIALING", "GET_CALLERID", "CALLWAITING", \
"RESTART", "PROGRESS", "PROGRESS_MEDIA", "UP", "IDLE", "TERMINATING", "CANCEL", "HANGUP", "HANGUP_COMPLETE", "INVALID"
"RESTART", "PROGRESS", "PROGRESS_MEDIA", "UP", "IDLE", "TERMINATING", "CANCEL", \
"HANGUP", "HANGUP_COMPLETE", "IN_LOOP", "INVALID"
FTDM_STR2ENUM_P(ftdm_str2ftdm_channel_state, ftdm_channel_state2str, ftdm_channel_state_t)
typedef enum {
+1 -1
View File
@@ -978,7 +978,7 @@ ZIO_SPAN_POLL_EVENT_FUNCTION(zt_poll_event)
ZIO_SPAN_NEXT_EVENT_FUNCTION(zt_next_event)
{
uint32_t i, event_id = 0;
zap_oob_event_t zt_event_id = 0;
zt_event_t zt_event_id = 0;
for(i = 1; i <= span->chan_count; i++) {
if (zap_test_flag(span->channels[i], ZAP_CHANNEL_EVENT)) {
+1 -1
View File
@@ -1469,7 +1469,7 @@ int sdp_media_cmp(sdp_media_t const *a, sdp_media_t const *b)
if (a->m_proto != b->m_proto)
return a->m_proto < b->m_proto ? -1 : 1;
if (a->m_proto == sdp_media_x)
if (a->m_proto == sdp_proto_x)
if ((rv = su_strcmp(a->m_proto_name, b->m_proto_name)))
return rv;
@@ -133,6 +133,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\apt.vsprops"
CharacterSet="1"
+2
View File
@@ -136,6 +136,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mpf.vsprops"
CharacterSet="1"
@@ -133,6 +133,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpclient.vsprops"
CharacterSet="1"
@@ -133,6 +133,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
+2
View File
@@ -135,6 +135,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcp.vsprops"
CharacterSet="1"
@@ -133,6 +133,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops"
CharacterSet="1"
@@ -135,6 +135,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops"
CharacterSet="1"
@@ -135,6 +135,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpv2transport.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops"
CharacterSet="1"
@@ -135,6 +135,8 @@
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="4"
InheritedPropertySheets="$(ProjectDir)..\..\build\vsprops\unirelease.vsprops;$(ProjectDir)..\..\build\vsprops\mrcpsignaling.vsprops;$(ProjectDir)..\..\build\vsprops\unirtsp.vsprops;$(ProjectDir)..\..\build\vsprops\sofiasip.vsprops"
CharacterSet="1"
+38 -17
View File
@@ -308,23 +308,44 @@ Sub CreateVersion(tmpFolder, VersionDir, includebase, includedest)
Const ForReading = 1
if strVerRev = "" Then
VersionCmd="fs_svnversion " & quote & VersionDir & "." & quote & " -n"
Set MyFile = fso.CreateTextFile(tmpFolder & "tmpVersion.Bat", True)
MyFile.WriteLine("@" & "cd " & quote & tmpFolder & quote )
MyFile.WriteLine("@" & VersionCmd)
MyFile.Close
Set oExec = WshShell.Exec("cmd /C " & quote & tmpFolder & "tmpVersion.Bat" & quote)
Do
strFromProc = OExec.StdOut.ReadLine()
VERSION=strFromProc
Loop While Not OExec.StdOut.atEndOfStream
sLastVersion = ""
Set sLastFile = FSO.OpenTextFile(tmpFolder & "lastversion", ForReading, true, OpenAsASCII)
If Not sLastFile.atEndOfStream Then
sLastVersion = sLastFile.ReadLine()
End If
sLastFile.Close
End If
if FSO.FolderExists(VersionDir & ".svn") Then
VersionCmd="fs_svnversion " & quote & VersionDir & "." & quote & " -n"
Set MyFile = fso.CreateTextFile(tmpFolder & "tmpVersion.Bat", True)
MyFile.WriteLine("@" & "cd " & quote & tmpFolder & quote )
MyFile.WriteLine("@" & VersionCmd)
MyFile.Close
Set oExec = WshShell.Exec("cmd /C " & quote & tmpFolder & "tmpVersion.Bat" & quote)
Do
strFromProc = OExec.StdOut.ReadLine()
VERSION="svn-" & strFromProc
Loop While Not OExec.StdOut.atEndOfStream
sLastVersion = ""
Set sLastFile = FSO.OpenTextFile(tmpFolder & "lastversion", ForReading, true, OpenAsASCII)
If Not sLastFile.atEndOfStream Then
sLastVersion = sLastFile.ReadLine()
End If
sLastFile.Close
End If
if FSO.FolderExists(VersionDir & ".git") Then
VersionCmd="git log --format=" & quote & "%%h %%ci" & quote & " -1 HEAD"
Set MyFile = FSO.CreateTextFile(tmpFolder & "tmpVersion.Bat", True)
MyFile.WriteLine("@" & "cd " & quote & VersionDir & quote)
MyFile.WriteLine("@" & VersionCmd)
MyFile.Close
Set oExec = WshShell.Exec("cmd /C " & quote & tmpFolder & "tmpVersion.Bat" & quote)
Do
strFromProc = Trim(OExec.StdOut.ReadLine())
VERSION="git-" & strFromProc
Loop While Not OExec.StdOut.atEndOfStream
sLastVersion = ""
Set sLastFile = FSO.OpenTextFile(tmpFolder & "lastversion", ForReading, true, OpenAsASCII)
If Not sLastFile.atEndOfStream Then
sLastVersion = sLastFile.ReadLine()
End If
sLastFile.Close
End If
End If
if strVerRev <> "" Then
VERSION = strVerRev