Merge branch 'master' of github.com:sustrik/zeromq2

This commit is contained in:
Martin Lucina 2010-02-03 15:54:39 +01:00
commit 72bbc92b70
4 changed files with 105 additions and 18 deletions

View File

@ -257,6 +257,10 @@
RelativePath="..\..\..\src\poll.cpp"
>
</File>
<File
RelativePath="..\..\..\src\prefix_tree.cpp"
>
</File>
<File
RelativePath="..\..\..\src\pub.cpp"
>
@ -511,6 +515,10 @@
RelativePath="..\..\..\src\poll.hpp"
>
</File>
<File
RelativePath="..\..\..\src\prefix_tree.hpp"
>
</File>
<File
RelativePath="..\..\..\src\pub.hpp"
>

View File

@ -98,6 +98,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zmq_queue", "zmq_queue\zmq_
{641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6}
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ruby", "ruby\ruby.vcproj", "{A758A62C-48E3-4C30-ACD2-63AA93391D07}"
ProjectSection(ProjectDependencies) = postProject
{641C5F36-32EE-4323-B740-992B651CF9D6} = {641C5F36-32EE-4323-B740-992B651CF9D6}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
@ -183,6 +188,10 @@ Global
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Debug|Win32.Build.0 = Debug|Win32
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Release|Win32.ActiveCfg = Release|Win32
{076F7B8B-5175-4CA9-BC2B-438E37F7F43E}.Release|Win32.Build.0 = Release|Win32
{A758A62C-48E3-4C30-ACD2-63AA93391D07}.Debug|Win32.ActiveCfg = Debug|Win32
{A758A62C-48E3-4C30-ACD2-63AA93391D07}.Debug|Win32.Build.0 = Debug|Win32
{A758A62C-48E3-4C30-ACD2-63AA93391D07}.Release|Win32.ActiveCfg = Release|Win32
{A758A62C-48E3-4C30-ACD2-63AA93391D07}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE

View File

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="ruby"
ProjectGUID="{A758A62C-48E3-4C30-ACD2-63AA93391D07}"
RootNamespace="ruby"
TargetFrameworkVersion="196613"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
UseOfMFC="0"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
CommandLine="cd ..\..\..\bindings\ruby&#x0D;&#x0A;ruby extconf.rb --with-libzmq-include=&quot;.\..\..\bindings\c&quot; --with-libzmq-lib=&quot;.\..\..\lib&quot;&#x0D;&#x0A;nmake&#x0D;&#x0A;mt.exe -manifest librbzmq.so.manifest -outputresource:librbzmq.so;2&#x0D;&#x0A;nmake install&#x0D;&#x0A;cd ..\..\builds\msvc\ruby"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@ -78,33 +78,35 @@ int zmq::pgm_socket_t::init (bool udp_encapsulation_, const char *network_)
nbytes_processed = 0;
pgm_msgv_processed = 0;
int rc;
GError *pgm_error = NULL;
// Init PGM transport.
// Init PGM transport if not already done.
// Ensure threading enabled, ensure timer enabled and find PGM protocol id.
//
// Note that if you want to use gettimeofday and sleep for openPGM timing,
// set environment variables PGM_TIMER to "GTOD"
// and PGM_SLEEP to "USLEEP".
int rc = pgm_init (&pgm_error);
if (rc != TRUE) {
if (!pgm_supported ()) {
rc = pgm_init (&pgm_error);
if (rc != TRUE) {
if (pgm_error->domain == PGM_IF_ERROR && (
pgm_error->code == PGM_IF_ERROR_INVAL ||
pgm_error->code == PGM_IF_ERROR_XDEV ||
pgm_error->code == PGM_IF_ERROR_NODEV ||
pgm_error->code == PGM_IF_ERROR_NOTUNIQ ||
pgm_error->code == PGM_IF_ERROR_ADDRFAMILY ||
pgm_error->code == PGM_IF_ERROR_FAMILY ||
pgm_error->code == PGM_IF_ERROR_NODATA ||
pgm_error->code == PGM_IF_ERROR_NONAME ||
pgm_error->code == PGM_IF_ERROR_SERVICE)) {
errno = EINVAL;
g_error_free (pgm_error);
return -1;
}
if (pgm_error->domain == PGM_IF_ERROR && (
pgm_error->code == PGM_IF_ERROR_INVAL ||
pgm_error->code == PGM_IF_ERROR_XDEV ||
pgm_error->code == PGM_IF_ERROR_NODEV ||
pgm_error->code == PGM_IF_ERROR_NOTUNIQ ||
pgm_error->code == PGM_IF_ERROR_ADDRFAMILY ||
pgm_error->code == PGM_IF_ERROR_FAMILY ||
pgm_error->code == PGM_IF_ERROR_NODATA ||
pgm_error->code == PGM_IF_ERROR_NONAME ||
pgm_error->code == PGM_IF_ERROR_SERVICE)) {
errno = EINVAL;
g_error_free (pgm_error);
return -1;
zmq_assert (false);
}
zmq_assert (false);
}
// PGM transport GSI.