Skip to content

Commit

Permalink
bugfix
Browse files Browse the repository at this point in the history
* via @edsiper
* see
edsiper@69ad1bfd9f51dd67291062f0acb62
2e0c58667d2
* some formatting fixes
  • Loading branch information
lifeofguenter committed Aug 6, 2014
1 parent 4550537 commit 02f2d83
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 15 deletions.
5 changes: 3 additions & 2 deletions CREDITS
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
rdns
RDNS
Alexander Solovets
Gunter Grodotzki
Eduardo Silva
Gunter Grodotzki
25 changes: 23 additions & 2 deletions php_rdns.h
Original file line number Diff line number Diff line change
@@ -1,8 +1,29 @@
/* $ Id: $ */
/*
+----------------------------------------------------------------------+
| Copyright (c) 2014 weheartwebsites UG |
+----------------------------------------------------------------------+
| This source file is subject to version 2 of the Apache license, |
| that is bundled with this package in the file LICENSE, and is |
| available through the world-wide-web at the following url: |
| http://www.apache.org/licenses/LICENSE-2.0.html |
+----------------------------------------------------------------------+
| Authors: Alexander Solovets <[email protected]> |
| Eduardo Silva <[email protected]> |
| Gunter Grodotzki <[email protected]> |
+----------------------------------------------------------------------+
*/

#ifndef PHP_RDNS_H
#define PHP_RDNS_H

#include <php.h>
extern zend_module_entry rdns_module_entry;
#define phpext_rdns_ptr &rdns_module_entry

#ifdef ZTS
#include "TSRM.h"
#endif

#define PHP_RDNS_VERSION "0.1.1"
#define PHP_RDNS_EXTNAME "RDNS"

#endif /* PHP_RDNS_H */
18 changes: 7 additions & 11 deletions rdns.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,25 @@
| http://www.apache.org/licenses/LICENSE-2.0.html |
+----------------------------------------------------------------------+
| Authors: Alexander Solovets <[email protected]> |
| Gunter Grodotzki <[email protected]> |
| Eduardo Silva <[email protected]> |
| Gunter Grodotzki <[email protected]> |
+----------------------------------------------------------------------+
*/

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include <stdlib.h>
#include <pthread.h>

#include <php.h>
#include <ext/standard/info.h>
#include <Zend/zend_API.h>
#include "php.h"
#include "php_ini.h"
#include "ext/standard/info.h"
#include "php_rdns.h"

#include "rdns.h"
#include "rdns_ev.h"

#define PHP_RDNS_VERSION "0.1.0"
#define PHP_RDNS_EXTNAME "RDNS"

#define RDNS_INIT_VARS \
zval *object = getThis(); \
php_rdns_t *i_obj = NULL;
Expand All @@ -52,9 +50,6 @@ typedef struct {

static zend_class_entry *rdns_ce = NULL;

extern zend_module_entry rdns_module_entry;
#define phpext_rdns_ptr &rdns_module_entry

static PHP_METHOD(RDNS, __construct);
static PHP_METHOD(RDNS, addServer);
static PHP_METHOD(RDNS, addRequest);
Expand Down Expand Up @@ -85,6 +80,7 @@ static void php_rdns_free(php_rdns_t *i_obj TSRMLS_DC)
{
zend_object_std_dtor(&i_obj->obj TSRMLS_CC);
rdns_resolver_release(i_obj->resolver);
ev_loop_destroy(i_obj->loop);
efree(i_obj);
}

Expand Down

0 comments on commit 02f2d83

Please sign in to comment.