[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pecl-cvs
Subject:    [PECL-CVS] com pecl/networking/ssh2: fix checking resource type: ssh2.c
From:       Casper Langemeijer <langemeijer () php ! net>
Date:       2016-09-24 13:33:22
Message-ID: php-mail-4b692d520b475d7e2fb9328f2d3128901577387077 () git ! php ! net
[Download RAW message or body]

Commit:    e3cb4a6624effc91ff416326ae3f7f40817e1e23
Author:    Libor M <liborm85@gmail.com>         Sat, 24 Sep 2016 15:33:22 +0200
Parents:   dfc51a8f2047a552a43b20e1ee093b5af7d8be56
Branches:  master

Link:       http://git.php.net/?p=pecl/networking/ssh2.git;a=commitdiff;h=e3cb4a6624effc91ff416326ae3f7f40817e1e23


Log:
fix checking resource type

Changed paths:
  M  ssh2.c


Diff:
diff --git a/ssh2.c b/ssh2.c
index 09d6d55..c9eb943 100644
--- a/ssh2.c
+++ b/ssh2.c
@@ -890,8 +890,7 @@ PHP_FUNCTION(ssh2_poll)
 		}
 		zend_string_release(hash_key_zstring);
 
-		//TODO Sean-Der
-		//zend_list_find(Z_LVAL_P(tmpzval), &res_type);
+		res_type = Z_RES_P(tmpzval)->type;
 		res = zend_fetch_resource_ex(tmpzval, "Poll Resource", res_type);
 		if (res_type == le_ssh2_listener) {
 			pollfds[i].type = LIBSSH2_POLLFD_LISTENER;
@@ -902,8 +901,7 @@ PHP_FUNCTION(ssh2_poll)
 			pollfds[i].fd.channel = \
((php_ssh2_channel_data*)(((php_stream*)res)->abstract))->channel;  /* TODO: Add the \
ability to select against other stream types */  } else {
-			// TODO Sean-Der
-			//php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid resource type in subarray: \
%s", zend_rsrc_list_get_rsrc_type(Z_LVAL_PP(tmpzval) TSRMLS_CC)); \
+			php_error_docref(NULL TSRMLS_CC, E_WARNING, "Invalid resource type in subarray: \
%s", zend_rsrc_list_get_rsrc_type(Z_RES_P(tmpzval)));  numfds--;
 			continue;
 		}


--
PECL CVS Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic