Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

PERL-191 fix connection nomenclature in C/XS

  • Loading branch information...
commit cb4729983ecd86e5c6a50effdc5fbddb5e321de8 1 parent a09a3af
@friedo friedo authored
Showing with 5 additions and 5 deletions.
  1. +1 −1  mongo_link.c
  2. +4 −4 xs/Cursor.xs
View
2  mongo_link.c
@@ -378,7 +378,7 @@ int mongo_link_hear(SV *cursor_sv) {
SV *link_sv, *request_id_sv, *timeout_sv;
cursor = (mongo_cursor*)perl_mongo_get_ptr_from_instance(cursor_sv, &cursor_vtbl);
- link_sv = perl_mongo_call_reader(cursor_sv, "_connection");
+ link_sv = perl_mongo_call_reader(cursor_sv, "_client");
link = (mongo_link*)perl_mongo_get_ptr_from_instance(link_sv, &connection_vtbl);
timeout_sv = perl_mongo_call_reader(link_sv, "query_timeout");
View
8 xs/Cursor.xs
@@ -110,7 +110,7 @@ static int has_next(SV *self, mongo_cursor *cursor) {
}
- link = perl_mongo_call_reader (self, "_connection");
+ link = perl_mongo_call_reader (self, "_client");
ns = perl_mongo_call_reader (self, "_ns");
// we have to go and check with the db
@@ -156,7 +156,7 @@ static int has_next(SV *self, mongo_cursor *cursor) {
static void kill_cursor(SV *self) {
mongo_cursor *cursor = (mongo_cursor*)perl_mongo_get_ptr_from_instance(self, &cursor_vtbl);
- SV *link = perl_mongo_call_reader (self, "_connection");
+ SV *link = perl_mongo_call_reader (self, "_client");
SV *request_id_sv = perl_mongo_call_reader (self, "_request_id");
char quickbuf[128];
buffer buf;
@@ -246,7 +246,7 @@ next (self)
if (code && SvIOK(*code) &&
(SvIV(*code) == 10107 || SvIV(*code) == 13435 || SvIV(*code) == 13436)) {
- SV *conn = perl_mongo_call_method (self, "_connection", 0, 0);
+ SV *conn = perl_mongo_call_method (self, "_client", 0, 0);
set_disconnected(conn);
}
@@ -307,7 +307,7 @@ DESTROY (self)
mongo_link *link;
SV *link_sv;
CODE:
- link_sv = perl_mongo_call_reader(self, "_connection");
+ link_sv = perl_mongo_call_reader(self, "_client");
link = (mongo_link*)perl_mongo_get_ptr_from_instance(link_sv, &connection_vtbl);
// check if cursor is connected
if (link->master && link->master->connected) {
Please sign in to comment.
Something went wrong with that request. Please try again.