From 9c48078b76cadfb8afd4aeffdf6e97b0b133ef57 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 19 May 2011 20:48:20 +0000 Subject: Fix some crashiness in last commit. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3286 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/OSCClientReceiver.cpp | 13 ++++++++----- src/server/OSCEngineReceiver.cpp | 3 +++ 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/client/OSCClientReceiver.cpp b/src/client/OSCClientReceiver.cpp index 402a6974..f854b3fb 100644 --- a/src/client/OSCClientReceiver.cpp +++ b/src/client/OSCClientReceiver.cpp @@ -183,7 +183,7 @@ OSCClientReceiver::_put_cb(const char* path, const char* types, lo_arg** argv, i int OSCClientReceiver::_delta_begin_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - const char* obj_path = &argv[1]->s; + const char* obj_path = &argv[0]->s; assert(_delta_remove.empty()); assert(_delta_add.empty()); _delta_uri = obj_path; @@ -193,16 +193,16 @@ OSCClientReceiver::_delta_begin_cb(const char* path, const char* types, lo_arg** int OSCClientReceiver::_delta_remove_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - _delta_remove.insert(make_pair(&argv[1]->s, - AtomLiblo::lo_arg_to_atom(types[2], argv[2]))); + _delta_remove.insert(make_pair(&argv[0]->s, + AtomLiblo::lo_arg_to_atom(types[1], argv[1]))); return 0; } int OSCClientReceiver::_delta_add_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { - _delta_add.insert(make_pair(&argv[1]->s, - AtomLiblo::lo_arg_to_atom(types[2], argv[2]))); + _delta_add.insert(make_pair(&argv[0]->s, + AtomLiblo::lo_arg_to_atom(types[1], argv[1]))); return 0; } @@ -210,6 +210,9 @@ int OSCClientReceiver::_delta_end_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { _target->delta(_delta_uri, _delta_remove, _delta_add); + _delta_uri = Raul::URI(); + _delta_remove.clear(); + _delta_add.clear(); return 0; } diff --git a/src/server/OSCEngineReceiver.cpp b/src/server/OSCEngineReceiver.cpp index ad59c490..08f8074e 100644 --- a/src/server/OSCEngineReceiver.cpp +++ b/src/server/OSCEngineReceiver.cpp @@ -380,6 +380,9 @@ int OSCEngineReceiver::_delta_end_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg) { delta(_delta_uri, _delta_remove, _delta_add); + _delta_uri = Raul::URI(); + _delta_remove.clear(); + _delta_add.clear(); return 0; } -- cgit v1.2.1