Permalink
Browse files

always url decode tracker response

  • Loading branch information...
1 parent 4c5f01f commit f72cfb4b051308287b877c47f04b505a32e77799 Andre committed Jul 7, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −1 mogilefs.c
  2. +0 −1 php_mogilefs.h
View
@@ -481,6 +481,8 @@ PHPAPI char *mogilefs_sock_read(MogilefsSock *mogilefs_sock, int *buf_len TSRMLS
php_printf("RESPONSE: %s\n", outbuf);
#endif
+ outbuf_len = php_url_decode(outbuf, outbuf_len);
+
if (strncmp(outbuf, "OK", 2) != 0) {
*buf_len = 0;
@@ -497,7 +499,6 @@ PHPAPI char *mogilefs_sock_read(MogilefsSock *mogilefs_sock, int *buf_len TSRMLS
} else {
strcpy(message_clean, message);
}
- php_url_decode(message_clean, strlen(message_clean));
zend_throw_exception(mogilefs_exception_ce, message_clean, 0 TSRMLS_CC);
View
@@ -89,7 +89,6 @@ PHP_METHOD(MogileFs, isInDebuggingMode);
mogilefs_sock_write (socket, cmd, cmd_len, 0 TSRMLS_CC)
-#define MOGILEFS_SOCK_BUF_SIZE 4096
#define MOGILEFS_READ_TIMEOUT 10.0
#define MOGILEFS_CONNECT_TIMEOUT 5.0
#define MOGILEFS_SOCK_STATUS_FAILED 0

0 comments on commit f72cfb4

Please sign in to comment.