stefanocasazza / ULib

C++ application development framework, to help developers create and deploy applications quickly and simply
GNU Lesser General Public License v3.0
947 stars 107 forks source link

Working #67

Closed victorstewart closed 5 years ago

victorstewart commented 5 years ago

bunch of little tweaks and fixes

victorstewart commented 5 years ago

oh and there is no SSL_OP_NO_TLSv2, the SSL_CTX_set_min_proto_version function is required thus forward

stefanocasazza commented 5 years ago

I am not able to merge this. Anyway I tried to get some change so check the last sync commit. Update hash_map.h make fail tests file_config and hash_map...

victorstewart commented 5 years ago

sorry still getting the hang out all of this git stuff. fixed all the conflicts. it's good to go now.

stefanocasazza commented 5 years ago

Update hash_map.h make tests file_config and hash_map FAIL... Anyway I get the redis change so check the last commit.

victorstewart commented 5 years ago

oh I was just looking at the merge conflicts!

the hash_map change is because of a crash when using the assign function.

when assigning HashMap B to HashMap A, the expected behavior would be to empty B and fill it contents into A. But the current implementation doesn’t do this.

So if you accumulate changes in a local B, then fill them to A, when B goes out of scope and deallocates.... program crashes. (as seen in redis.cpp).

i can provide a code example soon.

stefanocasazza commented 5 years ago

when assigning HashMap B to HashMap A, the expected behavior would be to empty B and fill it contents into A.

Where you have read this? I don't think is correct to empty B. You can do that after the A.assign(B) with B.clear()...

victorstewart commented 5 years ago

oh you're right, I guess I was thinking of move. I'll change it to adding a move function.

victorstewart commented 5 years ago

should be good now. I changed UHashMap::assign back to its original implementation, and forgot about a move function-- it's more efficient to just copy a new pointer rather than move all the objects, so I changed the redis cluster implementation to use that operation.