php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #62696
Patch exchange_type_headers revision 2012-07-30 15:44 UTC by dolphin at sendmail dot ru

Patch exchange_type_headers for amqp Bug #62696

Patch version 2012-07-30 15:44 UTC

Return to Bug #62696 | Download this patch
Patch Revisions:

Developer: dolphin@sendmail.ru

diff -Naur amqp-1.0.4.orig/amqp.c amqp-1.0.4/amqp.c
--- amqp-1.0.4.orig/amqp.c	2012-07-18 13:10:39.000000000 +0400
+++ amqp-1.0.4/amqp.c	2012-07-30 19:37:18.000000000 +0400
@@ -731,7 +731,7 @@
 	REGISTER_STRING_CONSTANT("AMQP_EX_TYPE_DIRECT",	AMQP_EX_TYPE_DIRECT,	CONST_CS | CONST_PERSISTENT);
 	REGISTER_STRING_CONSTANT("AMQP_EX_TYPE_FANOUT",	AMQP_EX_TYPE_FANOUT,	CONST_CS | CONST_PERSISTENT);
 	REGISTER_STRING_CONSTANT("AMQP_EX_TYPE_TOPIC",	AMQP_EX_TYPE_TOPIC,		CONST_CS | CONST_PERSISTENT);
-	REGISTER_STRING_CONSTANT("AMQP_EX_TYPE_HEADER",	AMQP_EX_TYPE_HEADER,	CONST_CS | CONST_PERSISTENT);
+	REGISTER_STRING_CONSTANT("AMQP_EX_TYPE_HEADERS",	AMQP_EX_TYPE_HEADERS,	CONST_CS | CONST_PERSISTENT);
 
 	return SUCCESS;
 
diff -Naur amqp-1.0.4.orig/amqp_exchange.c amqp-1.0.4/amqp_exchange.c
--- amqp-1.0.4.orig/amqp_exchange.c	2012-07-18 13:10:39.000000000 +0400
+++ amqp-1.0.4/amqp_exchange.c	2012-07-30 19:37:57.000000000 +0400
@@ -306,11 +306,11 @@
 	exchange = (amqp_exchange_object *)zend_object_store_get_object(id TSRMLS_CC);
 	
 	if (strcmp(type, AMQP_EX_TYPE_DIRECT) != 0
-	&& strcmp(type, AMQP_EX_TYPE_HEADER) != 0
+	&& strcmp(type, AMQP_EX_TYPE_HEADERS) != 0
 	&& strcmp(type, AMQP_EX_TYPE_TOPIC) != 0
 	&& strcmp(type, AMQP_EX_TYPE_FANOUT) != 0
 	) {
-		zend_throw_exception(amqp_exchange_exception_class_entry, "Could not set exchange type. Exchange type must be one of 'direct', 'topic', 'header' or 'fanout'.", 0 TSRMLS_CC);
+		zend_throw_exception(amqp_exchange_exception_class_entry, "Could not set exchange type. Exchange type must be one of 'direct', 'topic', 'headers' or 'fanout'.", 0 TSRMLS_CC);
 		return;
 	}
 	
diff -Naur amqp-1.0.4.orig/php_amqp.h amqp-1.0.4/php_amqp.h
--- amqp-1.0.4.orig/php_amqp.h	2012-07-18 13:10:39.000000000 +0400
+++ amqp-1.0.4/php_amqp.h	2012-07-30 19:37:23.000000000 +0400
@@ -140,7 +140,7 @@
 #define AMQP_EX_TYPE_DIRECT		"direct"
 #define AMQP_EX_TYPE_FANOUT		"fanout"
 #define AMQP_EX_TYPE_TOPIC		"topic"
-#define AMQP_EX_TYPE_HEADER		"header"
+#define AMQP_EX_TYPE_HEADERS		"headers"
 
 #define PHP_AMQP_CONNECTION_RES_NAME "AMQP Connection Resource"
 
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Sat Dec 04 14:03:34 2021 UTC