[jira] [Updated] (THRIFT-1257) thrift's dependency scope on javax.servlet:servlet-api should be 'provided'

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1257:
-

Attachment: thrift-1257.patch

Changes scope of javax.servlet to provided so containers using the 
TServlet.java class can provided the desired servlet api

> thrift's dependency scope on javax.servlet:servlet-api should be 'provided' 
> 
>
> Key: THRIFT-1257
> URL: https://issues.apache.org/jira/browse/THRIFT-1257
> Project: Thrift
>  Issue Type: Dependency upgrade
>  Components: Java - Library
>Affects Versions: 0.6.1
> Environment: Tomcat 7.x
> Tested on Mac OS X 10.6.8 
>Reporter: Shashwat Agarwal
>Priority: Minor
>  Labels: javax.servlet.Servlet, maven, servlet-api, thrift
> Fix For: 0.8
>
> Attachments: thrift-1257.patch
>
>
> libthrift 0.6.1 pom (org.apache.thrift:libthrift-0.6.1) specifies 
> javax.servlet:servlet-api-2.5 as compulsory dependency. This causes the jar 
> depending on this libthrift to be skipped by Tomcat with the following error:
> {noformat} 
> INFO: 
> validateJarFile(/usr/local/apache-tomcat-7.0.2/webapps/mywebapp/WEB-INF/lib/my-service-1.0.0.jar)
>  - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
> javax/servlet/Servlet.class
> {noformat} 
> _Workaround_
> While including libthrift-0.6.1 as dependency in maven pom, exclude 
> javax.servlet:servlet-api using exclusions as:
> {noformat} 
> 
> org.apache.thrift
> libthrift
> 0.6.1
> 
> 
> javax.servlet
> servlet-api
> 
> 
> 
> {noformat} 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1257) thrift's dependency scope on javax.servlet:servlet-api should be 'provided'

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1257?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1257:
-

  Component/s: Java - Library
Fix Version/s: 0.8
 Assignee: Jake Farrell

> thrift's dependency scope on javax.servlet:servlet-api should be 'provided' 
> 
>
> Key: THRIFT-1257
> URL: https://issues.apache.org/jira/browse/THRIFT-1257
> Project: Thrift
>  Issue Type: Dependency upgrade
>  Components: Java - Library
>Affects Versions: 0.6.1
> Environment: Tomcat 7.x
> Tested on Mac OS X 10.6.8 
>Reporter: Shashwat Agarwal
>Assignee: Jake Farrell
>Priority: Minor
>  Labels: javax.servlet.Servlet, maven, servlet-api, thrift
> Fix For: 0.8
>
> Attachments: thrift-1257.patch
>
>
> libthrift 0.6.1 pom (org.apache.thrift:libthrift-0.6.1) specifies 
> javax.servlet:servlet-api-2.5 as compulsory dependency. This causes the jar 
> depending on this libthrift to be skipped by Tomcat with the following error:
> {noformat} 
> INFO: 
> validateJarFile(/usr/local/apache-tomcat-7.0.2/webapps/mywebapp/WEB-INF/lib/my-service-1.0.0.jar)
>  - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class: 
> javax/servlet/Servlet.class
> {noformat} 
> _Workaround_
> While including libthrift-0.6.1 as dependency in maven pom, exclude 
> javax.servlet:servlet-api using exclusions as:
> {noformat} 
> 
> org.apache.thrift
> libthrift
> 0.6.1
> 
> 
> javax.servlet
> servlet-api
> 
> 
> 
> {noformat} 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1265) C++ container deserialize

2011-08-16 Thread Peng Futian (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peng Futian updated THRIFT-1265:


Attachment: 0001-Fix-bug-generate_deserialize_container.patch

fix c++ container deserialize bug

> C++ container deserialize
> -
>
> Key: THRIFT-1265
> URL: https://issues.apache.org/jira/browse/THRIFT-1265
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.6.1, 0.7
> Environment: Linux RedHat
>Reporter: Peng Futian
>  Labels: patch
> Attachments: 0001-Fix-bug-generate_deserialize_container.patch
>
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> When C++ container deserialize, Not set it's read length.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (THRIFT-1265) C++ container deserialize

2011-08-16 Thread Peng Futian (JIRA)
C++ container deserialize
-

 Key: THRIFT-1265
 URL: https://issues.apache.org/jira/browse/THRIFT-1265
 Project: Thrift
  Issue Type: Bug
  Components: C++ - Compiler
Affects Versions: 0.7, 0.6.1
 Environment: Linux RedHat
Reporter: Peng Futian


When C++ container deserialize, Not set it's read length.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Reopened] (THRIFT-1265) C++ container deserialize

2011-08-16 Thread Peng Futian (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peng Futian reopened THRIFT-1265:
-


> C++ container deserialize
> -
>
> Key: THRIFT-1265
> URL: https://issues.apache.org/jira/browse/THRIFT-1265
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.6.1, 0.7
> Environment: Linux RedHat
>Reporter: Peng Futian
>  Labels: patch
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> When C++ container deserialize, Not set it's read length.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Resolved] (THRIFT-1265) C++ container deserialize

2011-08-16 Thread Peng Futian (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Peng Futian resolved THRIFT-1265.
-

Resolution: Fixed

> C++ container deserialize
> -
>
> Key: THRIFT-1265
> URL: https://issues.apache.org/jira/browse/THRIFT-1265
> Project: Thrift
>  Issue Type: Bug
>  Components: C++ - Compiler
>Affects Versions: 0.6.1, 0.7
> Environment: Linux RedHat
>Reporter: Peng Futian
>  Labels: patch
>   Original Estimate: 1m
>  Remaining Estimate: 1m
>
> When C++ container deserialize, Not set it's read length.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (THRIFT-380) Use setuptools for python build

2011-08-16 Thread Jake Farrell (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-380?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086113#comment-13086113
 ] 

Jake Farrell commented on THRIFT-380:
-

Adding try/except to allow for a build to occur without setuptools. Using 
setuptools to start pushing released client version to pypi, patch for 
publishing to follow shortly

> Use setuptools for python build
> ---
>
> Key: THRIFT-380
> URL: https://issues.apache.org/jira/browse/THRIFT-380
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Library
>Reporter: Ben Maurer
>Assignee: Jake Farrell
>
> We should use setuptools for the python build as this allows thrift to be 
> distributed as an egg file:
> {quote}
> Index: setup.py
> ===
> --- setup.py  (revision 755803)
> +++ setup.py  (working copy)
> @@ -5,9 +5,8 @@
>  #
>  # See accompanying file LICENSE or visit the Thrift site at:
>  # http://developers.facebook.com/thrift/
> +from setuptools import setup, Extension
> -from distutils.core import setup, Extension
>  fastbinarymod = Extension('thrift.protocol.fastbinary',
>sources = ['src/protocol/fastbinary.c'],
>)
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (THRIFT-380) Use setuptools for python build

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-380?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell reassigned THRIFT-380:
---

Assignee: Jake Farrell

> Use setuptools for python build
> ---
>
> Key: THRIFT-380
> URL: https://issues.apache.org/jira/browse/THRIFT-380
> Project: Thrift
>  Issue Type: Bug
>  Components: Python - Library
>Reporter: Ben Maurer
>Assignee: Jake Farrell
>
> We should use setuptools for the python build as this allows thrift to be 
> distributed as an egg file:
> {quote}
> Index: setup.py
> ===
> --- setup.py  (revision 755803)
> +++ setup.py  (working copy)
> @@ -5,9 +5,8 @@
>  #
>  # See accompanying file LICENSE or visit the Thrift site at:
>  # http://developers.facebook.com/thrift/
> +from setuptools import setup, Extension
> -from distutils.core import setup, Extension
>  fastbinarymod = Extension('thrift.protocol.fastbinary',
>sources = ['src/protocol/fastbinary.c'],
>)
> {quote}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (THRIFT-1110) Thrift Twisted Timeouts

2011-08-16 Thread Dan Di Spaltro (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-1110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13086106#comment-13086106
 ] 

Dan Di Spaltro commented on THRIFT-1110:


I will be out of contact for the week.  Please contact Stephen Nolan
in my absence stephen.no...@rackspace.com

-- 
Dan Di Spaltro


> Thrift Twisted Timeouts
> ---
>
> Key: THRIFT-1110
> URL: https://issues.apache.org/jira/browse/THRIFT-1110
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Reporter: Dan Di Spaltro
>
> Is there any way we could add timeout support to Twisted Thrift bindings? The 
> way you can achieve this is basically errback'ing the deferred, and then when 
> it comes back, it throws an AlreadyCalledError. There are a bunch of ways to 
> fix this, just not sure the best way. Any ideas?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1110) Thrift Twisted Timeouts

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1110?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1110:
-

Component/s: Python - Library

> Thrift Twisted Timeouts
> ---
>
> Key: THRIFT-1110
> URL: https://issues.apache.org/jira/browse/THRIFT-1110
> Project: Thrift
>  Issue Type: Improvement
>  Components: Python - Library
>Reporter: Dan Di Spaltro
>
> Is there any way we could add timeout support to Twisted Thrift bindings? The 
> way you can achieve this is basically errback'ing the deferred, and then when 
> it comes back, it throws an AlreadyCalledError. There are a bunch of ways to 
> fix this, just not sure the best way. Any ideas?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Assigned] (THRIFT-1128) MAC OS X: thrift.h incompatibility with Thrift.h

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell reassigned THRIFT-1128:


Assignee: Jake Farrell

> MAC OS X: thrift.h incompatibility with Thrift.h
> 
>
> Key: THRIFT-1128
> URL: https://issues.apache.org/jira/browse/THRIFT-1128
> Project: Thrift
>  Issue Type: Bug
>Affects Versions: 0.6
> Environment: Mac OS X 10.6.7
>Reporter: Mina Naguib
>Assignee: Jake Farrell
>  Labels: C, C++, CPP, Thrift.h, c_glib, thrift.h
> Attachments: thrift-1128.patch
>
>
> The default filesystem on Mac OS X is case-insensitive
> If thrift is compiled with c_glib support, upon install, the "thrift.h" 
> installed by c_glib trumps the classical "Thrift.h" C++ header.
> C++ apps afterwards fail to compile (for obvious reasons).
> Had to re-compile+install libthrift *without* c_glib support to get back the 
> original contents of Thrift.h needed for C++ support

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1128) MAC OS X: thrift.h incompatibility with Thrift.h

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1128:
-

Attachment: thrift-1128.patch

Thoughts on moving the client from ${prefix}/include/thrift to 
${prefix}/include/thrift/client/g_libc to avoid collisions on thrift.h ?

> MAC OS X: thrift.h incompatibility with Thrift.h
> 
>
> Key: THRIFT-1128
> URL: https://issues.apache.org/jira/browse/THRIFT-1128
> Project: Thrift
>  Issue Type: Bug
>Affects Versions: 0.6
> Environment: Mac OS X 10.6.7
>Reporter: Mina Naguib
>  Labels: C, C++, CPP, Thrift.h, c_glib, thrift.h
> Attachments: thrift-1128.patch
>
>
> The default filesystem on Mac OS X is case-insensitive
> If thrift is compiled with c_glib support, upon install, the "thrift.h" 
> installed by c_glib trumps the classical "Thrift.h" C++ header.
> C++ apps afterwards fail to compile (for obvious reasons).
> Had to re-compile+install libthrift *without* c_glib support to get back the 
> original contents of Thrift.h needed for C++ support

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




Re: Some bug with t_cpp_generator::generate_deserialize_container

2011-08-16 Thread Jake Farrell
If you would like to file a ticket for this issue please do so at 
http://issues.apache.org/jira/browse/thrift and attach the patch with ASF 
inclusion and we will gladly take a look into this.

Thank you
-Jake

On Aug 10, 2011, at 8:01 PM, ftpeng wrote:

> Signed-off-by: ftpeng 
> ---
> compiler/cpp/src/generate/t_cpp_generator.cc |   12 ++--
> 1 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc 
> b/compiler/cpp/src/generate/t_cpp_generator.cc
> index 472644e..7e64832 100755
> --- a/compiler/cpp/src/generate/t_cpp_generator.cc
> +++ b/compiler/cpp/src/generate/t_cpp_generator.cc
> @@ -3448,17 +3448,17 @@ void 
> t_cpp_generator::generate_deserialize_container(ofstream& out,
> out <<
>   indent() << "::apache::thrift::protocol::TType " << ktype << ";" << 
> endl <<
>   indent() << "::apache::thrift::protocol::TType " << vtype << ";" << 
> endl <<
> -  indent() << "iprot->readMapBegin(" <<
> +  indent() << "xfer += iprot->readMapBegin(" <<
>ktype << ", " << vtype << ", " << size << ");" << endl;
>   } else if (ttype->is_set()) {
> out <<
>   indent() << "::apache::thrift::protocol::TType " << etype << ";" << 
> endl <<
> -  indent() << "iprot->readSetBegin(" <<
> +  indent() << "xfer += iprot->readSetBegin(" <<
>etype << ", " << size << ");" << endl;
>   } else if (ttype->is_list()) {
> out <<
>   indent() << "::apache::thrift::protocol::TType " << etype << ";" << 
> endl <<
> -  indent() << "iprot->readListBegin(" <<
> +  indent() << "xfer += iprot->readListBegin(" <<
>   etype << ", " << size << ");" << endl;
> if (!use_push) {
>   indent(out) << prefix << ".resize(" << size << ");" << endl;
> @@ -3486,11 +3486,11 @@ void 
> t_cpp_generator::generate_deserialize_container(ofstream& out,
> 
>   // Read container end
>   if (ttype->is_map()) {
> -indent(out) << "iprot->readMapEnd();" << endl;
> +indent(out) << "xfer += iprot->readMapEnd();" << endl;
>   } else if (ttype->is_set()) {
> -indent(out) << "iprot->readSetEnd();" << endl;
> +indent(out) << "xfer += iprot->readSetEnd();" << endl;
>   } else if (ttype->is_list()) {
> -indent(out) << "iprot->readListEnd();" << endl;
> +indent(out) << "xfer += iprot->readListEnd();" << endl;
>   }
> 
>   scope_down(out);
> -- 
> 1.7.6.msysgit.0
> 
> <0001-Fix-bug-generate_deserialize_container.patch>

On Aug 16, 2011, at 8:19 PM, 彭福田 wrote:

> Please fix it
> 
> -邮件原件-
> 发件人: jfarr...@apache.org [mailto:jfarr...@apache.org] 
> 发送时间: 2011年8月17日 01:14
> 收件人: comm...@thrift.apache.org
> 主题: svn commit: r1158383 - /thrift/trunk/lib/rb/Rakefile
> 
> Author: jfarrell
> Date: Tue Aug 16 17:13:41 2011
> New Revision: 1158383
> 
> URL: http://svn.apache.org/viewvc?rev=1158383&view=rev
> Log:
> Thrift-1263: Updating rb client Rakefile to add suport for publishing client 
> to rubygems.org
> Client: Ruby
> Patch: Jfarrell
> 
> Updating Rakefile to remove deprecated functions and add support for 
> publishing to rubgems.org
> 
> 
> 
> Modified:
>thrift/trunk/lib/rb/Rakefile
> 
> Modified: thrift/trunk/lib/rb/Rakefile
> URL: 
> http://svn.apache.org/viewvc/thrift/trunk/lib/rb/Rakefile?rev=1158383&r1=1158382&r2=1158383&view=diff
> ==
> --- thrift/trunk/lib/rb/Rakefile (original)
> +++ thrift/trunk/lib/rb/Rakefile Tue Aug 16 17:13:41 2011
> @@ -19,7 +19,7 @@
> 
> require 'rubygems'
> require 'rake'
> -require 'spec/rake/spectask'
> +require 'rspec/core/rake_task'
> 
> THRIFT = '../../compiler/cpp/thrift'
> 
> @@ -27,14 +27,12 @@ task :default => [:spec]
> 
> task :spec => [:'gen-rb', :realspec]
> 
> -Spec::Rake::SpecTask.new(:realspec) do |t|
> -  t.spec_files = FileList['spec/**/*_spec.rb']
> -  t.spec_opts = ['--color']
> +RSpec::Core::RakeTask.new(:realspec) do |t|
> +  t.rspec_opts = ['--color']
> end
> 
> -Spec::Rake::SpecTask.new(:'spec:rcov') do |t|
> -  t.spec_files = FileList['spec/**/*_spec.rb']
> -  t.spec_opts = ['--color']
> +RSpec::Core::RakeTask.new(:'spec:rcov') do |t|
> +  t.rspec_opts = ['--color']
>   t.rcov = true
>   t.rcov_opts = ['--exclude', '^spec,/gems/']
> end
> @@ -102,3 +100,4 @@ rescue LoadError
> end
>   end
> end
> +
> 



Some bug with t_cpp_generator::generate_deserialize_container

2011-08-16 Thread 彭福田
Please fix it

-邮件原件-
发件人: jfarr...@apache.org [mailto:jfarr...@apache.org] 
发送时间: 2011年8月17日 01:14
收件人: comm...@thrift.apache.org
主题: svn commit: r1158383 - /thrift/trunk/lib/rb/Rakefile

Author: jfarrell
Date: Tue Aug 16 17:13:41 2011
New Revision: 1158383

URL: http://svn.apache.org/viewvc?rev=1158383&view=rev
Log:
Thrift-1263: Updating rb client Rakefile to add suport for publishing client to 
rubygems.org
Client: Ruby
Patch: Jfarrell

Updating Rakefile to remove deprecated functions and add support for publishing 
to rubgems.org



Modified:
thrift/trunk/lib/rb/Rakefile

Modified: thrift/trunk/lib/rb/Rakefile
URL: 
http://svn.apache.org/viewvc/thrift/trunk/lib/rb/Rakefile?rev=1158383&r1=1158382&r2=1158383&view=diff
==
--- thrift/trunk/lib/rb/Rakefile (original)
+++ thrift/trunk/lib/rb/Rakefile Tue Aug 16 17:13:41 2011
@@ -19,7 +19,7 @@
 
 require 'rubygems'
 require 'rake'
-require 'spec/rake/spectask'
+require 'rspec/core/rake_task'
 
 THRIFT = '../../compiler/cpp/thrift'
 
@@ -27,14 +27,12 @@ task :default => [:spec]
 
 task :spec => [:'gen-rb', :realspec]
 
-Spec::Rake::SpecTask.new(:realspec) do |t|
-  t.spec_files = FileList['spec/**/*_spec.rb']
-  t.spec_opts = ['--color']
+RSpec::Core::RakeTask.new(:realspec) do |t|
+  t.rspec_opts = ['--color']
 end
 
-Spec::Rake::SpecTask.new(:'spec:rcov') do |t|
-  t.spec_files = FileList['spec/**/*_spec.rb']
-  t.spec_opts = ['--color']
+RSpec::Core::RakeTask.new(:'spec:rcov') do |t|
+  t.rspec_opts = ['--color']
   t.rcov = true
   t.rcov_opts = ['--exclude', '^spec,/gems/']
 end
@@ -102,3 +100,4 @@ rescue LoadError
 end
   end
 end
+



[jira] [Updated] (THRIFT-1264) TSocketClient is queried by run loop after deallocation

2011-08-16 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/THRIFT-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Rüth updated THRIFT-1264:
-

Attachment: THRIFT-1264.diff

svn diff transport/TSocketClient.m transport/TSocketClient.m

> TSocketClient is queried by run loop after deallocation
> ---
>
> Key: THRIFT-1264
> URL: https://issues.apache.org/jira/browse/THRIFT-1264
> Project: Thrift
>  Issue Type: Bug
>  Components: Cocoa - Library
>Affects Versions: 0.7
> Environment: iPad, iOS SDK 4.3
>Reporter: Jan Rüth
> Attachments: THRIFT-1264.diff
>
>
> When using TSocketClient in a Cocoa client and correctly managing the memory:
> {code:title=Server.m|borderStyle=solid}
> - (id)initWithServer:(NSString*)server port:(NSInteger)port
> {
> self = [super init];
> if (self) {
> TSocketClient *transport = [[TSocketClient alloc] 
> initWithHostname:server 
>port:port];
> TBinaryProtocol *protocol = [[TBinaryProtocolFactory sharedFactory] 
> newProtocolOnTransport:transport];
> Client *client = [[Client alloc] initWithProtocol:protocol];
> // self.client is a retained property
> self.client = client;
> [client release];
> [protocol release];
> [transport release];
> }
> 
> return self;
> }
> - (void)dealloc {
> self.client = nil;
> [super dealloc];
> }
> {code}
> (maybe this should be fixed in the cocoa example, memory management is 
> erroneous there)
> After successfully releasing the object with the code above. One gets a 
> EXC_BAD_ACCESS signal because the runloop send a responseToSelector: message 
> to our object. With the selector stream:handleEvent:
> This all leads to TSocketClient which opens two NSStream objects and 
> delegates it self to both, afterwards both Streams are scheduled in the 
> runloop, which should actually notify the delegate when something happens to 
> the stream like data is available, this obviously results in the runloop 
> asking TSocketClient for previously described selector. However this 
> mechanism is not used, the TNSStreamTransport class is subclassed and 
> responsible for read/write.
> So why are the Streams schedules in the run loop in the first place?
> Why are the streams not closed and released when the object gets deallocated?
> I could fix this behavior by implementing a dealloc method in TSocketClient 
> and making the Streams member variables
> {code:title=TSocketClient.h|borderStyle=solid}
> @interface TSocketClient : TNSStreamTransport {
> NSInputStream * inputStream;
>   NSOutputStream * outputStream;
> }
> {code}
> {code:title=TSocketClient.m|borderStyle=solid}
> -(void)dealloc {
> [inputStream close];
> [outputStream close];
> [inputStream release];
> [outputStream release];
> [super dealloc];
> }
> {code}
> However I still don't know if that is the right way.
> Suggestions?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1264) TSocketClient is queried by run loop after deallocation

2011-08-16 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/THRIFT-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Rüth updated THRIFT-1264:
-

Patch Info: [Patch Available]

> TSocketClient is queried by run loop after deallocation
> ---
>
> Key: THRIFT-1264
> URL: https://issues.apache.org/jira/browse/THRIFT-1264
> Project: Thrift
>  Issue Type: Bug
>  Components: Cocoa - Library
>Affects Versions: 0.7
> Environment: iPad, iOS SDK 4.3
>Reporter: Jan Rüth
> Attachments: THRIFT-1264.diff
>
>
> When using TSocketClient in a Cocoa client and correctly managing the memory:
> {code:title=Server.m|borderStyle=solid}
> - (id)initWithServer:(NSString*)server port:(NSInteger)port
> {
> self = [super init];
> if (self) {
> TSocketClient *transport = [[TSocketClient alloc] 
> initWithHostname:server 
>port:port];
> TBinaryProtocol *protocol = [[TBinaryProtocolFactory sharedFactory] 
> newProtocolOnTransport:transport];
> Client *client = [[Client alloc] initWithProtocol:protocol];
> // self.client is a retained property
> self.client = client;
> [client release];
> [protocol release];
> [transport release];
> }
> 
> return self;
> }
> - (void)dealloc {
> self.client = nil;
> [super dealloc];
> }
> {code}
> (maybe this should be fixed in the cocoa example, memory management is 
> erroneous there)
> After successfully releasing the object with the code above. One gets a 
> EXC_BAD_ACCESS signal because the runloop send a responseToSelector: message 
> to our object. With the selector stream:handleEvent:
> This all leads to TSocketClient which opens two NSStream objects and 
> delegates it self to both, afterwards both Streams are scheduled in the 
> runloop, which should actually notify the delegate when something happens to 
> the stream like data is available, this obviously results in the runloop 
> asking TSocketClient for previously described selector. However this 
> mechanism is not used, the TNSStreamTransport class is subclassed and 
> responsible for read/write.
> So why are the Streams schedules in the run loop in the first place?
> Why are the streams not closed and released when the object gets deallocated?
> I could fix this behavior by implementing a dealloc method in TSocketClient 
> and making the Streams member variables
> {code:title=TSocketClient.h|borderStyle=solid}
> @interface TSocketClient : TNSStreamTransport {
> NSInputStream * inputStream;
>   NSOutputStream * outputStream;
> }
> {code}
> {code:title=TSocketClient.m|borderStyle=solid}
> -(void)dealloc {
> [inputStream close];
> [outputStream close];
> [inputStream release];
> [outputStream release];
> [super dealloc];
> }
> {code}
> However I still don't know if that is the right way.
> Suggestions?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (THRIFT-1264) TSocketClient is queried by run loop after deallocation

2011-08-16 Thread JIRA
TSocketClient is queried by run loop after deallocation
---

 Key: THRIFT-1264
 URL: https://issues.apache.org/jira/browse/THRIFT-1264
 Project: Thrift
  Issue Type: Bug
  Components: Cocoa - Library
Affects Versions: 0.7
 Environment: iPad, iOS SDK 4.3
Reporter: Jan Rüth
Priority: Critical


When using TSocketClient in a Cocoa client and correctly managing the memory:
{code:title=Server.m|borderStyle=solid}
- (id)initWithServer:(NSString*)server port:(NSInteger)port
{
self = [super init];
if (self) {
TSocketClient *transport = [[TSocketClient alloc] 
initWithHostname:server 
   port:port];
TBinaryProtocol *protocol = [[TBinaryProtocolFactory sharedFactory] 
newProtocolOnTransport:transport];
Client *client = [[Client alloc] initWithProtocol:protocol];

// self.client is a retained property
self.client = client;
[client release];
[protocol release];
[transport release];
}

return self;
}


- (void)dealloc {
self.client = nil;
[super dealloc];
}
{code}
(maybe this should be fixed in the cocoa example, memory management is 
erroneous there)

After successfully releasing the object with the code above. One gets a 
EXC_BAD_ACCESS signal because the runloop send a responseToSelector: message to 
our object. With the selector stream:handleEvent:

This all leads to TSocketClient which opens two NSStream objects and delegates 
it self to both, afterwards both Streams are scheduled in the runloop, which 
should actually notify the delegate when something happens to the stream like 
data is available, this obviously results in the runloop asking TSocketClient 
for previously described selector. However this mechanism is not used, the 
TNSStreamTransport class is subclassed and responsible for read/write.

So why are the Streams schedules in the run loop in the first place?
Why are the streams not closed and released when the object gets deallocated?

I could fix this behavior by implementing a dealloc method in TSocketClient and 
making the Streams member variables
{code:title=TSocketClient.h|borderStyle=solid}
@interface TSocketClient : TNSStreamTransport {
NSInputStream * inputStream;
NSOutputStream * outputStream;
}
{code}

{code:title=TSocketClient.m|borderStyle=solid}
-(void)dealloc {
[inputStream close];
[outputStream close];
[inputStream release];
[outputStream release];
[super dealloc];
}
{code}
However I still don't know if that is the right way.
Suggestions?



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1264) TSocketClient is queried by run loop after deallocation

2011-08-16 Thread JIRA

 [ 
https://issues.apache.org/jira/browse/THRIFT-1264?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jan Rüth updated THRIFT-1264:
-

Priority: Major  (was: Critical)

> TSocketClient is queried by run loop after deallocation
> ---
>
> Key: THRIFT-1264
> URL: https://issues.apache.org/jira/browse/THRIFT-1264
> Project: Thrift
>  Issue Type: Bug
>  Components: Cocoa - Library
>Affects Versions: 0.7
> Environment: iPad, iOS SDK 4.3
>Reporter: Jan Rüth
>
> When using TSocketClient in a Cocoa client and correctly managing the memory:
> {code:title=Server.m|borderStyle=solid}
> - (id)initWithServer:(NSString*)server port:(NSInteger)port
> {
> self = [super init];
> if (self) {
> TSocketClient *transport = [[TSocketClient alloc] 
> initWithHostname:server 
>port:port];
> TBinaryProtocol *protocol = [[TBinaryProtocolFactory sharedFactory] 
> newProtocolOnTransport:transport];
> Client *client = [[Client alloc] initWithProtocol:protocol];
> // self.client is a retained property
> self.client = client;
> [client release];
> [protocol release];
> [transport release];
> }
> 
> return self;
> }
> - (void)dealloc {
> self.client = nil;
> [super dealloc];
> }
> {code}
> (maybe this should be fixed in the cocoa example, memory management is 
> erroneous there)
> After successfully releasing the object with the code above. One gets a 
> EXC_BAD_ACCESS signal because the runloop send a responseToSelector: message 
> to our object. With the selector stream:handleEvent:
> This all leads to TSocketClient which opens two NSStream objects and 
> delegates it self to both, afterwards both Streams are scheduled in the 
> runloop, which should actually notify the delegate when something happens to 
> the stream like data is available, this obviously results in the runloop 
> asking TSocketClient for previously described selector. However this 
> mechanism is not used, the TNSStreamTransport class is subclassed and 
> responsible for read/write.
> So why are the Streams schedules in the run loop in the first place?
> Why are the streams not closed and released when the object gets deallocated?
> I could fix this behavior by implementing a dealloc method in TSocketClient 
> and making the Streams member variables
> {code:title=TSocketClient.h|borderStyle=solid}
> @interface TSocketClient : TNSStreamTransport {
> NSInputStream * inputStream;
>   NSOutputStream * outputStream;
> }
> {code}
> {code:title=TSocketClient.m|borderStyle=solid}
> -(void)dealloc {
> [inputStream close];
> [outputStream close];
> [inputStream release];
> [outputStream release];
> [super dealloc];
> }
> {code}
> However I still don't know if that is the right way.
> Suggestions?

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Commented] (THRIFT-1263) publish ruby client to rubygems

2011-08-16 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/THRIFT-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13085866#comment-13085866
 ] 

Hudson commented on THRIFT-1263:


Integrated in Thrift #220 (See [https://builds.apache.org/job/Thrift/220/])
Thrift-1263: Updating rb client Rakefile to add suport for publishing 
client to rubygems.org
Client: Ruby
Patch: Jfarrell

Updating Rakefile to remove deprecated functions and add support for publishing 
to rubgems.org


> publish ruby client to rubygems
> ---
>
> Key: THRIFT-1263
> URL: https://issues.apache.org/jira/browse/THRIFT-1263
> Project: Thrift
>  Issue Type: Bug
>  Components: Ruby - Compiler
>Affects Versions: 0.7
>Reporter: Jake Farrell
>Assignee: Jake Farrell
> Fix For: 0.8
>
> Attachments: thrift-1263.patch
>
>
> As part of the release process release gem to rubygems.org

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




Build failed in Jenkins: Thrift #220

2011-08-16 Thread Apache Jenkins Server
See 

Changes:

[jfarrell] Thrift-1263: Updating rb client Rakefile to add suport for 
publishing client to rubygems.org
Client: Ruby
Patch: Jfarrell

Updating Rakefile to remove deprecated functions and add support for publishing 
to rubgems.org

--
[...truncated 2106 lines...]
make[2]: Leaving directory 
`
Making check in js/test
make[2]: Entering directory 
`
make  check-local
make[3]: Entering directory 
`
/home/hudson/tools/ant/latest/bin/ant -Dtest.junit.output.format=xml test
Buildfile: 


generate:

check-gjslint:
 [echo] check if gjslint is available:
 [exec] Execute failed: java.io.IOException: Cannot run program "gjslint": 
java.io.IOException: error=2, No such file or directory

gjslint:

resolve:
 [copy] Copying 36 files to 


jslint:

lint:

dependencies:

init:
[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 

[mkdir] Created dir: 


xvfb:
 [echo] check if Xvfb is available:
 [exec] Result: 1

phantomjs:
 [echo] check if phantomjs is available:
 [exec] Execute failed: java.io.IOException: Cannot run program 
"phantomjs": java.io.IOException: error=2, No such file or directory

compile:
[javac] Compiling 21 source files to 

[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
[javac] Compiling 1 source file to 

[javac] Note: 

 uses unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

jstest:
  [jar] Building jar: 


proxy:

jslibs:
  [get] Getting: http://code.jquery.com/jquery-1.5.2.js
  [get] To: 

  [get] Getting: 
http://js-test-driver.googlecode.com/svn/trunk/JsTestDriver/contrib/qunit/src/equiv.js
  [get] To: 

  [get] Getting: 
http://js-test-driver.googlecode.com/svn/trunk/JsTestDriver/contrib/qunit/src/QUnitAdapter.js
  [get] To: 

  [get] Getting: http://code.jquery.com/qunit/git/qunit.js
  [get] To: 

  [get] Getting: http://code.jquery.com/qunit/git/qunit.css
  [get] To: 

 [copy] Copying 1 file to 


unittest:

test:

BUILD SUCCESSFUL
Total time: 10 seconds
make[3]: Leaving directory 
`
make[2]: Leaving directory 
`
Making check in py
make[2]: Entering directory 
`
/usr/bin/python setup.py build
running build
running build_py
running build_ext
make  check-local
make[3]: Entering directory 
`
/usr/bin/python setup.py build
running build
running build_py
running build_ext
make[3]: Leaving directory 
`
make[2]: Leaving directory 
`
Making check in erl
make[2]: Entering directory 
`
./rebar eunit
==> erl (eunit)
Compiled src/thrift_transport.erl
Compiled src/thrift_service.erl
Compiled src/thrift_protocol.erl
Compiled test/constantsDemo_types.erl
Compiled test/thriftTest_types.erl
Compiled test/inherited_thrift.erl
Compiled test/manyTypedefs_types.erl
Compiled test/service_thrift.erl
Compiled test/yowza_thrift.erl
Compiled test/test_client.erl
Compiled test/emptyService_thrift.erl
Compiled test/thrift1151_types.erl
Compiled test/reverseOrderService_thrift.erl
Compiled test/test_di

Build failed in Jenkins: Thrift-cpp #122

2011-08-16 Thread Apache Jenkins Server
See 

Changes:

[jfarrell] Thrift-1263: Updating rb client Rakefile to add suport for 
publishing client to rubygems.org
Client: Ruby
Patch: Jfarrell

Updating Rakefile to remove deprecated functions and add support for publishing 
to rubgems.org

--
[...truncated 103 lines...]
checking whether the g++ linker (/usr/bin/ld -m elf_x86_64) supports shared 
libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether make sets $(MAKE)... (cached) yes
checking for bison... bison -y
checking for flex... flex
checking lex output file root... lex.yy
checking lex library... -lfl
checking whether yytext is a pointer... yes
checking whether ln -s works... yes
checking for gawk... (cached) mawk
checking for ranlib... (cached) ranlib
checking for boostlib >= 1.33.1... yes
checking for libevent >= 1.0... yes
checking for zlib >= 1.2.3... yes
checking for trial... /usr/bin/trial
checking for 6g... /usr/local/bin/6g
checking for 6l... /usr/local/bin/6l
checking for gomake... /usr/local/bin/gomake
checking for goinstall... /usr/local/bin/goinstall
checking for an ANSI C-conforming const... yes
checking for inline... inline
checking for working volatile... yes
checking for stdbool.h that conforms to C99... no
checking for _Bool... no
checking for ANSI C header files... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking return type of signal handlers... void
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for inttypes.h... (cached) yes
checking limits.h usability... yes
checking limits.h presence... yes
checking for limits.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking for unistd.h... (cached) yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking malloc.h usability... yes
checking malloc.h presence... yes
checking for malloc.h... yes
checking openssl/ssl.h usability... yes
checking openssl/ssl.h presence... yes
checking for openssl/ssl.h... yes
checking openssl/rand.h usability... yes
checking openssl/rand.h presence... yes
checking for openssl/rand.h... yes
checking openssl/x509v3.h usability... yes
checking openssl/x509v3.h presence... yes
checking for openssl/x509v3.h... yes
checking for pthread_create in -lpthread... yes
checking for clock_gettime in -lrt... yes
checking for setsockopt in -lsocket... no
checking for SSL_ctrl in -lssl... yes
checking for int16_t... yes
checking for int32_t... yes
checking for int64_t... yes
checking for int8_t... yes
checking for mode_t... yes
checking for off_t... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for uint8_t... yes
checking for ptrdiff_t... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking whether AI_ADDRCONFIG is declared... yes
checking for working alloca.h... yes
checking for alloca... yes
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for working memcmp... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking sys/select.h usability... yes
checking sys/select.h presence... yes
checking for sys/select.h... yes
checking for sys/socket.h... (cached) yes
checking types of arguments for select... int,fd_set *,struct timeval *
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking whether strerror_r is declared... yes
checking for strerror_r... yes
checking whether strerror_r returns char *... yes
checking for strftime... yes

[jira] [Closed] (THRIFT-1263) publish ruby client to rubygems

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell closed THRIFT-1263.


Resolution: Fixed

Added to trunk, gem release for 0.7.0

> publish ruby client to rubygems
> ---
>
> Key: THRIFT-1263
> URL: https://issues.apache.org/jira/browse/THRIFT-1263
> Project: Thrift
>  Issue Type: Bug
>  Components: Ruby - Compiler
>Affects Versions: 0.7
>Reporter: Jake Farrell
>Assignee: Jake Farrell
> Fix For: 0.8
>
> Attachments: thrift-1263.patch
>
>
> As part of the release process release gem to rubygems.org

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1263) publish ruby client to rubygems

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1263:
-

Attachment: thrift-1263.patch

Updates Rakefile to use rspec task for creating and deploying gem

> publish ruby client to rubygems
> ---
>
> Key: THRIFT-1263
> URL: https://issues.apache.org/jira/browse/THRIFT-1263
> Project: Thrift
>  Issue Type: Bug
>  Components: Ruby - Compiler
>Affects Versions: 0.7
>Reporter: Jake Farrell
>Assignee: Jake Farrell
> Fix For: 0.8
>
> Attachments: thrift-1263.patch
>
>
> As part of the release process release gem to rubygems.org

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Created] (THRIFT-1263) publish ruby client to rubygems

2011-08-16 Thread Jake Farrell (JIRA)
publish ruby client to rubygems
---

 Key: THRIFT-1263
 URL: https://issues.apache.org/jira/browse/THRIFT-1263
 Project: Thrift
  Issue Type: Bug
Reporter: Jake Farrell
Assignee: Jake Farrell


As part of the release process release gem to rubygems.org

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] [Updated] (THRIFT-1263) publish ruby client to rubygems

2011-08-16 Thread Jake Farrell (JIRA)

 [ 
https://issues.apache.org/jira/browse/THRIFT-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jake Farrell updated THRIFT-1263:
-

  Component/s: Ruby - Compiler
Affects Version/s: 0.7
Fix Version/s: 0.8

> publish ruby client to rubygems
> ---
>
> Key: THRIFT-1263
> URL: https://issues.apache.org/jira/browse/THRIFT-1263
> Project: Thrift
>  Issue Type: Bug
>  Components: Ruby - Compiler
>Affects Versions: 0.7
>Reporter: Jake Farrell
>Assignee: Jake Farrell
> Fix For: 0.8
>
>
> As part of the release process release gem to rubygems.org

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira