Skip to content

Conversation

mweal-ed
Copy link
Contributor

gattlib_write_char_by_uuid writes the incorrect buffer size. This changes gattlib_write_char_by_uuid to use buffer_len rather than sizeof(buffer) when writing so it writes the correct buffer size.

@oliviermartin
Copy link
Contributor

May be this pull-request should be merged into #34?

@mweal-ed
Copy link
Contributor Author

mweal-ed commented Jul 18, 2017

This is a separate unrelated commit. It is a one line change to bluez/gattlib_read_write.c:

@@ -222,7 +222,7 @@ int gattlib_write_char_by_uuid(gatt_connection_t* connection, uuid_t* uuid, cons
  		return ret;
  	}
  
 -	return gattlib_write_char_by_handle(connection, handle, buffer, sizeof(buffer));
 +	return gattlib_write_char_by_handle(connection, handle, buffer, buffer_len);
  }
  
  int gattlib_notification_start(gatt_connection_t* connection, const uuid_t* uuid) {

I am relatively new to this part of git and do not know how to separate it yet. I will look into it in the next few days.

@mweal-ed mweal-ed closed this Jul 19, 2017
@mweal-ed mweal-ed deleted the gattlib_write_char_by_uuid branch July 19, 2017 20:12
@mweal-ed mweal-ed restored the gattlib_write_char_by_uuid branch July 19, 2017 20:29
@mweal-ed mweal-ed reopened this Jul 19, 2017
oliviermartin added a commit that referenced this pull request Mar 5, 2019
oliviermartin added a commit that referenced this pull request Mar 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants