summary refs log tree commit diff
path: root/pkgs/tools/admin/nxproxy
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-07-09 02:39:50 +0200
committerTobias Geerinckx-Rice <tobias.geerinckx.rice@gmail.com>2015-07-09 02:41:26 +0200
commit98e7674e88162fc0b6517faa962233c8b3ae75e4 (patch)
tree6567bfc91a2cf8712ed57761ddce2dcd5a4009ef /pkgs/tools/admin/nxproxy
parent26e44a0a5ca4e79d5f219b3e185bd53fd6a0d476 (diff)
downloadnixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.tar
nixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.tar.gz
nixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.tar.bz2
nixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.tar.lz
nixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.tar.xz
nixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.tar.zst
nixlib-98e7674e88162fc0b6517faa962233c8b3ae75e4.zip
nxproxy, libxcomp: nxlibs 3.5.0.{31 -> 32}
Removes the need for patching (for now).
Diffstat (limited to 'pkgs/tools/admin/nxproxy')
-rw-r--r--pkgs/tools/admin/nxproxy/0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch67
-rw-r--r--pkgs/tools/admin/nxproxy/default.nix9
2 files changed, 3 insertions, 73 deletions
diff --git a/pkgs/tools/admin/nxproxy/0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch b/pkgs/tools/admin/nxproxy/0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch
deleted file mode 100644
index 3d4c584fb078..000000000000
--- a/pkgs/tools/admin/nxproxy/0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-commit f982cbc85e9ffff24a6a348c3637b54a7e8cbc34
-Author: Vadim Troshchinskiy <vtroshchinskiy@qindel.com>
-Date:   Wed May 20 15:47:45 2015 +0200
-
-Fix negotiation in stage 10 error
-
-Problem fixed by adding a select() call to implement a timeout,
-and retrying writes if needed.
-
-v2: backport to nx-libs 3.5.0.x (Mihai Moldovan)
-
---- a/nxcomp/Loop.cpp
-+++ b/nxcomp/Loop.cpp
-@@ -8073,16 +8073,52 @@ int ReadRemoteData(int fd, char *buffer,
- int WriteLocalData(int fd, const char *buffer, int size)
- {
-   int position = 0;
-+  int ret = 0;
-+  fd_set writeSet;
-+  struct timeval selectTs = {30, 0};
- 
-   while (position < size)
-   {
-+
-+    // A write to a non-blocking socket may fail with EAGAIN. The problem is
-+    // that cache data is done in several writes, and there's no easy way
-+    // to handle failure without rewriting a significant amount of code.
-+    //
-+    // Bailing out of the outer loop would result in restarting the sending
-+    // of the entire cache list, which would confuse the other side.
-+
-+    FD_ZERO(&writeSet);
-+    FD_SET(fd, &writeSet);
-+
-+    ret = select(fd+1, NULL, &writeSet, NULL, &selectTs);
-+
-+    #ifdef DEBUG
-+    *logofs << "Loop: WriteLocalData: select() returned with a code of " << ret << " and remaining timeout of "
-+            << selectTs.tv_sec << " sec, " << selectTs.tv_usec << "usec\n" << logofs_flush;
-+    #endif
-+
-+    if ( ret < 0 )
-+    {
-+      *logofs << "Loop: Error in select() when writing data to FD#" << fd << ": " << strerror(EGET()) << "\n" << logofs_flush;
-+
-+      if ( EGET() == EINTR )
-+        continue;
-+
-+      return -1;
-+    }
-+    else if ( ret == 0 )
-+    {
-+      *logofs << "Loop: Timeout expired in select() when writing data to FD#" << fd << ": " << strerror(EGET()) << "\n" << logofs_flush;
-+      return -1;
-+    }
-+
-     int result = write(fd, buffer + position, size - position);
- 
-     getNewTimestamp();
- 
-     if (result <= 0)
-     {
--      if (result < 0 && EGET() == EINTR)
-+      if (result < 0 && (EGET() == EINTR || EGET() == EAGAIN || EGET() == EWOULDBLOCK))
-       {
-         continue;
-       }
diff --git a/pkgs/tools/admin/nxproxy/default.nix b/pkgs/tools/admin/nxproxy/default.nix
index 20b8f4059ad8..ebcd2afd46f6 100644
--- a/pkgs/tools/admin/nxproxy/default.nix
+++ b/pkgs/tools/admin/nxproxy/default.nix
@@ -1,15 +1,16 @@
 { stdenv, fetchurl, autoreconfHook, libxcomp }:
 
-let version = "3.5.0.31"; in
+let version = "3.5.0.32"; in
 stdenv.mkDerivation {
   name = "nxproxy-${version}";
 
   src = fetchurl {
-    sha256 = "1hi3xrjzr37zs72djw3k7gj6mn2bsihfw1iysl8l0i85jl6sdfkd";
+    sha256 = "02n5bdc1jsq999agb4w6dmdj5l2wlln2lka84qz6rpswwc59zaxm";
     url = "http://code.x2go.org/releases/source/nx-libs/nx-libs-${version}-lite.tar.gz";
   };
 
   meta = with stdenv.lib; {
+    inherit version;
     description = "NX compression proxy";
     homepage = "http://wiki.x2go.org/doku.php/wiki:libs:nx-libs";
     license = licenses.gpl2;
@@ -17,10 +18,6 @@ stdenv.mkDerivation {
     maintainers = with maintainers; [ nckx ];
   };
 
-  patches = [
-    ./0660_nxcomp_fix-negotiation-in-stage-10-error.full+lite.patch
-  ];
-
   buildInputs = [ libxcomp ];
   nativeBuildInputs = [ autoreconfHook ];