Rename frame_destroy => stomp_free_frame
parent
d1934cf31b
commit
b986c891d8
|
@ -497,7 +497,7 @@ PHP_FUNCTION(stomp_connect)
|
|||
stomp->session = estrdup(key);
|
||||
}
|
||||
|
||||
frame_destroy(res);
|
||||
stomp_free_frame(res);
|
||||
|
||||
if (!stomp_object) {
|
||||
ZEND_REGISTER_RESOURCE(return_value, stomp, le_stomp);
|
||||
|
@ -816,7 +816,7 @@ PHP_FUNCTION(stomp_read_frame)
|
|||
char *error_msg = NULL;
|
||||
if (zend_hash_find(res->headers, "message", sizeof("message"), (void **)&error_msg) == SUCCESS) {
|
||||
STOMP_ERROR(0, error_msg)
|
||||
frame_destroy(res);
|
||||
stomp_free_frame(res);
|
||||
RETURN_FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -854,7 +854,7 @@ PHP_FUNCTION(stomp_read_frame)
|
|||
add_assoc_zval_ex(return_value, "headers", sizeof("headers"), headers);
|
||||
}
|
||||
|
||||
frame_destroy(res);
|
||||
stomp_free_frame(res);
|
||||
} else {
|
||||
if (sel_res == -1) {
|
||||
STOMP_ERROR(0, "Error while selecting from socket: %d", errno);
|
||||
|
|
8
stomp.c
8
stomp.c
|
@ -28,7 +28,7 @@
|
|||
#include "stomp.h"
|
||||
#include "php_stomp.h"
|
||||
|
||||
#define RETURN_READ_FRAME_FAIL { frame_destroy(f); return NULL; }
|
||||
#define RETURN_READ_FRAME_FAIL { stomp_free_frame(f); return NULL; }
|
||||
|
||||
ZEND_EXTERN_MODULE_GLOBALS(stomp);
|
||||
extern zend_class_entry *stomp_ce_exception;
|
||||
|
@ -378,9 +378,9 @@ static int stomp_read_line(stomp_t *stomp, char **data)
|
|||
}
|
||||
/* }}} */
|
||||
|
||||
/* {{{ frame_destroy
|
||||
/* {{{ stomp_free_frame
|
||||
*/
|
||||
void frame_destroy(stomp_frame_t *frame)
|
||||
void stomp_free_frame(stomp_frame_t *frame)
|
||||
{
|
||||
if (frame) {
|
||||
if (frame->command) {
|
||||
|
@ -502,7 +502,7 @@ int stomp_valid_receipt(stomp_t *stomp, stomp_frame_t *frame) {
|
|||
stomp_set_error(stomp, error_msg, 0);
|
||||
}
|
||||
}
|
||||
frame_destroy(res);
|
||||
stomp_free_frame(res);
|
||||
}
|
||||
}
|
||||
return success;
|
||||
|
|
2
stomp.h
2
stomp.h
|
@ -68,7 +68,7 @@ stomp_frame_t *stomp_read_frame(stomp_t *connection);
|
|||
int stomp_valid_receipt(stomp_t *connection, stomp_frame_t *frame);
|
||||
int stomp_select(stomp_t *connection);
|
||||
void stomp_set_error(stomp_t *stomp, const char *error, int errnum);
|
||||
void frame_destroy(stomp_frame_t *frame);
|
||||
void stomp_free_frame(stomp_frame_t *frame);
|
||||
#endif /* _STOMP_H_ */
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue