summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-19 20:48:20 +0000
committerDavid Robillard <d@drobilla.net>2011-05-19 20:48:20 +0000
commit9c48078b76cadfb8afd4aeffdf6e97b0b133ef57 (patch)
treedbb4008b107443dd271a8cc551e0c8cd6d5b8620 /src
parent8f01b24d7a258d0e717eedcbb3618258bfe9883e (diff)
downloadingen-9c48078b76cadfb8afd4aeffdf6e97b0b133ef57.tar.gz
ingen-9c48078b76cadfb8afd4aeffdf6e97b0b133ef57.tar.bz2
ingen-9c48078b76cadfb8afd4aeffdf6e97b0b133ef57.zip
Fix some crashiness in last commit.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3286 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r--src/client/OSCClientReceiver.cpp13
-rw-r--r--src/server/OSCEngineReceiver.cpp3
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;
}