Commits

Michael Granger committed 1335bcb

Checkpoint commit

Comments (0)

Files changed (4)

ext/openldap_ext/connection.c

 	char *who  = NULL;
 	struct berval cred = BER_BVNULL;
 	struct berval *s_cred = NULL;
-	int msgid  = 0;
 
 	rb_scan_args( argc, argv, "02", &bind_dn, &password );
 
 	int sizelimit             = -1;
 	const VALUE utf8          = rb_enc_from_encoding(rb_utf8_encoding());
 	VALUE string_attrs        = Qnil;
+	VALUE result_args[2];
 
 	// Result
 	int rval = -1;
 
 	// Some other stuff
 
-	return Qnil;
+	result_args[0] = self;
+	result_args[1] = INT2FIX( msgid );
+
+	return rb_class_new_instance( 2, result_args, ropenldap_cOpenLDAPResult );
 }
 
 

ext/openldap_ext/openldap.c

 
 	/* Initialize the other parts of the extension */
 	ropenldap_init_connection();
+	ropenldap_init_result();
+	ropenldap_init_message();
 
 	/* Detect mismatched linking */
 	ropenldap_check_link();

spec/openldap/connection_spec.rb

 
 			it "returns all entries under the base without a filter" do
 				result = @conn.search( TEST_BASE )
-				result.count.should == 3
+				result.next.count.should == 3
 			end
 
 			it "raises an appropriate exception on an invalid filter" do
 
 			it "can constrain return values to a subset of attributes when searching" do
 				result = @conn.search( TEST_BASE, :subtree, '(objectClass=*)', [:cn, :dc] )
-				result.count.should == 3
+				result.next.count.should == 3
 			end
 
 			# it "handles a single attr argument when searching" do

spec/openldap/message_spec.rb

 
 
 	it "can be created with a connection and a message ID" do
-		result = OpenLDAP::Result.new( )
+		result = OpenLDAP::Result.new
 	end
 
 end