Skip to content

Commit

Permalink
Merge pull request #21 from dtymon/master
Browse files Browse the repository at this point in the history
Fix for failure to encode array in message
  • Loading branch information
Shouqun committed Jul 6, 2012
2 parents 3b0f27a + 8010892 commit ef2be03
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/dbus.cc
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ bool encode_to_message_with_objects(Local<Value> value,
for (unsigned int i=0; i < arrayData->Length(); i++) { for (unsigned int i=0; i < arrayData->Length(); i++) {
ERROR("Argument Arrary Item:%d\n", i); ERROR("Argument Arrary Item:%d\n", i);
Local<Value> arrayItem = arrayData->Get(i); Local<Value> arrayItem = arrayData->Get(i);
if ( encode_to_message_with_objects(arrayItem, if ( ! encode_to_message_with_objects(arrayItem,
&subIter, array_sig) ) { &subIter, array_sig) ) {
no_error_status = false; no_error_status = false;
break; break;
Expand Down Expand Up @@ -727,13 +727,12 @@ Handle<Value> DBusMethod(const Arguments& args){


//encode to message with given v8 Objects and the signature //encode to message with given v8 Objects and the signature
if (! encode_to_message_with_objects(args[count], &iter, arg_sig)) { if (! encode_to_message_with_objects(args[count], &iter, arg_sig)) {
dbus_free(arg_sig);
no_error_status = false; no_error_status = false;
} }


dbus_free(arg_sig); dbus_free(arg_sig);
count++; count++;
} while (dbus_signature_iter_next(&siter)); } while (no_error_status && dbus_signature_iter_next(&siter));
} }


//check if there is error on encode dbus message //check if there is error on encode dbus message
Expand Down

0 comments on commit ef2be03

Please sign in to comment.