[Freeswitch-svn] [commit] r2049 - in freeswitch/trunk: src/mod/event_handlers/mod_event_socket w32/vsnet

Freeswitch SVN mikej at freeswitch.org
Sat Jul 22 18:16:06 EDT 2006


Author: mikej
Date: Sat Jul 22 18:16:06 2006
New Revision: 2049

Modified:
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
   freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj
   freeswitch/trunk/w32/vsnet/Freeswitch.sln

Log:
add mod_event_socket to windows build.

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.c	Sat Jul 22 18:16:06 2006
@@ -213,9 +213,10 @@
 
 	if (!switch_test_flag(listener, LFLAG_AUTHED)) {
 		if (!strncasecmp(cmd, "auth ", 5)) {
+			char *pass;
 			strip_cr(cmd);
 
-			char *pass = cmd + 5;
+			pass = cmd + 5;
 
 			if (!strcmp(prefs.password, pass)) {
 				switch_set_flag_locked(listener, LFLAG_AUTHED);
@@ -406,7 +407,7 @@
 		}
 		
 		if (status == SWITCH_STATUS_BREAK) {
-			elapsed = time(NULL) - start;
+			elapsed = (uint32_t)(time(NULL) - start);
 			if (elapsed >= 15) {
 				switch_clear_flag_locked(listener, LFLAG_RUNNING);
 				break;
@@ -421,10 +422,10 @@
  done:
 
 	while(switch_test_flag(listener, LFLAG_RUNNING) && listen_list.ready) {
+		uint8_t do_sleep = 1;
 		len = sizeof(buf);
 		memset(buf, 0, len);
 		status = switch_socket_recv(listener->sock, buf, &len);
-		uint8_t do_sleep = 1;
 		
 		if (!len && status != SWITCH_STATUS_BREAK) {
 			break;
@@ -554,7 +555,7 @@
 				if (!strcmp(var, "listen-ip")) {
 					set_pref_ip(val);
 				} else if (!strcmp(var, "listen-port")) {
-					prefs.port = atoi(val);
+					prefs.port = (uint16_t)atoi(val);
 				} else if (!strcmp(var, "password")) {
 					set_pref_pass(val);
 				} 
@@ -586,7 +587,6 @@
     switch_sockaddr_t *sa;
     switch_socket_t  *inbound_socket = NULL;
 	listener_t *listener;
-	uint32_t count;
 
 	memset(&listen_list, 0, sizeof(listen_list));
 	config();
@@ -600,7 +600,6 @@
 
 	
 	for(;;) {
-		count++;
 		rv = switch_sockaddr_info_get(&sa, prefs.ip, APR_INET, prefs.port, 0, pool);
 		if (rv) goto fail;
 		rv = switch_socket_create(&listen_list.sock, sa->family, SOCK_STREAM, APR_PROTO_TCP, pool);

Modified: freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj
==============================================================================
--- freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj	(original)
+++ freeswitch/trunk/src/mod/event_handlers/mod_event_socket/mod_event_socket.vcproj	Sat Jul 22 18:16:06 2006
@@ -2,9 +2,9 @@
 <VisualStudioProject
 	ProjectType="Visual C++"
 	Version="8.00"
-	Name="mod_event_test"
-	ProjectGUID="{3A2A7795-C216-4FFF-B8EF-4D17A84BACCC}"
-	RootNamespace="mod_event_test"
+	Name="mod_event_socket"
+	ProjectGUID="{05515420-16DE-4E63-BE73-85BE85BA5142}"
+	RootNamespace="mod_event_socket"
 	Keyword="Win32Proj"
 	>
 	<Platforms>
@@ -63,13 +63,13 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
+				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
 				LinkIncremental="2"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
-				ProgramDatabaseFile="$(OutDir)/mod_event_test.pdb"
+				ProgramDatabaseFile="$(OutDir)/mod_event_socket.pdb"
 				SubSystem="2"
-				ImportLibrary="$(OutDir)/mod_event_test.lib"
+				ImportLibrary="$(OutDir)/mod_event_socket.lib"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -142,14 +142,14 @@
 			/>
 			<Tool
 				Name="VCLinkerTool"
-				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_test.dll"
+				OutputFile="..\..\..\..\w32\vsnet\$(OutDir)/mod/mod_event_socket.dll"
 				LinkIncremental="1"
 				AdditionalLibraryDirectories="..\..\..\..\w32\vsnet\$(OutDir)"
 				GenerateDebugInformation="true"
 				SubSystem="2"
 				OptimizeReferences="2"
 				EnableCOMDATFolding="2"
-				ImportLibrary="$(OutDir)/mod_event_test.lib"
+				ImportLibrary="$(OutDir)/mod_event_socket.lib"
 				TargetMachine="1"
 			/>
 			<Tool
@@ -187,7 +187,7 @@
 			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
 			>
 			<File
-				RelativePath=".\mod_event_test.c"
+				RelativePath=".\mod_event_socket.c"
 				>
 			</File>
 		</Filter>

Modified: freeswitch/trunk/w32/vsnet/Freeswitch.sln
==============================================================================
--- freeswitch/trunk/w32/vsnet/Freeswitch.sln	(original)
+++ freeswitch/trunk/w32/vsnet/Freeswitch.sln	Sat Jul 22 18:16:06 2006
@@ -216,6 +216,11 @@
 		{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
 	EndProjectSection
 EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mod_event_socket", "..\..\src\mod\event_handlers\mod_event_socket\mod_event_socket.vcproj", "{05515420-16DE-4E63-BE73-85BE85BA5142}"
+	ProjectSection(ProjectDependencies) = postProject
+		{202D7A4E-760D-4D0E-AFA1-D7459CED30FF} = {202D7A4E-760D-4D0E-AFA1-D7459CED30FF}
+	EndProjectSection
+EndProject
 Global
 	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 		Debug|Win32 = Debug|Win32
@@ -370,6 +375,10 @@
 		{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Debug|Win32.Build.0 = Debug|Win32
 		{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.ActiveCfg = Release|Win32
 		{B5881A85-FE70-4F64-8607-2CAAE52669C6}.Release|Win32.Build.0 = Release|Win32
+		{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|Win32.ActiveCfg = Debug|Win32
+		{05515420-16DE-4E63-BE73-85BE85BA5142}.Debug|Win32.Build.0 = Debug|Win32
+		{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|Win32.ActiveCfg = Release|Win32
+		{05515420-16DE-4E63-BE73-85BE85BA5142}.Release|Win32.Build.0 = Release|Win32
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
 		HideSolutionNode = FALSE
@@ -385,6 +394,7 @@
 		{F10BE67C-A8FF-4CB2-AF29-D46D2590DC59} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
 		{C7705DC4-2088-493E-AF8D-65BC6D65C125} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
 		{784113EF-44D9-4949-835D-7065D3C7AD08} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
+		{05515420-16DE-4E63-BE73-85BE85BA5142} = {9ADF1E48-2F5C-4ED7-A893-596259FABFE0}
 		{AFAC0568-7548-42D5-9F6A-8D3400A1E4F6} = {A5A27244-AD24-46E5-B01B-840CD296C91D}
 		{78100236-7CEA-4948-96CC-E8ED3160329C} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}
 		{E1794405-29D4-466D-9BE3-DD2344C2A663} = {E72B5BCB-6462-4D23-B419-3AF1A4AC3D78}



More information about the Freeswitch-svn mailing list